cygwin gtk+ eclipse on windows Gtk-WARNING cannot open display

2010-06-21 Thread newusergtk+

Hello, i installed cygwin, gtk+(available with cygwin) and eclipse on Windows
xp.

I'm trying to run a simple gtk+ application available on the site
www.gtk.org .

I have been able to compile my gtk+ program using Eclipse without errors but
when I run it the console says Gtk-WARNING **: cannot open display: and
hence my application does not display. 
Can anyone point me in the right direction?

Thanks very much,
Loredana:D 
-- 
View this message in context: 
http://old.nabble.com/cygwin-gtk%2B--eclipse-on-windows-Gtk-WARNING-cannot-open-display-tp28949244p28949244.html
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: cygwin gtk+ eclipse on windows Gtk-WARNING cannot open display

2010-06-21 Thread Tor Lillqvist
 Hello, i installed cygwin, gtk+(available with cygwin) and eclipse on Windows 
 xp.
  Gtk-WARNING **: cannot open display:

Are you aware that the GTK+ for Cygwin is built with the X11 backend,
i.e. software that uses it requires an X server (also know as
display)? (Either running on the same machine, or remotely.) (Also
note that Cygwin is really a separate Unix-style operating system that
just happens to run on top of Windows.)

Is that really what you want? If not, forget GTK+ on Cygwin and just
use GTK+ on Windows instead. Be very careful not to confuse and mix
Cygwin libraries and Windows libraries when building something.

Is the Eclipse you are using also a Cygwin one?

If your intention is not to build software that runs on Cygwin and
requires an X display, I would suggest you avoid Cygwin completely.

Instead just install the MinGW compiler, and use that from Eclipse.
For GTK+ on Windows, the simplest is to download the bundle from
http://www.gtk.org/download-windows.html and then run pkg-config to
get the appropriate compiler flags to pass the compiler from Eclipse.
I can't help you more with that, I don't use Eclipse.

In fact, I would suggest that you first learn how to build GTK+
software directly from the command line without letting Eclipse hide
what is really happening... but this is just my personal opinion. As a
command-line environment I then suggest using MSYS and its bash shell.

MinGW and MSYS are available from www.mingw.org.

--tml
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkIconView items

2010-06-21 Thread Alexander Kuleshov
Hello,

I have a gtkiconview in my C/gtk+ application. In this GtkIconView i
load images from GList like thumbnails. How can i get selecting item
in this GtkIconView? I try so:


g_signal_connect(mw-view,selection-changed,G_CALLBACK(thumbnail_selected),mw);



void thumbnail_selected(GtkWidget* widget, MainWin* mw)
{
   GList* list = gtk_icon_view_get_selected_items(mw-view);

  // And i try for example:
   printf(a-data);
}

But nothing output. How can i get access to GtkIconView items?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list