LinuxMCE Forums
May 26, 2013, 06:26:43 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: Simple pop-up dialogue - is this the right approach  (Read 760 times)
mhwombat
Making baby steps

Posts: 2


View Profile
« on: November 06, 2008, 08:55:41 pm »

Caveat: I am totally new to LinuxMCE, although I have used Linux for years.

When a USB drive is plugged in, my client wants LinuxMCE to automatically check if it contains audio or video, and if so, display a dialogue asking the user if they want to copy the content. (Perhaps there is a way to just configure MCE to do this; if so, I would appreciate a link.) I have read wiki pages until my eyes are blurry, and I think this is what I have to do. Can someone tell me if I am on the right track?

Create a device or plug-in that will:
Tell the DCE router that it wants to be notified when a USB drive is plugged in - RegisterMsgInterceptor
Display the dialogue box.
If the user requests that the media be copied, send a message to some other device (via the DCE router) to tell it to start ripping.

...and I have to develop the dialogue box on a windows (ugh!) machine using HADesigner.

Originally I thought I would add some code to the hotplug scripts to launch a simple script to display the dialogue box and and launch the copy script/application if needed. But I have a feeling that might not play well with MCE.
Logged
bulek
Administrator
wants to work for LinuxMCE
*****
Posts: 868

Living with LMCE


View Profile
« Reply #1 on: November 06, 2008, 10:50:34 pm »

Hi,

I cannot help you fully, but I think that there are two advices welcome on start :
- everything under LMCE is Data,Command Event (DCE) - you can try to sniff logs when dialogues you're trying to reproduce happen
- I think there is possibility to start popup screen with question and two buttons - try on wiki and in logs ...

HTH,

regards,

Bulek.
Logged

Thanks in advance,

regards,

Bulek.
mhwombat
Making baby steps

Posts: 2


View Profile
« Reply #2 on: November 09, 2008, 02:30:21 pm »

It seems that the easiest way to create this plug-in is to use the DCEGen tool, which will create a class with stubs for the stuff I need to implement. Does that make sense, or have I misunderstood the purpose of DCEGen?



Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #3 on: November 10, 2008, 03:23:59 pm »

Correct.

-Thom
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!