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

[AGX <agx@linux.it>] Re: newt-gtk for installation procedure




--- Begin Message ---
In risposta a Adam Di Carlo del 16-Dec-1999 alle 00:55'16" -0500 :
Thanks

> > I would like to know this before to start porting libgringo 
> > to newt and dropping ncurses.
> Not sure... what sort of library do you need?  I mean, libnewt already
> is a library?

My idea is to write one and compile both for console and X-Window.
This is an example from my lib

#include <stdio.h>
#include <gringo.h>

void leave() {
	gringo_Terminate(0);
	fprintf( stderr, "\nTerminated by the user\n" );
}

int main( int argc, char* argv[] ) {

	TObject	*win1, *win2, *win3, *button1;
	gringo_Init( &argc, &argv );

	win1 = (TObject*) window_Create( 2, 18, 76, 5, "Log Window" );
	label_Create( win1,   2,  2,  0, "Rigo 1" );
	label_Create( win1,   3,  2,  0, "Rigo 2" );
	edit_Create(   win1,  2, 15, 20, NULL );
	button1 = (TObject*) button_Create( win1,  3, 50, 20, "Chiudi" );
	button_OnClick( button1, leave );

	win2 = (TObject*) window_Create( 7, 3, 45, 10, "Titolo" );
	window_OnClose( win2, leave );
	label_Create ( win2,  2, 2,  0, "Test Label" );
	edit_Create(   win2,  2, 15, 20, "Edit me !" );
	// grid_Create(   win2,  3, 2, 30, 4 );
	button_Create( win2,  8, 2, 15, "Conferma" );
	button_Create( win2,  8, 22, 15, "Annulla" );

	win3 = (TObject*) window_Create( 60, 5, 14, 10, "Frame" );
	button_Create( win3,  1, 1, 7, "One" );
	button_Create( win3,  2, 1, 7, "Two" );
	button_Create( win3,  3, 1, 7, "Three" );
	button_Create( win3,  4, 1, 7, "Four" );

	gringo_Loop();
	gringo_Quit();

	return 0;
}

... ok ?
And this code run in console if linked to the libgringo-ncurses static lib
or in X-Window if linked against libgringo-gtk.

Also i developed 'gringosh' that interprete a serie of widgets and prepare
a window. When user presses a key or exit the status of the widgets is dumped
to the stderr (like 'dialog' does) and can be interpreted.

This is the example:

#!./gringosh-ncurses -f
# This is a comment
@WINDOW, WINDOW, 1, 10, 60, 10, Window Title
@LABEL,  2, 10, 0, Premi O.K. per chiudere questa finestra
@BUTTON, BUTTON1, 8, 25, 15, O.K.
@GET,    EDITBOX1, 5, 10, 0, Modifica questo testo
# This is a comment
@WINDOW, WINDOW2, 18, 10, 60, 4, Window Title
@LABEL,  1, 10, 0, Premi O.K. per chiudere questa finestra
@BUTTON, BUTTON2, 2, 25, 15, O.K.
@GET,    EDITBOX2, 3, 10, 0, Modifica questo testo

and this is the output:
BUTTON1=0
EDITBOX1="Modifica questo testo"
BUTTON2=1
EDITBOX2="Modifica questo testo"

BUTTON2 is 1 because it have been pressed.



> > place where talk about enhancing the configuration of somethings,
> > like plug'n'pray or soundcards. Is there a person, a ML, or should
> > i contact the mantainer of the appropriate packages ?
> We're very interested in much of that here.
> I guess you might work with the upstream Debain maintainer of the
> right packages, i.e., isapnp pkg or whatever.

For isapnp i have a script that uncomment the first usable configuration
from the output of the pnpdump, i also plan to write an apps that let
you choice between the valid combination of each device

> As for kernel and device and OSS configuration, I really think that a
> debian-only effort is going to be less successful than a linux-wide
> effort.  So I would try the linux kernel list and try to get something
> going.

I don't know. Currently, for soundconfig, i've an app that lets you configure
(no autoprobe) for SB with OPL3 support and it is configured inserting
the code "insmod sb=....." and its dependencie to a script called
	soundblaster.module
scripts *.module are executed by the modified version of /etc/init.d/modules
they accept "start" and "stop" in means to insert and remove the modules.
I know this is not in compliant with the Debian policy, but where is
the appropriate place to discuss such things ?

For boot-disk, last night i look into newt and whiptail, and now i plan
to use them.

Is there is a newt documentation around ? The source is no complicated but there
are some functions i don't understand well.

Last i wuold like to know, if there is some specific things to do / to be done
relative to the debian-bootdisk, whiptail, newt and dinstall.

My best regards,
	Antonio Gallo

--- End Message ---
-- 
.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>

Reply to: