New CORBA interface and client for the Midnight Commander



Hello,

I have just committed an interesting change to the Midnight
Commander.  I rewrote the CORBA code in it and added some new
interfaces and methods.  So now MC supports this:

#include <gnome-factory.idl>

module GNOME {
	module FileManager {
		exception POSIX_ERROR { string errorstr; };

		interface Desktop {
			void rescan ();
			void rescan_devices ();
		};

		interface Window {
			/* not much yet */
			oneway void close ();
		};

		interface WindowFactory : ::GNOME::GenericFactory {
			typedef sequence<Window> WindowSeq;

			/* This is the desktop object */
			readonly attribute Desktop the_desktop;

			Window create_window (in string dir)
				raises (POSIX_ERROR);
			void rescan_directory (in string dir);
			void close_invalid_windows ();
			WindowSeq get_windows_by_directory (in string dir);
		};
	};
};

So you can tell MC to do interesting things via CORBA.

I also wrote a little program that you can run from the command line
and pass it arguments to invoke some of these methods.  Right now it
supports

        [--create-window=DIRECTORY]
        [--rescan-directory=DIRECTORY] 
	[--rescan-desktop]
        [--rescan-desktop-devices]
	[--close-invalid-windows]

So you can call it like

	gmc-client --rescan-desktop

and it will rescan the desktop.  This lets you do magic like create
desktop links from a shell script and tell MC to update the desktop as
appropriate.

This is still somewhat experimental and may bomb in some situations,
but it is being addressed.

Have fun,

  Federico



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]