Beispiel #1
0
 public AppletProxy(IApplet proxy)
 {
     _proxy = proxy;
 }
	private void _connect_to_dock ()
	{
		DBus.BusG.Init();
		DBus.Bus bus = DBus.Bus.Session;
		this.icon = bus.GetObject<IApplet> ("org.cairodock.CairoDock", new ObjectPath (this.cBusPath));
		this.icon.on_click 			+= new OnClickEvent (on_click);
		this.icon.on_middle_click 	+= new OnMiddleClickEvent (on_middle_click);
		this.icon.on_scroll 		+= new OnScrollEvent (on_scroll);
		this.icon.on_build_menu 	+= new OnBuildMenuEvent (_on_build_menu);
		this.icon.on_menu_select 	+= new OnMenuSelectEvent (_on_menu_select);
		this.icon.on_drop_data 		+= new OnDropDataEvent (on_drop_data);
		this.icon.on_answer 		+= new OnAnswerEvent (on_answer);
		this.icon.on_answer_dialog 	+= new OnAnswerDialogEvent (on_answer_dialog);
		this.icon._on_stop 			+= new OnStopModuleEvent (_on_stop);
		this.icon._on_reload 		+= new OnReloadModuleEvent (_on_reload);
		
		this.sub_icons = bus.GetObject<ISubApplet>("org.cairodock.CairoDock", new ObjectPath(this.cBusPath + "/sub_icons"));
		this.sub_icons.on_click_sub_icon			+= new OnClickSubIconEvent (on_click_sub_icon);
		this.sub_icons.on_middle_click_sub_icon 	+= new OnMiddleClickSubIconEvent (on_middle_click_sub_icon);
		this.sub_icons.on_scroll_sub_icon 		+= new OnScrollSubIconEvent (on_scroll_sub_icon);
		this.sub_icons.on_build_menu_sub_icon 	+= new OnBuildMenuSubIconEvent (_on_build_menu_sub_icon);
		this.sub_icons.on_menu_select_sub_icon 	+= new OnMenuSelectSubIconEvent (on_menu_select_sub_icon);
		this.sub_icons.on_drop_data_sub_icon 	+= new OnDropDataSubIconEvent (on_drop_data_sub_icon);
		this.sub_icons.on_answer_sub_icon 		+= new OnAnswerSubIconEvent (on_answer_sub_icon);
	}