glade[Glade-users] Calling external executables and linking the widgets in an appln.

Maneesha Nunes <mnunes phil com sg> writes:

   I have created a simple window with a single button in it and I have
  also created a dialog box.My aim is that when you click on the button
  the dialog box should appear. How should i do this , I have tried adding
  the signal- clicked , the handler- gtk_widget_show and in the object
  field I give the name of the dialog box,all of this I specify in the
  signal properties of the button but when I make/compile the application
  It says that
  the dialog-name is not declared in interface.c.(first use in this

If I understand correctly you need to add code in the callback
function to display the new dialog.

  Is there a way we specify variables in glade, like in Vb how we define
  member variables and use them across widgets.

widgets have a user defined data field you could use.  you could also
just use some global variables in the program.

  Also Based on the input entered I need to call an external executable.
  Is it Possible ???? If Not any other gui- interface builder that can
  help me out.

Here's some code I use in callbacks.c to launch gedit:

const char *ProgramName="/usr/bin/gedit";

on_BtnEdit_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
  char *argv[4];

  if (*ReportFileName) {

    argv[0]=(char *) ProgramName;

    if (!fork()) {

  Also any documentation/tutorial on Glade I have searched the web and
  gone through archives but am still lost.

I haven't found much on glade.  there is a tutorial on the glade
site.  plus the site has the docs for the gtk calls.


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