Re: latest glib and gtk for Windows?

2009-04-21 Thread Gabriele Greco
On Sun, Apr 19, 2009 at 5:53 PM, Tor Lillqvist t...@iki.fi wrote:
 I don't mean to be a pest, but when might glib 2.20.1 and gtk
 2.16.1 become available at
 http://www.gtk.org/download-windows.html ?

 Soon... Been a bit busy with other hackinh.

About this issue, I've been able to build the whole win32 GTK
environment only on WIN32 mingw since all the configure process relies
too much on pkg-config to be usable from a cross-compiler (we usually
build all of our apps on linux with the mingw crosscompiler
distributed with all the debian derived distro).

Anyone has some ./configure lines for the various
glib/cairo/pango/atk/gtk packages to crossbuild them in a clean way
without manual hacking on the generated files? :)

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


Re: latest glib and gtk for Windows?

2009-04-21 Thread Gabriele Greco
On Tue, Apr 21, 2009 at 11:16 AM, Tor Lillqvist t...@iki.fi wrote:
 Soon...

 The binaries are at the usual place
 (http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+/2.16/ etc) but the
 http://www.gtk.org/download-windows.html page has not updated,
 apparently thanks to some missing git hooks or whatever.


Thx, I'm cutting down a runtime package from the bundle.

Just a question:

In the bin directory I can safely remove every binary except:

gspawn-win32-helper-console.exe
gspawn-win32-helper.exe

... if I only need a RUNTIME package, isn't it?

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


RE: How to build GTK+ AP for ARM based of Linux platform at x86 machines

2009-04-21 Thread Aries Huang
Hi,
Could you help to solve this problem?
I use arm-gcc-4.1.2-glibc-2.5 to compile GTK application in scratchbox.
That system will display these error messages.
It seems GTK library EABI version not upgrade to version 4 or other problems.
/scratchbox/compilers/arm-gcc-4.1.2-glibc-2.5/bin/../lib/gcc/arm-none-linux-gnueabi/4.1.2/../../../../arm-none-linux-gnueabi/bin/ld:
 ERROR: Source object /usr/lib/libgtk-x11-2.0.so has EABI version 0, but target 
example has EABI version 4
/scratchbox/compilers/arm-gcc-4.1.2-glibc-2.5/bin/../lib/gcc/arm-none-linux-gnueabi/4.1.2/../../../../arm-none-linux-gnueabi/bin/ld:
 failed to merge target specific data of file /usr/lib/libgtk-x11-2.0.so

How to solve this problem please give me suggestion?
Thanks a lot. :-)
Best regards,
Aries

-Original Message-
From: Cornelius Hald [mailto:h...@icandy.de]
Sent: Thursday, April 09, 2009 9:38 PM
To: Aries Huang
Cc: gtk-l...@gnome.org
Subject: Re: How to build GTK+ AP for ARM based of Linux platform at x86 
machines

Hi Aries,

I think you should try a complete cross-compile toolchain. For example
have a loot at scratchbox.org. The advantage is, that it contains all
libs etc. already compiled for arm. So for compiling to arm you don't
have to do anything special anymore. It's like compiling for x86.

I hope I didn't miss the point of your post ;)
Conny


On Thu, 2009-04-09 at 13:51 +0800, Aries Huang wrote:
 Hi,

 Could you help to solve this problem?

 I have implemented the GTK+ AP in x86 machines.

 After use gcc to compile it can correct execute.

 When I change to use arm-none-linux-gnueabi-gcc that was displayed
 these error messages.

 arm-none-linux-gnueabi-gcc -Wall -g hello.c -o hello `pkg-config
 --cflags --libs gtk+-2.0`

 Error messages:

 /usr/bin/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/../lib/gcc/arm-none-linux-gnueabi/4.1.2/../../../../arm-none-linux-gnueabi/bin/ld:
  cannot find -lgtk-x11-2.0

 collect2: ld returned 1 exit status

 So I compile the GTK+ libraries for DirectFB in this folder
 (/opt/arm/gtk).

 And set these environment variables.

   CPPFLAGS=-I/opt/arm/gtk/include

   LDFLAGS=-L/opt/arm/gtk/lib

   PKG_CONFIG_PATH=/opt/arm/gtk/lib/pkgconfig

   export CPPFLAGS LDFLAGS PKG_CONFIG_PATH

 LD_LIBRARY_PATH=/opt/arm/gtk/lib

   PATH=/opt/arm/gtk/bin:$PATH

   export LD_LIBRARY_PATH PATH

 Then refresh compile again but still display the same error message.

 Thus we use pkg-config and find GTK still use default path and not
 change to this path(/opt/arm/gtk).

 pkg-config --cflags --libs gtk+-2.0

 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
 -I/usr/include/pixman-1 -I/usr/include/freetype2
 -I/usr/include/libpng12  -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo
 -lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0
 -lglib-2.0

 How to solve this problem please give me suggestion?



 Thanks a lot.J

 Best regards,

 Aries










 __

 This e-mail message together with any attachments thereto (if any) is
 confidential, protected under an enforceable non-disclosure agreement,
 intended only for the use of the named recipient(s) above and may
 contain information that is privileged, belonging to professional work
 products or exempt from disclosure under applicable laws. Any
 unauthorized review, use, copying, disclosure, or distribution of any
 information contained in or attached to this transmission is STRICTLY
 PROHIBITED and may be against the laws. If you have received this
 message in error, or are not the named recipient(s), please
 immediately notify the sender by e-mail or telephone at IT support
 hotline 886-3-270 EXT 1333 and delete this e-mail message and any
 attached documentation from your computer. Receipt by anyone other
 than the intended recipient(s) is not a waiver of any attorney-client
 or work product privilege. Thank you!
 ___
 gtk-list mailing list
 gtk-l...@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-list



This e-mail message together with any attachments thereto (if any) is 
confidential, protected under an enforceable non-disclosure agreement, intended 
only for the use of the named recipient(s) above and may contain information 
that is privileged, belonging to professional work products or exempt from 
disclosure under applicable laws.  Any unauthorized review, use, copying, 
disclosure, or distribution of any information contained in or attached to this 
transmission is STRICTLY PROHIBITED and may be against the laws.  If you have 
received this message in error, or are not the named recipient(s), please 
immediately notify the sender by e-mail or telephone at IT support hotline 
886-3-270 EXT 

Re: Pass more widgets as gpointer.

2009-04-21 Thread Claudio Saavedra
On Tue, Apr 21, 2009 at 08:57:41AM +0400, Vlad Volodin wrote:
 Hello, Jens
 
 The other way is to make your widgets global. Especially, me? I use
 GOjects, and always pass self object. For example, I inherit  main
 window object from GtkWindow and later in widgets definition pass
 itself to callback. Also, you can use g_object_set_data for storing
 some useful pointers.

Don't use global variables, they make the code hard to read and
difficult to understand the context of the variables.

 
 Good luck
 
 2009/4/20 Jens Hansen jensh...@gmail.com:
  Hello All.
 
  I'm quite new to C, but have done some gtk programming in perl.
  I've been looking for answers on the web, and in various tutorials, without
  any luck.
  My question is how to pass more widgets as a gpointer, to a callback
  function. (in C )
 
  For instance if a OK button, has to read the state of three other
  widgets...
 
  In perl I would make an array of the widgets, and then pass the ref as the
  data argument to the callback. I cannot grasp how to do something like that
  in C.

A typical approach to this is to create a FooContext structure that will
hold pointers to all the elements that you need to use in your callback.
You can instanciate it with g_new0() and later free it with g_free(). Be
careful to hold object references and release them when you don't need
them anymore.

You could also use an array for this, but I prefer the structure
approach, since you don't want to rely on the order you put the elements
in the array later when you use them, removing/adding more elements you
may need in the future can be a little cumbersome, etc.

Claudio

 
  An example snippet would be really helpfull.
 
  Thx
 
  Jens
  ___
  gtk-app-devel-list mailing list
  gtk-app-devel-list@gnome.org
  http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: latest glib and gtk for Windows?

2009-04-21 Thread jcupitt
2009/4/21 Gabriele Greco gabriele.gr...@darts.it:
 About this issue, I've been able to build the whole win32 GTK
 environment only on WIN32 mingw since all the configure process relies
 too much on pkg-config to be usable from a cross-compiler (we usually
 build all of our apps on linux with the mingw crosscompiler
 distributed with all the debian derived distro).

I build win32 gtk and apps on a cross compiler (ubuntu mingw) and it
seems to work fine with no manual hackery required. What problems were
you having?

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


Re: latest glib and gtk for Windows?

2009-04-21 Thread Tor Lillqvist
 Soon...

The binaries are at the usual place
(http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+/2.16/ etc) but the
http://www.gtk.org/download-windows.html page has not updated,
apparently thanks to some missing git hooks or whatever.

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


Re: latest glib and gtk for Windows?

2009-04-21 Thread Tor Lillqvist
 In the bin directory I can safely remove every binary except:
 gspawn-win32-helper-console.exe gspawn-win32-helper.exe

 ... if I only need a RUNTIME package, isn't it?

Yes.

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


Strange GHashTable behaviour

2009-04-21 Thread Luka Napotnik
Hello,

I'm experiencing strange GHashTable behaviours when looking up a value
throught a string key. I pass the key as a stack-allocated string to the
hash table. For most lookups it works flawlessly but sometimes I get an
invalid pointer. It even looks normal but data can't be accessed at that
address.

I have about 50 unique UUID keys and I'm inserting them to the hash
table one by one with an associated data pointer. AFAIK,
g_hash_table_lookup() should return NULL when the element with the
provided key was not found in the table.

So, does anyone have an idea what is going on here? Please help.

Greets,
Luka

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

Re: Strange GHashTable behaviour

2009-04-21 Thread Vivien Malerba
2009/4/21 Luka Napotnik luka.napot...@gmail.com

 Hello,

 I'm experiencing strange GHashTable behaviours when looking up a value
 throught a string key. I pass the key as a stack-allocated string to the
 hash table. For most lookups it works flawlessly but sometimes I get an
 invalid pointer. It even looks normal but data can't be accessed at that
 address.

 I have about 50 unique UUID keys and I'm inserting them to the hash
 table one by one with an associated data pointer. AFAIK,
 g_hash_table_lookup() should return NULL when the element with the
 provided key was not found in the table.

 So, does anyone have an idea what is going on here? Please help.


Is the problem on the key or on the returned value of a
g_hash_table_lookup()?

Did you give any destroy functions to g_hash_table_new_full() and use
g_hash_table_insert() again with the same key?

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


Re: latest glib and gtk for Windows?

2009-04-21 Thread Allin Cottrell
On Tue, 21 Apr 2009, Tor Lillqvist wrote:

  Soon...

 The binaries are at the usual place...

Thanks!

-- 
Allin Cottrell
Department of Economics
Wake Forest University

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


Re: Strange GHashTable behaviour

2009-04-21 Thread Luka Napotnik
The problem is in the returned value. It returns an invalid pointer
instead of NULL.

Greets,
Luka

Dne 21.04.2009 (tor) ob 17:19 +0200 je Vivien Malerba zapisal(a):
 
 
 2009/4/21 Luka Napotnik luka.napot...@gmail.com
 Hello,
 
 I'm experiencing strange GHashTable behaviours when looking up
 a value

 
 throught a string key. I pass the key as a stack-allocated
 string to the
 hash table. For most lookups it works flawlessly but sometimes
 I get an
 invalid pointer. It even looks normal but data can't be
 accessed at that
 address.
 
 I have about 50 unique UUID keys and I'm inserting them to the
 hash
 table one by one with an associated data pointer. AFAIK,
 g_hash_table_lookup() should return NULL when the element with
 the
 provided key was not found in the table.
 
 So, does anyone have an idea what is going on here? Please
 help.
 
 Is the problem on the key or on the returned value of a
 g_hash_table_lookup()?
 
 Did you give any destroy functions to g_hash_table_new_full() and use
 g_hash_table_insert() again with the same key?
 
 Vivien
  
 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list