{"id":9,"date":"2006-03-30T18:54:14","date_gmt":"2006-03-30T17:54:14","guid":{"rendered":"http:\/\/blogs.igalia.com\/itoral\/?p=9"},"modified":"2006-03-30T18:54:14","modified_gmt":"2006-03-30T17:54:14","slug":"adding-dbus-support-to-gedit","status":"publish","type":"post","link":"https:\/\/blogs.igalia.com\/itoral\/2006\/03\/30\/adding-dbus-support-to-gedit\/","title":{"rendered":"Adding Dbus support to Gedit"},"content":{"rendered":"<p>At this moment, when you start a second <em>Gedit<\/em> process , it opens a new tab in your current <em>Gedit<\/em> window instead of creating a new one. This behaviour has been added from scratch in <em>Gedit<\/em> using the so called <em>bacon-message<\/em>, developed by them.<\/p>\n<p>Today I&#8217;ve started working on the replacement of <em>bacon-message<\/em> stuff of <em>Gedit<\/em> with <em>Dbus.<\/em>\u00a0 I started by creating a <em>GObject<\/em> that contains all the <em>Dbus<\/em> related behaviour.<\/p>\n<p>My first problem was that I needed to know if the current <em>Gedit<\/em> process is a server (first <em>Gedit<\/em>\u00a0 process in the user session) or a client (not\u00a0 the first). To solve this issue I had to check the result of the <em>org_freedesktop_DBus_request_name<\/em> function (which tries to register the <em>Dbus<\/em> service name). The tricky part was to find the set of result <em>#defines<\/em> and examine their behaviour depending on the flags you use when requesting the name.<br \/>\nOnce I&#8217;ve solved this issue, it was not too dificult to finish this <em>Dbus<\/em> object, and at this moment I have tested <em>Dbus<\/em> setup inside <em>Gedit<\/em> and it seems to be working fine :).<\/p>\n<p>Next time I&#8217;ll start replacing <em>bacon-message<\/em> stuff in gedit.c main with my brand new <em>Dbus<\/em> stuff. Let&#8217;s see how it works \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At this moment, when you start a second Gedit process , it opens a new tab in your current Gedit window instead of creating a new one. This behaviour has been added from scratch in Gedit using the so called bacon-message, developed by them. Today I&#8217;ve started working on the replacement of bacon-message stuff of &hellip; <a href=\"https:\/\/blogs.igalia.com\/itoral\/2006\/03\/30\/adding-dbus-support-to-gedit\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Adding Dbus support to Gedit&#8221;<\/span><\/a><\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":0,"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/media?parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/categories?post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.igalia.com\/itoral\/wp-json\/wp\/v2\/tags?post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}