<div dir="ltr"><div><div><div><div>Thanks this awesome.<br><br>It seems these can be split in<br><br></div>1 Sugar settings. /desktop/sugar/...<br></div>2 Activity setting. /apps/...<br><br></div>For the all keys in group 1, I think we to keep setting them for a while both in gconf and in gsettings. They are API and just breaking it would be bad. We should deprecate them now and remove them later. I think Gonzalo suggestion to have python methods to access the most common might be a good idea, but IMO it's not sufficient and not necessary for the plain port (other GCI task?).<br>
<br></div>About group 2, I think we should figure out what it would take to make gsettings schemas work for activities. Then it will be easier to discuss if we want that to be our suggested way to store settings for activities. I don't think it should block porting the sugar core to gsettings though, it's another step (and perhaps another GCI task).<br>
<div><div><div><div><div><div><br></div><div>I think it's important to document what activity authors should be doing here (once we figured it out exactly). Perhaps that's something we should put in sugar-docs? We have no python activities documentation there yet, but if we never start...<br>
</div><div><br><div class="gmail_extra"><div class="gmail_quote">On 26 December 2013 21:00, Gonzalo Odiard <span dir="ltr"><<a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</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">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:96</a>:<span style="white-space:pre-wrap"> </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" target="_blank">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:97</a>:<span style="white-space:pre-wrap"> </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" target="_blank">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:98</a>:<span style="white-space:pre-wrap"> </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" target="_blank">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:109</a>:<span style="white-space:pre-wrap"> </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" target="_blank">addon-4078-latest.xo_Labyrinth.activity_src_Browser.py:110</a>:<span style="white-space:pre-wrap"> </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" target="_blank">addon-4078-latest.xo_Labyrinth.activity_src_MainWindow.py:221</a>:<span style="white-space:pre-wrap"> </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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">addon-4363-latest.xo_Mirage.activity_mirage.py:698</a>:<span style="white-space:pre-wrap"> </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" target="_blank">addon-4363-latest.xo_Mirage.activity_pippy_app.py:700</a>:<span style="white-space:pre-wrap"> </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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>Gonzalo</div><div><br></div><div><br></div><div><br></div><div><br></div></font></span></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">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>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>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><font color="#888888"><br clear="all">
</font></span></div><span><font color="#888888"><div class="gmail_extra"><br>-- <br>Daniel Narvaez<br>
</div></font></span></div>
<br></div></div><div class="im">_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">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></div></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br>Daniel Narvaez<br>
</div></div></div></div></div></div></div></div>