ok, I guess I am dumb, but I can not figure this out. :-(



Here's the simple source code consisting of only one file main.c. It does,
however, require any kind of a xpm file to be available for its execution.
Anyhow, I am greatly thankfull for all your efforts to help me in this
issue, but I guess I am just too dumb to get it. Here's the source code of
that file that is giving me a headache. Obviously, any help would be greatly
appreciated. Thank you!

Ivica Bukvic
ico fuse net

/*
 * Initial main.c file generated by Glade. Edit as required.
 * Glade will not overwrite this file.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gnome.h>

int
main (int argc, char *argv[])
{
  GtkWidget *window1;
  GtkWidget *pixmap1;
  GtkPixmap *pixmapdata;

#ifdef ENABLE_NLS
  bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
  textdomain (PACKAGE);
#endif

  gnome_init ("shit", VERSION, argc, argv);

  /*
   * The following code was added by Glade to create one of each component
   * (except popup menus), just so that you see something after building
   * the project. Delete any components that you don't want shown initially.
   */

  window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_object_set_data (GTK_OBJECT (window1), "window1", window1);
  gtk_window_set_title (GTK_WINDOW (window1), _("window1"));

  //pixmap1 = create_pixmap (window1, NULL, FALSE);
  //gtk_widget_ref (pixmap1);
  //gtk_object_set_data_full (GTK_OBJECT (window1), "pixmap1", pixmap1,
  //                          (GtkDestroyNotify) gtk_widget_unref);


  gtk_widget_show (window1);


  gtk_widget_realize(window1);

  //gtk_container_add (GTK_CONTAINER (window1), pixmap1);

  pixmapdata = gdk_pixmap_create_from_xpm (window1->window, NULL, NULL,
"four.xpm");
  pixmap1 = gtk_pixmap_new (pixmapdata, NULL);

  gtk_widget_show (pixmap1);


  gtk_main ();
  return 0;
}






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