Re: Pango context in size request

2010-03-24 Thread Nicola Fontana
Il giorno Wed, 24 Mar 2010 19:03:06 +
Robert Pearce  ha scritto:

> Hi group,
> 
> This is probably a dumb-ass question that I ought to know the answer
> to, but...
> 
> I'm building a custom widget which includes some text that needs to be
> fitted round. To do it right I need to obtain the size of these by
> calling Pango functions with a context obtained for the widget. Is it
> guaranteed OK to do this in the .._size_request function? I kind of
> figure it must be because lots of widgets (labels, for example) must
> surely do so, but I can't find any definite confirmation in the docs.


The question is not dumb, but I fail to understand why people are so
scared of source code:

http://git.gnome.org/browse/gtk+/tree/gtk/gtklabel.c#n3133

Ciao.
-- 
Nicola
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Pango context in size request

2010-03-24 Thread Robert Pearce
Hi group,

This is probably a dumb-ass question that I ought to know the answer
to, but...

I'm building a custom widget which includes some text that needs to be
fitted round. To do it right I need to obtain the size of these by
calling Pango functions with a context obtained for the widget. Is it
guaranteed OK to do this in the .._size_request function? I kind of
figure it must be because lots of widgets (labels, for example) must
surely do so, but I can't find any definite confirmation in the docs.

Cheers,
Rob
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: All widget are too fat - theming not working properly

2010-03-24 Thread Christopher Roy Bratusek
Am Wed, 24 Mar 2010 18:34:05 +0100
schrieb Matthias Fuchs :

> I know that there are several "Compact" themes out there, but all do 
> suffer the same problem: some widgets are still fat.
> 
> No ideas at all how to solve this?
> Is noone but me dissatisfied with these monstrous widgets?

me too, but I also don't know a workaround on theme side. Though several apps 
(also
GNOME ones) had to be changed, to listen to those gtk+ properties, perhaps you
should file a bug against those applications.

Chris

> 
> Or is there really no solution to this?

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


Re: All widget are too fat - theming not working properly

2010-03-24 Thread Matthias Fuchs
I know that there are several "Compact" themes out there, but all do 
suffer the same problem: some widgets are still fat.


No ideas at all how to solve this?
Is noone but me dissatisfied with these monstrous widgets?

Or is there really no solution to this?



Am 23.02.10 20:50, schrieb Matthias Fuchs:

Hi guys,

imho, all gtk widgets are much to fat/big, especially comboboxes,
buttons and tabs.
So ok, it's possible to decrease x-/ythickness, some paddings and stuff
like this. After much hours of tweaking and tuning I managed to create a
"minimal" theme. Though some buttons (those without icons) have the
desired height, buttons that normally have icons, like in dialogs, are
much higher. Though these icons are not visible/hidden the buttons'
heights seem to not decrease anymore.

There are also some quirks with comboboxes. Those that are not editable
are higher as the others.

Look at the screenshot to see what I mean:
1) and 2) are both chomboboxes, but 2) is one pixel higher
(Yes, I know, it's just a pixel and 99,9% of all users won't ever notice
is -- But I do. And everytime I look at the screen I hate it.

3) and 4) are both buttons. 4) seems to adopt my gtkrc settings, 3)
doesn't. 3) should normally have an icon. But I disabled all kind of
icons in menus and on buttons. Somehow they seem to still be there and
prevent the button from becoming less high.


Is there some way to solve these "bugs"? Is there a chance that GTK+ 3.0
doesn't have such fat widgets per default?

Hope, I didn't confuse you too much ;-)

br, ash



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


undefined reference to `gdk_keymap_add_virtual_modifiers'

2010-03-24 Thread IMS
Hi,
I'm trying to compile my application for an embedded system using the last
version of gtk (2.20.0) and direct-fb 1.4.3
I have a problem to compile with "gdk_keymap_add_virtual_modifiers" so I
made a search and found a patch here :
https://bugzilla.gnome.org/show_bug.cgi?id=605185
But I  still have a problem and don't know why ?
Follow some informations, thanks for any help !
One more info, I had no problems to compile with gtk 2.16.6 (but need to
update the version to correct some bugs)


*The error message : *
*libtool: link: gcc -DDIRECTFB_MAJOR_VERSION=1 -o
.libs/gtk-query-immodules-2.0 queryimmodules.o -pthread
/home/m/ltib/rootfs/usr/lib/libpixman-1.so
/home/m/ltib/rootfs/usr/lib/libcairo.so
/home/m/ltib/rootfs/usr/lib/libfontconfig.so
./.libs/libgtk-directfb-2.0.so-L/home/m/ltib/rootfs/usr/lib
/home/m/ltib/rpm/BUILD/gtk+-2.20.0/gdk/.libs/
libgdk-directfb-2.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so../gdk/.libs/
libgdk-directfb-2.0.so -ldirectfb -lfusion -ldirect -lpthread
/home/m/ltib/rpm/BUILD/gtk+-2.20.0/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so-lpangocairo-1.0
-lpango-1.0 -latk-1.0 -lcairo -lgio-2.0 -lgobject-2.0
-lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lm -pthread
./.libs/libgtk-directfb-2.0.so: undefined reference to
`gdk_keymap_add_virtual_modifiers'
collect2: ld returned 1 exit status
make[4]: *** [gtk-query-immodules-2.0] Error 1*


*My .spec needed to compile with ltib : *
%define pfx /opt/freescale/rootfs/%{_target_cpu}

Summary   : The GIMP ToolKit (GTK+), a library for creating GUIs
Name: gtk2
Version : 2.20.0
Source  : gtk+-%{version}.tar.bz2
Patch1  : gtk2-2.20.0-gdk_keymap_map_virtual_modifiers.patch
BuildRoot   : %{_tmppath}/%{name}
Prefix  : %{pfx}

%Description
%{summary}

%Prep
%setup -n gtk+-%{version}
%patch1 -p1


%Build
gio_can_sniff=no \
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \
 --with-gdktarget=directfb --without-x -C --disable-static
--without-libjasper --enable-debug=yes \
 NM="arm-none-linux-gnueabi-nm" \
 LIBS="$DEV_IMAGE/usr/lib/libpixman-1.so $DEV_IMAGE/usr/lib/libcairo.so
$DEV_IMAGE/usr/lib/libfontconfig.so"

perl -pi -e 's,^sys_lib_search_path_spec=.*,sys_lib_search_path_spec=,'
libtool
#make CFLAGS="-DG_GNUC_FUNCTION=G_STRLOC"
make CFLAGS="-DDIRECTFB_MAJOR_VERSION=1"

%Install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
find $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/ -name "*.la" | xargs rm -f
find $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/ -name "*.a" | xargs rm -f
rm -rf $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/bin/gtk*
rm -rf $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/bin/gdk-pixbuf-csource
rm -rf $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/share
rm -rf $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/printbackends
rm -rf $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/immodules
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-ani.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-bmp.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-ico.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-jpeg.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-pcx.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-pnm.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-ras.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-tga.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-tiff.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-wbmp.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-xbmp.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-xbm.so
rm -rf
$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/gtk-2.0/*/loaders/libpixbufloader-xpm.so

%Clean
rm -rf $RPM_BUILD_ROOT

%Files
%defattr(-,root,root)
%{pfx}/*
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread David Nečas
On Wed, Mar 24, 2010 at 06:39:11AM -0700, Sergei Steshenko wrote:
> 
> Which part of the non-existent gtk+ release process and non-existent
> respect for self-established 'gnome' conventions you did not understand ?

None, because I cannot see any.  Please enlighten me.

It is normal that a stable version works with a stable version of its
dependency *and* also some preceeding unstable versions of this
dependency.

Yeti

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


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread Debarshi Ray
> Which part of the non-existent gtk+ release process and non-existent
> respect for self-established 'gnome' conventions you did not understand ?

Non-existent things are always difficult to understand.

Cheers,
Debarshi
-- 
One reason that life is complex is that it has a real part and an
imaginary part.
-- Andrew Koenig
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread Sergei Steshenko


--- On Wed, 3/24/10, David Nečas  wrote:

> From: David Nečas 
> Subject: Re: GTK+ 2.20.0 is now available for download...
> To: "Sergei Steshenko" 
> Cc: gtk-list@gnome.org
> Date: Wednesday, March 24, 2010, 5:03 AM
> On Wed, Mar 24, 2010 at 04:57:13AM
> -0700, Sergei Steshenko wrote:
> > 
> > 
> > --- On Wed, 3/24/10, Tor Lillqvist  wrote:
> > 
> > > From: Tor Lillqvist 
> > > Subject: Re: GTK+ 2.20.0 is now available for
> download...
> > > To: "IMS" 
> > > Cc: gtk-list@gnome.org
> > > Date: Wednesday, March 24, 2010, 3:04 AM
> > > > Is it usual to release a stable
> > > version (here Gtk 2.20.0) based on
> > > > development librairies like Glib ???
> > > 
> > > If you don't like it, feel free to wait then for
> GLib
> > > 2.24.
> > > 
> > Nonsense.
> > 
> > In the 'gnome' world _stable_are the ones which have
> even minor version
> > and as _stable_ they should depend on _stable_
> libraries which also have
> > even minor version.
> > 
> > A stable release depending on unstable libraries by
> definition is not
> > stable.
> 
> As was explained, you can always ignore the fact that some
> 2.23 GLib.
> version is sufficient and pretend that it depends on 2.24
> and you get
> your definitions of stable.  In reality, nothing
> changes.
> 
> What part of that you did not understand?
> 
> Yeti
> 
> 

Which part of the non-existent gtk+ release process and non-existent
respect for self-established 'gnome' conventions you did not understand ?

Regards,
  Sergei.


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


Re: Can't unmount flash drive after GtkFileChooserDialog in Windows

2010-03-24 Thread Jernej Simončič
On Tue, 23 Mar 2010 18:08:05 -0700, Ian Puleston wrote:

> So only stdin/out/err are open and the cwd is not on the flash drive. What 
> the heck else could be preventing Windows from un-mounting it?

Grab Process Explorer and use it's Find Handle or DLL function and just
search for the drive letter - that should tell you what has the flash drive
open.

-- 
< Jernej Simončič ><><><><>< http://eternallybored.org/ >

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


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread IMS
I don't have an old background with Gtk but Sergei has resume exactly the
sense of my question.
Why not wait for the stable version of GLib to produce the stable Gtk
lib (especially
if the next stable version of the Glib is coming soon) ?


--- On Wed, 3/24/10, Tor Lillqvist  wrote:

> From: Tor Lillqvist 
> Subject: Re: GTK+ 2.20.0 is now available for download...
> To: "IMS" 
> Cc: gtk-list@gnome.org
> Date: Wednesday, March 24, 2010, 3:04 AM
> > Is it usual to release a stable
> version (here Gtk 2.20.0) based on
> > development librairies like Glib ???
>
> If you don't like it, feel free to wait then for GLib
> 2.24.
>
> --tml
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>

Nonsense.

In the 'gnome' world _stable_are the ones which have even minor version
and as _stable_ they should depend on _stable_ libraries which also have
even minor version.

A stable release depending on unstable libraries by definition is not
stable.

Regards,
  Sergei.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread David Nečas
On Wed, Mar 24, 2010 at 04:57:13AM -0700, Sergei Steshenko wrote:
> 
> 
> --- On Wed, 3/24/10, Tor Lillqvist  wrote:
> 
> > From: Tor Lillqvist 
> > Subject: Re: GTK+ 2.20.0 is now available for download...
> > To: "IMS" 
> > Cc: gtk-list@gnome.org
> > Date: Wednesday, March 24, 2010, 3:04 AM
> > > Is it usual to release a stable
> > version (here Gtk 2.20.0) based on
> > > development librairies like Glib ???
> > 
> > If you don't like it, feel free to wait then for GLib
> > 2.24.
> > 
> Nonsense.
> 
> In the 'gnome' world _stable_are the ones which have even minor version
> and as _stable_ they should depend on _stable_ libraries which also have
> even minor version.
> 
> A stable release depending on unstable libraries by definition is not
> stable.

As was explained, you can always ignore the fact that some 2.23 GLib.
version is sufficient and pretend that it depends on 2.24 and you get
your definitions of stable.  In reality, nothing changes.

What part of that you did not understand?

Yeti

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


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread Sergei Steshenko


--- On Wed, 3/24/10, Tor Lillqvist  wrote:

> From: Tor Lillqvist 
> Subject: Re: GTK+ 2.20.0 is now available for download...
> To: "IMS" 
> Cc: gtk-list@gnome.org
> Date: Wednesday, March 24, 2010, 3:04 AM
> > Is it usual to release a stable
> version (here Gtk 2.20.0) based on
> > development librairies like Glib ???
> 
> If you don't like it, feel free to wait then for GLib
> 2.24.
> 
> --tml
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 

Nonsense.

In the 'gnome' world _stable_are the ones which have even minor version
and as _stable_ they should depend on _stable_ libraries which also have
even minor version.

A stable release depending on unstable libraries by definition is not
stable.

Regards,
  Sergei.


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


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread Claudio Saavedra
El mié, 24-03-2010 a las 10:47 +0100, IMS escribió:
> Hello,
> 
> I have a question about releases. 
> Is it usual to release a stable version (here Gtk 2.20.0) based on
> development librairies like Glib ???
> When I try to compile I have this message : 
> 
> checking for BASE_DEPENDENCIES... configure: error: Package
> requirements (glib-2.0 >= 2.23.6atk >= 1.29.2pango >= 1.20
> cairo >= 1.6) were not met:
> Requested 'glib-2.0 >= 2.23.6' but version of GLib is 2.22.4
> Requested 'atk >= 1.29.2' but version of Atk is 1.20.0
> 
> The last release of Glib is the 2.23.6 and is not stable (the 2.22
> should be stable) and the last stable version for atk is 1.28 and not
> the branch 1.29
> 
> Any responses ?

I don't think it's so unusual, but what's unusual indeed is to have the
GTK+ release before the GLib one. This, to my understanding, is a bit
exceptional now, because of a few changes that are still ongoing in the
gvariant side of glib, which are necessary before GLib is made stable.
This should be happening briefly, I think, so it's not really a problem.

Claudio


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


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread Tor Lillqvist
> Is it usual to release a stable version (here Gtk 2.20.0) based on
> development librairies like Glib ???

If you don't like it, feel free to wait then for GLib 2.24.

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


Re: GTK+ 2.20.0 is now available for download...

2010-03-24 Thread Debarshi Ray
> Is it usual to release a stable version (here Gtk 2.20.0) based on
> development librairies like Glib ???

Yes.

> When I try to compile I have this message :
>
> checking for BASE_DEPENDENCIES... configure: error: Package requirements
> (glib-2.0 >= 2.23.6    atk >= 1.29.2    pango >= 1.20    cairo >= 1.6) were
> not met:
> Requested 'glib-2.0 >= 2.23.6' but version of GLib is 2.22.4
> Requested 'atk >= 1.29.2' but version of Atk is 1.20.0
>
> The last release of Glib is the 2.23.6 and is not stable (the 2.22 should be
> stable) and the last stable version for atk is 1.28 and not the branch 1.29

Gtk+ 2.19/2.20 can depend on Glib 2.23/2.24 (2.24 should be coming out shortly).

This is because 2.20 is a new stable release from Gtk's Git master
after 2.18, and similarly Glib 2.24 will be a new stable release from
Glib's Git master after 2.22. The intervening odd-numbered releases
are also made from Git master in the run-up to the stable release.

Cheers,
Debarshi
-- 
One reason that life is complex is that it has a real part and an
imaginary part.
-- Andrew Koenig
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


GTK+ 2.20.0 is now available for download...

2010-03-24 Thread IMS
Hello,

I have a question about releases.
Is it usual to release a stable version (here Gtk 2.20.0) based on
development librairies like Glib ???
When I try to compile I have this message :

*checking for BASE_DEPENDENCIES... configure: error: Package requirements
(glib-2.0 >= 2.23.6atk >= 1.29.2pango >= 1.20cairo >= 1.6) were
not met:
Requested 'glib-2.0 >= 2.23.6' but version of GLib is 2.22.4
Requested 'atk >= 1.29.2' but version of Atk is 1.20.0
*
The last release of Glib is the 2.23.6 and is not stable (the 2.22 should be
stable) and the last stable version for atk is 1.28 and not the branch 1.29

Any responses ?

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


Re: Can't unmount flash drive after GtkFileChooserDialog in Windows

2010-03-24 Thread Robert Pearce
Hi Ian,

On Tue, 23 Mar 2010 18:08:05 -0700 you wrote:
> So only stdin/out/err are open and the cwd is not on the flash drive. 
> What the heck else could be preventing Windows from un-mounting it?

Sadly it's probably some deep buried magic in Windows. The earlier post
about working directories was on the right lines, I suspect, except it's
not the application working directory that's the problem but some
internal cache record. I've seen this happen with Windows Exploder -
after browsing the flash drive it's sometimes not enough to browse away
and you need to close that explorer window to allow the safe removal.

You could try (though it's unlikely to help) explicitly setting the
file chooser's current directory to C:\ before you delete it.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Can't unmount flash drive after GtkFileChooserDialog in Windows

2010-03-24 Thread Tor Lillqvist
> fd 0 is open !!
> fd 1 is open !!
> fd 2 is open !!

That is a rather pointless exercise as "file descriptors" on Windows
aren't an operating system concept, as on Unix. In C code on Windows,
"file descriptors" are just indexes into tables in the C library.
There might even be several different C libraries (with overlapping
but unrelated file descriptor values) in use by a process at any time.
(That is, one C library, say msvcrt.dll, used by the main .exe,
another, say msvcr80.dll, used by one DLL, and a third DLL might be
using a static C library. Etc.)

Files opened with operating system calls don't have any file descriptors.

To see what files actually are open by a Windows process, you need to
use Windows-specific code. Or use existing tools like Process Explorer
from http://technet.microsoft.com/en-gb/sysinternals/bb896653.aspx .

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