<div dir="ltr">I did a search in all the xo I have downloaded from ASLO two months ago,<div>then, can be a little outdated but is useful as reference.</div><div><br></div><div>Of 682 .xo files, only 36 read values from gconf.</div>
<div><br></div><div>Looking for "client.get_" :</div><div> </div><div><div>grep -in client.get_ *.py | grep -v get_default | wc -l</div><div>    100</div></div><div><br></div><div>But many are reading nick/color:</div>
<div><br></div><div><div>[gonzalo@localhost gconf_use]$ grep -in client.get_ *.py | grep nick | wc -l</div><div>23</div></div><div><div>[gonzalo@localhost gconf_use]$ grep -in client.get_ *.py | grep color | wc -l</div><div>
34</div></div><div>And a few get the value of '/desktop/sugar/power/automatic'</div><div><div>grep -in client.get_ *.py | grep power | wc -l</div><div>10</div></div><div><br></div><div>The other are in 15 activities:</div>
<div><div><br></div><div>[gonzalo@localhost gconf_use]$ grep -in client.get_ *.py | grep -v get_default | grep -v nick | grep -v color | grep -v power | awk -F '.' '{print $2}' | sort -u</div><div>xo_AmazonasTortuga</div>
<div>xo_Browse</div><div>xo_FileShare</div><div>xo_IconChange</div><div>xo_Labyrinth</div><div>xo_Mirage</div><div>xo_MouseCam</div><div>xo_TortugadeMexico</div><div>xo_TurtleArtMini</div><div>xo_TurtleBlocks</div><div>xo_TurtleBots</div>
<div>xo_TurtleConfusion</div><div>xo_TurtleFlags</div><div>xo_WelcomeWeb</div><div>xo_Write</div></div><div><br></div><div><div>[gonzalo@localhost gconf_use]$ grep -in client.get_ *.py | grep -v get_default | grep -v nick | grep -v color | grep -v power</div>
<div><a href="http://addon-4024-latest.xo_Browse.activity_webactivity.py:92">addon-4024-latest.xo_Browse.activity_webactivity.py:92</a>:    backup_url = client.get_string('/desktop/sugar/backup_url')</div><div><a href="http://addon-4024-latest.xo_Browse.activity_webactivity.py:97">addon-4024-latest.xo_Browse.activity_webactivity.py:97</a>:    jabber_server = client.get_string(</div>
<div><a href="http://addon-4027-latest.xo_TurtleBlocks.activity_collaboration_neighborhood.py:797">addon-4027-latest.xo_TurtleBlocks.activity_collaboration_neighborhood.py:797</a>:        server = client.get_string(</div>
<div><a href="http://addon-4027-latest.xo_TurtleBlocks.activity_TurtleArtActivity.py:133">addon-4027-latest.xo_TurtleBlocks.activity_TurtleArtActivity.py:133</a>:            if self.client.get_int(self._HOVER_HELP) == 1:</div>
<div><a href="http://addon-4027-latest.xo_TurtleBlocks.activity_TurtleArtActivity.py:135">addon-4027-latest.xo_TurtleBlocks.activity_TurtleArtActivity.py:135</a>:            if not self.client.get_int(self._COORDINATE_SCALE) in [0, 1]:</div>
<div><a href="http://addon-4027-latest.xo_TurtleBlocks.activity_turtleblocks.py:234">addon-4027-latest.xo_TurtleBlocks.activity_turtleblocks.py:234</a>:            if self.client.get_int(self._HOVER_HELP) == 1:</div><div>
<a href="http://addon-4027-latest.xo_TurtleBlocks.activity_turtleblocks.py:237">addon-4027-latest.xo_TurtleBlocks.activity_turtleblocks.py:237</a>:            if not self.client.get_int(self._COORDINATE_SCALE) in [0, 1]:</div>
<div><a href="http://addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:96">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:96</a>:<span class="" style="white-space:pre">                     </span>width = self.config_client.get_int ('/apps/labyrinth/width')</div>
<div><a href="http://addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:97">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:97</a>:<span class="" style="white-space:pre">                     </span>height = self.config_client.get_int ('/apps/labyrinth/height')</div>
<div><a href="http://addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:98">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:98</a>:<span class="" style="white-space:pre">                     </span>utils.use_bezier_curves = self.config_client.get_bool ('/apps/labyrinth/curves')</div>
<div><a href="http://addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:109">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:109</a>:<span class="" style="white-space:pre">                   </span>sort_order = self.config_client.get_int('/apps/labyrinth/map_sort_order')</div>
<div><a href="http://addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:110">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:110</a>:<span class="" style="white-space:pre">                   </span>column_id = self.config_client.get_int('/apps/labyrinth/map_sort_order_column')</div>
<div><a href="http://addon-4078-latest.xo_Labyrinth.activity_src_MainWindow.py:221">addon-4078-latest.xo_Labyrinth.activity_src_MainWindow.py:221</a>:<span class="" style="white-space:pre">                     </span>if not self.config_client.get_bool('/apps/labyrinth/show_tree_view'):</div>
<div><a href="http://addon-4201-latest.xo_Write.activity_speechtoolbar.py:109">addon-4201-latest.xo_Write.activity_speechtoolbar.py:109</a>:        speech.pitch = self._cnf_client.get_int('/desktop/sugar/speech/pitch')</div>
<div><a href="http://addon-4201-latest.xo_Write.activity_speechtoolbar.py:110">addon-4201-latest.xo_Write.activity_speechtoolbar.py:110</a>:        speech.rate = self._cnf_client.get_int('/desktop/sugar/speech/rate')</div>
<div><a href="http://addon-4201-latest.xo_Write.activity_speechtoolbar.py:139">addon-4201-latest.xo_Write.activity_speechtoolbar.py:139</a>:        value = client.get_int(key)</div><div><a href="http://addon-4266-latest.xo_FileShare.activity_FileShareActivity.py:116">addon-4266-latest.xo_FileShare.activity_FileShareActivity.py:116</a>:            jabber_serv = client.get_string("/desktop/sugar/collaboration/jabber_server")</div>
<div><a href="http://addon-4298-latest.xo_TurtleArtMini.activity_collaboration_neighborhood.py:797">addon-4298-latest.xo_TurtleArtMini.activity_collaboration_neighborhood.py:797</a>:        server = client.get_string(</div>
<div><a href="http://addon-4298-latest.xo_TurtleArtMini.activity_TurtleArtActivity.py:124">addon-4298-latest.xo_TurtleArtMini.activity_TurtleArtActivity.py:124</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div>
<div><a href="http://addon-4298-latest.xo_TurtleArtMini.activity_turtleblocks.py:222">addon-4298-latest.xo_TurtleArtMini.activity_turtleblocks.py:222</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div><div><a href="http://addon-4363-latest.xo_Mirage.activity_mirage.py:698">addon-4363-latest.xo_Mirage.activity_mirage.py:698</a>:<span class="" style="white-space:pre">                   </span>style = client.get_string('/desktop/gnome/interface/toolbar_style')</div>
<div><a href="http://addon-4363-latest.xo_Mirage.activity_pippy_app.py:700">addon-4363-latest.xo_Mirage.activity_pippy_app.py:700</a>:<span class="" style="white-space:pre">                     </span>style = client.get_string('/desktop/gnome/interface/toolbar_style')</div>
<div><a href="http://addon-4434-latest.xo_TurtleBots.activity_collaboration_neighborhood.py:797">addon-4434-latest.xo_TurtleBots.activity_collaboration_neighborhood.py:797</a>:        server = client.get_string(</div><div>
<a href="http://addon-4434-latest.xo_TurtleBots.activity_TurtleArtActivity.py:124">addon-4434-latest.xo_TurtleBots.activity_TurtleArtActivity.py:124</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div><div><a href="http://addon-4434-latest.xo_TurtleBots.activity_turtleblocks.py:222">addon-4434-latest.xo_TurtleBots.activity_turtleblocks.py:222</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div>
<div><a href="http://addon-4450-latest.xo_TurtleConfusion.activity_collaboration_neighborhood.py:797">addon-4450-latest.xo_TurtleConfusion.activity_collaboration_neighborhood.py:797</a>:        server = client.get_string(</div>
<div><a href="http://addon-4450-latest.xo_TurtleConfusion.activity_TurtleArtActivity.py:138">addon-4450-latest.xo_TurtleConfusion.activity_TurtleArtActivity.py:138</a>:            if self.client.get_int(self._HOVER_HELP) == 1:</div>
<div><a href="http://addon-4450-latest.xo_TurtleConfusion.activity_turtleconfusion.py:226">addon-4450-latest.xo_TurtleConfusion.activity_turtleconfusion.py:226</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div>
<div><a href="http://addon-4487-latest.xo_MouseCam.activity_activity.py:137">addon-4487-latest.xo_MouseCam.activity_activity.py:137</a>:        gconf_persist_value = self.client.get_float('/apps/mousecam/adj')</div>
<div><a href="http://addon-4487-latest.xo_MouseCam.activity_activity.py:149">addon-4487-latest.xo_MouseCam.activity_activity.py:149</a>:        gconf_persist_value = self.client.get_int('/apps/mousecam/threshold')</div>
<div><a href="http://addon-4585-latest.xo_AmazonasTortuga.activity_collaboration_neighborhood.py:797">addon-4585-latest.xo_AmazonasTortuga.activity_collaboration_neighborhood.py:797</a>:        server = client.get_string(</div>
<div><a href="http://addon-4585-latest.xo_AmazonasTortuga.activity_TurtleArtActivity.py:132">addon-4585-latest.xo_AmazonasTortuga.activity_TurtleArtActivity.py:132</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div>
<div><a href="http://addon-4585-latest.xo_AmazonasTortuga.activity_turtleblocks.py:222">addon-4585-latest.xo_AmazonasTortuga.activity_turtleblocks.py:222</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div><div>
<a href="http://addon-4668-latest.xo_TortugadeMexico.activity_collaboration_neighborhood.py:797">addon-4668-latest.xo_TortugadeMexico.activity_collaboration_neighborhood.py:797</a>:        server = client.get_string(</div>
<div><a href="http://addon-4668-latest.xo_TortugadeMexico.activity_TurtleArtActivity.py:133">addon-4668-latest.xo_TortugadeMexico.activity_TurtleArtActivity.py:133</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div>
<div><a href="http://addon-4668-latest.xo_TortugadeMexico.activity_turtleblocks.py:223">addon-4668-latest.xo_TortugadeMexico.activity_turtleblocks.py:223</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div><div>
<a href="http://addon-4682-latest.xo_TurtleFlags.activity_collaboration_neighborhood.py:797">addon-4682-latest.xo_TurtleFlags.activity_collaboration_neighborhood.py:797</a>:        server = client.get_string(</div><div><a href="http://addon-4682-latest.xo_TurtleFlags.activity_TurtleArtActivity.py:140">addon-4682-latest.xo_TurtleFlags.activity_TurtleArtActivity.py:140</a>:            if self.client.get_int(self._HOVER_HELP) == 1:</div>
<div><a href="http://addon-4682-latest.xo_TurtleFlags.activity_turtleflags.py:225">addon-4682-latest.xo_TurtleFlags.activity_turtleflags.py:225</a>:        if self.client.get_int(self._HOVER_HELP) == 1:</div><div><a href="http://addon-4683-latest.xo_IconChange.activity_Widgets.py:45">addon-4683-latest.xo_IconChange.activity_Widgets.py:45</a>:    value = client.get_string(path)</div>
<div><a href="http://addon-4697-latest.xo_WelcomeWeb.activity_activity.py:345">addon-4697-latest.xo_WelcomeWeb.activity_activity.py:345</a>:    face = client.get_string('/desktop/sugar/font/default_face')</div><div>
<a href="http://addon-4697-latest.xo_WelcomeWeb.activity_activity.py:346">addon-4697-latest.xo_WelcomeWeb.activity_activity.py:346</a>:    size = client.get_float('/desktop/sugar/font/default_size')</div></div><div>
<br></div><div>For better analysis or peer review, you can get the files where I found the string gconf/GConf</div><div>here <a href="http://dev.laptop.org/~gonzalo/gconf_use.zip">http://dev.laptop.org/~gonzalo/gconf_use.zip</a></div>
<div><br></div><div>If someone want download all the xo files in aslo, I have a script to do it,</div><div>but would be good discuss with the infrastructure team before we start to do massive downloads.</div><div>Probably there are a better way to do it.</div>
<div><br></div><div>My proposals:</div><div><br></div><div>* Activities should use sugar3.profile get_nick_name() and get_color() methods.</div><div>* Other popular/needed sugar configurations (power mode, speech configurations)should be available as methods in the toolkit.</div>
<div><br></div><div>Gonzalo</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 5:17 PM, Daniel Narvaez <span dir="ltr"><<a href="mailto:dwnarvaez@gmail.com" target="_blank">dwnarvaez@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im">On 26 December 2013 18:17, Daniel Narvaez <span dir="ltr"><<a href="mailto:dwnarvaez@gmail.com" target="_blank">dwnarvaez@gmail.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><div>About activities, there is probably a way to make them ship schemas but I'm wondering what's the advantage for them to use gsettings vs a json or ini file. It feels like added complexity without real advantages.<br>


</div></div></div></div>
</blockquote></div><br></div></div><div class="gmail_extra">Gonzalo pointed out that deployments are using the gconf tools to set stuff like Write font. That''s probably a good use case.<br>Still I hope we can deal with activity specific settings separately in the port (perhaps even a separated GCI task?).<span class="HOEnZb"><font color="#888888"><br clear="all">

</font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br>-- <br>Daniel Narvaez<br>
</div></font></span></div>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br></div>