{"id":2739,"date":"2011-09-01T14:00:08","date_gmt":"2011-09-01T12:00:08","guid":{"rendered":"http:\/\/blogs.wittwer.fr\/whiler\/?p=2739"},"modified":"2012-03-03T04:42:08","modified_gmt":"2012-03-03T03:42:08","slug":"wgoogleplus","status":"publish","type":"post","link":"https:\/\/blogs.wittwer.fr\/whiler\/2011\/09\/01\/wgoogleplus\/","title":{"rendered":"wGoogle+"},"content":{"rendered":"<p>Google n&rsquo;a pas encore publi\u00e9 d'<a href=\"http:\/\/fr.wikipedia.org\/wiki\/Interface_de_programmation\" rel=\"glossary\" target=\"_blank\" title=\"Wikipedia, D&eacute;finition de&nbsp;: API\" style=\"\" >API<\/a><sup style=\"font-family: Georgia, Times New Roman, Serif; font-weight: bold; color: #AAAAAA\" ><em>W<\/em><\/sup> pour acc\u00e9der aux flux de <a href=\"https:\/\/plus.google.com\/\" title=\"Google+\" target=\"_blank\">Google+<\/a>.<br \/>\nDe plus, parmi la <a href=\"\/whiler\/wp-content\/uploads\/2011\/09\/g+_notifications.jpg\" title=\"Notification Google+\">liste des notifications<\/a> pr\u00e9vues par Google, il n&rsquo;est pas possible d&rsquo;\u00eatre pr\u00e9venu lorsqu&rsquo;un nouvel article dont on n&rsquo;est pas <strong>sp\u00e9cifiquement<\/strong> destinataire est publi\u00e9. Appartenir \u00e0 un cercle sp\u00e9cifi\u00e9 pour un partage n&rsquo;est pas suffisant&#8230; le seul cas o\u00f9 on est pr\u00e9venu est lorsque l&rsquo;utilisateur lui-m\u00eame est ajout\u00e9.<\/p>\n<p>Alors, pour rem\u00e9dier \u00e0 cela, et pour jouer &#038; tester un composant Delphi OpenSource, <code class=\"codecolorer delphi dawn\"><span class=\"delphi\">TChromium<\/span><\/code>, je me suis rapidement cr\u00e9\u00e9 une petite application, <a href=\"https:\/\/www.whiler.com\/freewares\/download?wgp.zip\" title=\"T\u00e9l\u00e9charger wG+\">wG+<\/a>.<br \/>\n<div id=\"attachment_2742\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"\/whiler\/wp-content\/uploads\/2011\/09\/wg+.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2742\" src=\"\/whiler\/wp-content\/uploads\/2011\/09\/wg+-300x177.jpg\" alt=\"wGoogle+\" title=\"wGoogle+\" width=\"300\" height=\"177\" class=\"size-medium wp-image-2742\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/09\/wg+-300x177.jpg 300w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/09\/wg+.jpg 651w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-2742\" class=\"wp-caption-text\">wGoogle+<\/p><\/div><\/p>\n<p><!--more--><br \/>\nJ&rsquo;ai donc commenc\u00e9 par t\u00e9l\u00e9charger les fichiers n\u00e9cessaires pour int\u00e9grer ce navigateur, <a href=\"https:\/\/code.google.com\/p\/delphichromiumembedded\/\" title=\"Delphi Chromium Embedded\" target=\"_blank\">TChromium<\/a>.<br \/>\nAjout\u00e9 des ic\u00f4nes dans la zone de notification, que j&rsquo;anime lorsque l&rsquo;heure du premier message du flux change. Pour d\u00e9tecter les changements, j&rsquo;ai utilis\u00e9 une expression r\u00e9guli\u00e8re&nbsp;:<\/p>\n<div class=\"codecolorer-container delphi dawn\" style=\"overflow:auto;white-space:nowrap;width:480px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/><\/div><\/td><td><div class=\"delphi codecolorer\"><span class=\"kw1\">var<\/span><br \/>\n&nbsp; mainFrame<span class=\"sy1\">:<\/span> ICefFrame<span class=\"sy1\">;<\/span><br \/>\n&nbsp; source &nbsp; <span class=\"sy1\">:<\/span> ustring<span class=\"sy1\">;<\/span><br \/>\n&nbsp; reFirst &nbsp;<span class=\"sy1\">:<\/span> TRegEx<span class=\"sy1\">;<\/span><br \/>\n&nbsp; mFirst &nbsp; <span class=\"sy1\">:<\/span> TMatch<span class=\"sy1\">;<\/span><br \/>\n&nbsp; sCurrent <span class=\"sy1\">:<\/span> <span class=\"kw4\">string<\/span><span class=\"sy1\">;<\/span><br \/>\n<span class=\"kw1\">begin<\/span><br \/>\n&nbsp; &nbsp; &nbsp; mainFrame <span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> chrmGooglePlus<span class=\"sy1\">.<\/span><span class=\"me1\">Browser<\/span><span class=\"sy1\">.<\/span><span class=\"me1\">MainFrame<\/span><span class=\"sy1\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; source &nbsp; &nbsp;<span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> mainFrame<span class=\"sy1\">.<\/span><span class=\"me1\">Source<\/span><span class=\"sy1\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; reFirst &nbsp; <span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> TRegEx<span class=\"sy1\">.<\/span><span class=\"me1\">Create<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'(\\d\\d):(\\d\\d)&lt;\/a&gt;&lt;\/span&gt; &amp;nbsp;-&amp;nbsp; &lt;'<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy1\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; mFirst &nbsp; &nbsp;<span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> reFirst<span class=\"sy1\">.<\/span><span class=\"me1\">Match<\/span><span class=\"br0\">&#40;<\/span>source<span class=\"br0\">&#41;<\/span><span class=\"sy1\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>mFirst<span class=\"sy1\">.<\/span><span class=\"me1\">Success<\/span> <span class=\"kw1\">and<\/span> <span class=\"br0\">&#40;<\/span>mFirst<span class=\"sy1\">.<\/span><span class=\"me1\">Groups<\/span><span class=\"sy1\">.<\/span><span class=\"me1\">Count<\/span> <span class=\"sy3\">=<\/span> <span class=\"nu0\">3<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"kw1\">begin<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; sCurrent <span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> mFirst<span class=\"sy1\">.<\/span><span class=\"me1\">Groups<\/span><span class=\"br0\">&#91;<\/span><span class=\"nu0\">1<\/span><span class=\"br0\">&#93;<\/span><span class=\"sy1\">.<\/span><span class=\"me1\">Value<\/span> <span class=\"sy3\">+<\/span> <span class=\"st0\">':'<\/span> <span class=\"sy3\">+<\/span> mFirst<span class=\"sy1\">.<\/span><span class=\"me1\">Groups<\/span><span class=\"br0\">&#91;<\/span><span class=\"nu0\">2<\/span><span class=\"br0\">&#93;<\/span><span class=\"sy1\">.<\/span><span class=\"me1\">Value<\/span><span class=\"sy1\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>sCurrent &lt;&gt; sLastTime<span class=\"br0\">&#41;<\/span> <span class=\"kw1\">then<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Afin de g\u00e9rer les cookies, j&rsquo;ai contact\u00e9 le <a href=\"https:\/\/groups.google.com\/group\/delphichromiumembedded\/browse_thread\/thread\/9276913f5714fdd7\" title=\"Le thread o\u00f9 j'ai eu ma r\u00e9ponse...\" target=\"_blank\">support du composant<\/a> et j&rsquo;ai tr\u00e8s rapidement eu une r\u00e9ponse <img src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-includes\/images\/smilies\/skype\/\/yes.gif\" alt=\"(y)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n<div class=\"codecolorer-container delphi dawn\" style=\"overflow:auto;white-space:nowrap;width:480px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/><\/div><\/td><td><div class=\"delphi codecolorer\">&nbsp; CefCache <span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> cache<span class=\"sy1\">;<\/span><br \/>\n<br \/>\n&nbsp; chrmGooglePlus <span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> TChromium<span class=\"sy1\">.<\/span><span class=\"me1\">Create<\/span><span class=\"br0\">&#40;<\/span><span class=\"kw2\">Self<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy1\">;<\/span><br \/>\n&nbsp; chrmGooglePlus<span class=\"sy1\">.<\/span><span class=\"me1\">Parent<\/span> <span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> pnlBrowser<span class=\"sy1\">;<\/span><br \/>\n&nbsp; chrmGooglePlus<span class=\"sy1\">.<\/span><span class=\"me1\">Align<\/span> &nbsp;<span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> alClient<span class=\"sy1\">;<\/span><br \/>\n&nbsp; chrmGooglePlus<span class=\"sy1\">.<\/span><span class=\"me1\">OnLoadEnd<\/span> <span class=\"sy1\">:<\/span><span class=\"sy3\">=<\/span> chrmGooglePlusLoadEnd<span class=\"sy1\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>En attendant cette API et toutes les applications ou options qui permettront de faire cela encore mieux, je peux utiliser cette application afin d&rsquo;\u00eatre averti des nouveaux messages sur mon flux&#8230;<br \/>\nLorsque j&rsquo;ai de nouvelles id\u00e9es, et du temps, je les ajoute \u00e0 l&rsquo;application. Celle-ci a besoin de DLL pour faire tourner le navigateur embarqu\u00e9. Une fois que vous avez <a href=\"https:\/\/www.whiler.com\/freewares\/download?wgp.zip\" title=\"T\u00e9l\u00e9charger l'archive avec tous les fichiers\">t\u00e9l\u00e9charg\u00e9 l&rsquo;archive<\/a> contenant tous les fichiers, vous pouvez vous contenter de <a href=\"https:\/\/www.whiler.com\/freewares\/download?wgp.exe\" title=\"T\u00e9l\u00e9charger uniquement wgp.exe\">t\u00e9l\u00e9charger l&rsquo;ex\u00e9cutable<\/a> <img src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-includes\/images\/smilies\/skype\/\/wink.gif\" alt=\";)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n<p><center><a href=\"\/whiler\/category\/computer\/delphi\/\" title=\"Articles concernant Delphi\"><img loading=\"lazy\" decoding=\"async\" src=\"\/whiler\/wp-content\/uploads\/2009\/10\/built_with_delphi.png\" alt=\"D\u00e9velopp\u00e9 en Delphi\" title=\"D\u00e9velopp\u00e9 en Delphi\" width=\"125\" height=\"51\" class=\"size-full wp-image-2721\" \/><\/a><\/center><\/p>\n<div class=\"thanks_button_div\" \n                  style=\"float: right; margin-right: 10px; margin-top:10px;\"><div id=\"thanksButtonDiv_2739_1\" style=\"background-image:url(https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/plugins\/thanks-you-counter-button\/images\/thanks_compact_brown1.png); background-repeat:no-repeat; float: left; display: inline;\"\n                onmouseover=\"javascript:thankYouChangeButtonImage('thanksButtonDiv_2739_1', true);\" \n                onmouseout=\"javascript:thankYouChangeButtonImage('thanksButtonDiv_2739_1', false);\"\n                onclick=\"javascript:thankYouChangeButtonImage('thanksButtonDiv_2739_1', false);\" >\n                <input type=\"button\" onclick=\"thankYouButtonClick(2739, 'You left &ldquo;Thanks&rdquo; already for this post')\" value=\"Merci\u00a0 1\"\n                  class=\"thanks_button thanks_compact thanks_brown1\"\n                  style=\"  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#00f;\"\n                  id=\"thanksButton_2739_1\" title=\"Click to leave &ldquo;Thanks&rdquo; for this post\"\/>\n             <\/div><div id=\"ajax_loader_2739_1\" style=\"display:inline;visibility: hidden;\"><img decoding=\"async\" alt=\"ajax loader\" src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/plugins\/thanks-you-counter-button\/images\/ajax-loader.gif\" \/><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Google n\u2019a pas encore publi\u00e9 d\u2019API pour acc\u00e9der aux flux de Google+.<br \/>\nDe plus, parmi la liste des notifications pr\u00e9vues par Google, il n\u2019est pas possible d\u2019\u00eatre pr\u00e9venu lorsqu\u2019un nouvel article dont on n\u2019est pas sp\u00e9cifiquement destinataire est publi\u00e9. Appartenir \u00e0 un cercle sp\u00e9cifi\u00e9 pour un partage n\u2019est pas suffisant\u2026 le seul cas o\u00f9 on est pr\u00e9venu est lorsque l\u2019utilisateur lui-m\u00eame est ajout\u00e9.<\/p>\n<p>Alors, pour rem\u00e9dier \u00e0 cela, et pour jouer &#038; tester un composant Delphi OpenSource, TChromium, je me suis rapidement cr\u00e9\u00e9 une petite application, wG+&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[7],"tags":[27,154,157,108],"class_list":["post-2739","post","type-post","status-publish","format-standard","hentry","category-delphi","tag-coloration-syntaxique","tag-delphi","tag-google","tag-script"],"_links":{"self":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts\/2739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/comments?post=2739"}],"version-history":[{"count":0,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts\/2739\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/media?parent=2739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/categories?post=2739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/tags?post=2739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}