You need to set embeded to -1 because your GUI isn't embedded in the Control Center window.
That's why you are getting the error.
I've been working on that.
We get the menu bar for "free" when it is launched from the PCC
When launched by itself, it looks the same only with it's own window title and without the menu bar.
To embed it you have to write the window code using mygtk/ugtk instead of perl-gtk.
This may seem hard (what?, I have to learn ANOTHER library) , but its actually pretty easy because mygtk/ugtk are very similar to perl-gtk.
So far, It has only involved:
of 28 linesaddition
of 25 lines
of some code in the main_window subroutineaddition
of 14 lines
I was going to show how to make a entry in the PCC for this, but it seems ongoto beat me to it.
The only thing that I can add is an icon for the entry:
icon => 'ezswitch',
The icon must be placed in /usr/share/mcc/themes/default/ and named ezswitch.png.
Also, I added a line in the code that gives the window an icon.
This icon is placed in the same folder.
Here is the code for the embedded versions of the GUI's:
1st gui link:http://www.box.net/shared/pyl05u8hpv
EDIT: I accidentally removed the license from the file, new version has been uploaded
2nd gui link:http://www.box.net/shared/3aszd5use0
I changed the check list to a radio list in the second gui because a radio list is usually used instead of a checklist when only one option can be selected at a time.
You will get a lot of these when you launch one:
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/libDrakX/ugtk2.pm line 610.
Use of uninitialized value $real_windowwidth in subtraction (-) at /usr/lib/libDrakX/mygtk2.pm line 1221.
As far as i can tell this has no effect on execution and only appears because of the -w (debug) option in the first line.
Also, is this all of our scripts?
Did I miss anything?