On Tue, 2007-08-14 at 17:15 -0500, Diego Escalante Urrelo wrote: > On 8/14/07, Rodrigo Moya <[EMAIL PROTECTED]> wrote: > > > > On Mon, 2007-08-13 at 21:01 +0100, Alex Jones wrote: > > > (It seems some of my mail is going missing. This will screw up the > > > threading but whatever.) > > > > > > Rodrigo Moya wrote: > > > > On Fri, 2007-08-10 at 17:45 +0100, Alex Jones wrote: > > > > > Hi list > > > > > > > > > > the org.gnome.Application DBus interface provides a way for > > > > applications > > > > > to expose common application functionality in a standardised way. > > > > > > > > > sounds pretty good... it would indeed be very useful to start using > > > > this > > > > for apps to export actions, so, what about adding a: > > > > > > > > InvokeAction (action_name, arguments) > > > > > > > > method? That way, we could use this interface for calling actions (not > > > > based on (complicated) URIs) on the app. Rhythmbox could just have > > > > several actions, like Play/Pause/Volume up-down/etc > > > > > > > > That would be very useful (as we tried to do on the CORBA days) for > > > > automation > > > > > > Actually what is a better solution here is to use a different interface, > > > such as the common media player interface described here: > > > <http://wiki.xmms2.xmms.se/index.php/Media_Player_Interfaces>. That way, > > > making Rhythmbox "pause" becomes a case of calling > > > (org.gnome.MediaPlayer).Pause() rather than > > > (org.gnome.Application).InvokeAction("Pause") > > > > > yeah, might be better, but in this case you will end up with lots of > > interfaces. Think when apps start doing heavy use of this, to > > communicate with app A you need the A interface, the B interface for app > > B, etc. > > > > For the most common cases (media player, file manager), of course it > > might make sense, but I was thinking of this as a way to invoke actions > > on *all* apps (that support it, of course), rather than just a media > > player or some specific app. > > (Just thinking out loud, correct me if I'm wrong) > > It's like having: > set_size > get_size > set_text > get_text > set_whatever > get_whatever > ... > > VS > > set_prop > get_prop > > You can do your life easier with the _prop combo, like: > set_prop(prop_var, prop_val) > > In my humble understanding, that's easier to code and understand than: > set_$(prop_var)(prop_val) > > I would say go go InvokeAction. > cool, I'm not alone :-)
Although I'm thinking that we might need also a ListActions method, to retrieve the list of actions supported by the application. -- Rodrigo Moya <[EMAIL PROTECTED]> _______________________________________________ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list