Newbie message-wait window



Hi, Im a newbie developer. I just want a window which raises, wait 10
seconds, closes and finishes cleanly. I copied this code, but it neither
finishes cleanly. Could somebody help me? 

* Which would be the code additions for waiting 10 seconds and ending 
cleanly?

// Code -------------------------------------
#include <gnome.h>
#define VERSION "1.0"
                                                                                                                                           void hell_over(void) {
  gtk_main_quit();
}
                                                                                                                                           int main(int argc, char *argv[]) {
  GtkWidget *window;
  gnome_init("msgbox", VERSION, argc, argv);
  window = gnome_app_new("msgbox", "Messagebox");
  char *err = g_strdup_printf(_(argv[1]));
  gnome_app_warning(GNOME_APP(window),err);
  g_free(err);
  gtk_main();
  return 0;
}
//-------------------------------------


Thanks a lot!


-- 
Rodolfo Alcazar
Newbie
CC=gcc
CFLAGS := -Wall $(shell gnome-config --cflags gnomeui)
LINK := $(CC) $(shell gnome-config --libs gnomeui)
all: msgbox
msgbox: msgbox.o
	$(LINK) -o $@ $<
msgbox.o: msgbox.c
	$(CC) $(CFLAGS) -c -o $@ $<
#include <gnome.h>
#define VERSION "1.0"

void hell_over(void) {
  gtk_main_quit();
}


int main(int argc, char *argv[]) {
  GtkWidget *window;
  gnome_init("msgbox", VERSION, argc, argv);
  window = gnome_app_new("msgbox", "Messagebox");
  char *err = g_strdup_printf(_(argv[1]));
  gnome_app_warning(GNOME_APP(window),err); 
  g_free(err);

  gtk_main();

  return 0;
}


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