Debarshi's den

Archive for the ‘Freedesktop.org’ Category

Thanking every contributor

with 4 comments

I am of the opinion that every contributor to a free software project should be thanked. No matter how prolific or sporadic. There are many ways to do it — having a section in the release notes is one common example, the AUTHORS file is another, or if it is a program with a graphical user interface of its own then the about dialog is a very good option. In fact, the about dialog is the best option because it is more persistent than the release notes (ie. does not change from one release to another), and is shinier than a plain AUTHORS file. Not to mention the fact that it is much more visible.

However, it is a pain. While there are scripts lying around to generate the credits for the release notes, I have not seen the same for the about dialog. No doubt it is outdated in every application, which is a shame.

We can do better. For Photos, I decided to generate the list from Git. First I generate an AUTHORS file, and then use it to create a pair of C header and source files which contain the array of strings that can be fed to gtk_about_dialog_set_authors. From now on every new contributor will see her name show up in the about dialog immediately after making her first commit.

It would be nice if this caught on and other application maintainers decided to do something similar.

Written by Debarshi Ray

16 August, 2012 at 22:43

Telepathy Idle: implementing Connection.Interface.ContactInfo

leave a comment »

Connection.Interface.ContactInfo is an interface for requesting information about a contact on a given connection. Or in IRC parlance, Telepathy clients need this interface for displaying the WHOIS information. This interface was not implemented in Idle, which prevented Empathy and friends from offering the /whois command to the user.

However, this is going to change with the upcoming release of Telepathy Idle 0.1.10.

Clients should invoke the RequestContactInfo method on the ContactInfo interface and pass the handle of the target nick. In return they will receive a list of Contact_Info_Fields, where each field is modelled on a single vCard field as defined in RFC 2426. However, due to the quirky nature of IRC and to fit in all the little variations implemented by the different IRC daemons, Idle uses quite a few non-standard fields.

Here is a brief explanation of each field as used by Idle:

  • fn: The contact’s full name returned by the RPL_WHOISUSER or 311 numeric as defined in RFC 2812.
  • nickname: The account name of the target nick. On Freenode, a user’s account name and primary nick are the same. This field is only present if the nick has identified itself to the server.
  • x-host: The value can have more than one component. The first component is the hostname from which the nick is connected to the server, and the optional second component is the IP address. This field is only present if the user had issued a WHOIS against her own nick.
  • x-idle-time: The number of seconds for which the contact has been idle returned by the RPL_WHOISIDLE or 317 numeric defined in RFC 2812.
  • x-irc-channel: There can be multiple occurrences of this field. Each field specifies a channel that the user is present in. Any special role played by the user in a channel will be indicated by vCard field parameters. eg., ‘role=@’ or ‘role=+’ to show that the user is a channel operator or has been granted permission to speak on a moderated channel respectively. This information is obtained from the RPL_WHOISCHANNELS or 319 numeric defined in RFC 2812.
  • x-irc-operator: True, if the nick is an IRC operator as returned by the RPL_WHOISOPERATOR or 313 numeric defined in RFC 2812. Please note that channel operators are not the same as IRC operators.
  • x-irc-registered-nick: True, if the nick has been registered. This is related to the nickname field in that every registered nick might not have a nickname but the opposite is true.
  • x-irc-secure-connection: True. if the nick is connected to its server over a secure connection.
  • x-irc-server: The value has two components. The first is the hostname of the server to which the target nick is connected and the second is some information about the server. This information is obtained from the RPL_WHOISSERVER or 312 numeric defined in RFC 2812.
  • x-presence-status-identifier: Value is “away” if the user has set an away message, otherwise it is “available”. This is meant as a well-known string identifier for the x-presence-type values as specified in Connection.Interface.SimplePresence.
  • x-presence-status-message: The away message set by the user returned by the RPL_AWAY or 301 numeric as defined in RFC 2812.
  • x-presence-type: Modelled on Connection_Presence_Type, the value is ’3′ if the user has set an away message, otherwise it is ’2′.

Here is a complete vCard returned by RequestContactInfo in Python-like syntax:

[ ('fn', [], ['Debarshi Ray']),
  ('x-irc-channel', [], ['#glug-nith']),
  ('x-irc-channel', ['role=@'], ['#solang']),
  ('x-irc-channel', [], ['#telepathy']),
  ('x-irc-server', [], ['lindbohm.freenode.net', 'Stockholm, Sweden']),
  ('x-irc-secure-connection', [], ['true']),
  ('x-idle-time', [], ['42']),
  ('nickname', [], ['debarshi']),
  ('x-presence-type', [], ['2']),
  ('x-presence-status-identifier', [], ['available']),
  ('x-presence-status-message', [], ['']),
  ('x-irc-operator', [], ['false']),
  ('x-irc-registered-nick', [], ['true'])
]

Written by Debarshi Ray

10 May, 2011 at 17:58

Yay! Yay! Yay!

with one comment

I just got my freedesktop.org account — debarshir.

Many thanks to all involved, especially the Telepathy reviewers (wjt, sjoerd, cassidy, etc.).

Written by Debarshi Ray

19 April, 2011 at 15:41

Follow

Get every new post delivered to your Inbox.

Join 26 other followers