GTK+ 2.12.4 released

2008-01-08 Thread Matthias Clasen
GTK+ 2.12.4 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/2.12/
 http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.12/

gtk+-2.12.4.tar.bz2   md5sum: 72e2a930f65667ab86dc46141bbaf9e2
gtk+-2.12.4.tar.gzmd5sum: 56dbe8f97fd7cf2c1fffaf2d1ef18eb3

This is a bug fix release in the 2.12 series.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties. 


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:
 
http://www.gtk.org/

An installation guide for GTK+ 2.x is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:
 
http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Overview of Changes from GTK+ 2.12.3 to 2.12.4
==

 * Bugs fixed:
 494667 gdkpixloader jpeg loader problems with some files
 496546 Tooltips may crashe because a window is destroyed
 503824 gtk_paned_find_neighbours aborts with assertion failure
 388321 gtk_notebook_remove_tab_label
 503190 Doesn't build with directfb = 1.0
 491847 gtk-builder-convert --root option doesn't work for GtkWin...
 492977 Setup autorelease pool automatically in each mainloop ite...
 499951 GtkAssistant remove_page may leave current_page as a dang...
 502250 Leak in gtkfilechooserdefault.c:shortcuts_reload_icons()
 503569 Leak in GtkTreeViewColumn
 504753 Destroyed subviews are not removed from the view hierarchy
 504804 Typo in TEST_EXPAND_ROW signal
 504984 Problems with hiding/showing transient windows
 505708 compatibility macros for signals has wrong type.
 506107 mem leak in print dialogue
 502850 gtk-builder-convert program not found
 504749 gtk-builder-convert and GtkMenu 

 * Updated translations:
 Greek (el)
 Spanish (es)
 Estonian (et)
 Basque (eu)
 Irish (ga)
 Swedish (sv)


A list of all the fixed bugs can be found at:
http://bugzilla.gnome.org/buglist.cgi?bug_id=494667,502250,388321,502850,492977,503190,503569,503824,496546,504749,504753,504804,504984,505708,506107,491847,499951

Thanks to all contributors:
Richard Hult
Yevgen Muntyan
Tor Lillqvist
Paul Davis
Sebastian Dröge
Xan Lopez
Mathias Hasselmann
Sébastien Granjoux
Benjamin Berg
Kristian Rietveld
Yuri Pimenov
Johan Dahlin
Sadrul Habib Chowdhury
Cody Russell
MINAMI Hirokazu
Christian Persch
Johannes Schmid
Emmanuele Bassi
Claudio Saavedra
Michael Natterer
Phil Lello
Andreas Sandberg
Ed Catmur


January 8, 2008
Matthias Clasen


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

Frustration with GtkActions

2008-01-08 Thread Randy Poe
I am running into incredible frustration (as a GTK newbie)
trying to use GtkAction's. This is in Redhat Linux, using
GTK 2.4.13. The application is meant to be portable to
Windows XP (where it will be compiled with GTK 2.6).

For administrative reasons, Linux/GTK 2.4 is fixed as our development
environment. If this is a 2.4 bug that is addressed in 2.6,
that would be more or less OK for the time being, but I'd
prefer a workaround if possible.

We have an application layout created with Glade, so there
are a bunch of toolbar icons and menu items predefined with
labels, icons, etc. I am trying to define actions and
attach them to menuitem/toolbar icon pairs so that they can
be manipulated (made sensitive or not) together.

This works great for stock menuitems with stock icons. Not
so great with most of our menuitems, which use stock icons
but non-standard labels. I have two choices when I call
gtk_action_new followed by gtk_action_connect_proxy:

   1. Use a NULL stock_id argument. GTK complains with the
following errors:
  Gtk-CRITICAL **: file gtkstock.c: line 145 (gtk_stock_lookup):
assertion `stock_id != NULL'failed

  Gtk-CRITICAL **: file gtklabel.c: line 1018 (gtk_label_set_label):
assertion `str != NULL' failed

   and the icon that was there gets deleted from my menuitem.

or

   2. Use a non-NULL stock_id argument, and then my
*label* gets deleted from my menuitem and replaced with the
stock label.

I'm guessing that there must be some low-level way
to attach the proxy while preserving existing image and
label, but I haven't figured it out yet. I tried this:
icon = gtk_image_menu_item_get_image( btn );
gtk_action_connect_proxy( action, btn );
if (!stock_id)
  gtk_image_menu_item_set_image( btn, icon );

but that did not succeed in restoring the icon, i.e.,
I get a menuitem with no icon.

Any suggestions?


-- 
Randall Poe ([EMAIL PROTECTED])
Senior Member Engineering Staff
Lockheed Martin Advanced Technology Laboratory
Sixth Floor, 3 Executive Campus
Cherry Hill, NJ 08002
Phone: (856)792-9894
Fax: (856)792-9930

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


Re: Frustration with GtkActions

2008-01-08 Thread Gabriel Schulhof
On Tue, 2008-01-08 at 16:02 -0500, Randy Poe wrote:
 Any suggestions?
Register new stock items for all the menu items you want covered by
actions.

I use the function below for icons, and gtk_stock_add() for labels.

void add_stock_icon (const gchar *filename, const gchar *stock_id)
  {
  GtkIconSource *icon_source = NULL ;
  GtkIconSet *icon_set = NULL ;
  static GtkIconFactory *icon_factory = NULL ;
  char *psz = NULL ;

  if (NULL == icon_factory)
gtk_icon_factory_add_default (icon_factory = gtk_icon_factory_new
()) ;

  if (NULL != (icon_source = gtk_icon_source_new ()))
{
gtk_icon_source_set_filename (icon_source, psz = find_pixmap_file
(filename)) ;
//gtk_icon_source_set_size_wildcarded (icon_source, TRUE) ;
if (NULL == (icon_set = gtk_icon_factory_lookup (icon_factory,
stock_id)))
  {
  icon_set = gtk_icon_set_new () ;
  gtk_icon_factory_add (icon_factory, stock_id, icon_set) ;
  }
gtk_icon_set_add_source (icon_set, icon_source) ;
}
  }

HTH,



Gabriel

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


Re: RFC: Re-Design GtkStyle to only pass cairo-context?

2008-01-08 Thread Clemens Eisserer
Hello Kalle and sorry for bothering you again,

 I've implemented a mockup of how this could go (attached):
Thanks a lot, I am not really familiar with GTK+ and glib (and its
coding style) so this definitivly is really a welcome help. Thanks :)


 gtkcairostyle.h:
 gtkcairostyle.c:
 GtkCairoStyle class to replace GtkStyle, doubles also as an
 implementation for a cairo-using theme (implementing the
 paint_slider method).

 gtkcairostyle-test.c:
 A test application that draws the slider graphics with either the
 default style object or with the aforementioned cairo style, also
 doubles as GTK+ by implementing the gtk_cairo_paint_slider() method.
 The upper half is drawn in cairo way if possible and in old style if
 not.  The lower half is drawn with the old API regardless of the style
 in use.
Well, ok. I first thouht this would be a bad idea (to if/else in
application code), but on the other side ... there isn't any reason to
use the new version if additional functionality provided by cairo
isn't needed, right?

 Looks to work fine, remember to CC me when you submit the patch to bugzilla ;)
Well it could take some time (its now exam-time at university) ... but
this is definitivly something I would like to work on. Thanks a lot
for all your help :)

 Or is there a bug open for this?
I am not sure, but I'll have a look and open one if it doesn't already exist.

Thanks a lot, lg Clemens
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GTK+ Website Review - Hosting Windows Binaries

2008-01-08 Thread Tor Lillqvist
 1. Would anyone object to putting the Windows binaries on the gtk.org
 site instead of Tor's site? It makes sense to me to have it there. Tor,
 any input here?

The binaries *are* on ftp.gtk.org (actually more completely on
ftp.gnome.org). With my site you probably mean the
www.gimp.org/win32/downloads.html page, which just has links to
ftp.gnome.org. This downloads.html page would fit better on
www.gtk.org indeed, especially as there isn't much GIMP-specific on
the page any more.

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


GTK+ Website Review - Hosting Windows Binaries

2008-01-08 Thread Martyn Russell
Hi all,

I will be posting my final review of the gtk.org pages in the coming few
weeks and I wanted people's opinions on a few things.

1. Would anyone object to putting the Windows binaries on the gtk.org
site instead of Tor's site? It makes sense to me to have it there. Tor,
any input here?

2. With regards to the FAQ, is there a burning need to have this in a
docbook format? Currently it is a mess and I am thinking of reforming
it, but before I do, I wonder if we should just put it completely in
HTML and as part of the website. Is there any need for us to put it in
PDF or any other format, really?

3. Do we really need a gtk 1.2 FAQ? If not, I will remove the cruft from
the FAQ that is no longer pertinent.

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


GTK+ 2.12.4 released

2008-01-08 Thread Matthias Clasen
GTK+ 2.12.4 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/2.12/
 http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.12/

gtk+-2.12.4.tar.bz2   md5sum: 72e2a930f65667ab86dc46141bbaf9e2
gtk+-2.12.4.tar.gzmd5sum: 56dbe8f97fd7cf2c1fffaf2d1ef18eb3

This is a bug fix release in the 2.12 series.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties. 


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:
 
http://www.gtk.org/

An installation guide for GTK+ 2.x is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:
 
http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Overview of Changes from GTK+ 2.12.3 to 2.12.4
==

 * Bugs fixed:
 494667 gdkpixloader jpeg loader problems with some files
 496546 Tooltips may crashe because a window is destroyed
 503824 gtk_paned_find_neighbours aborts with assertion failure
 388321 gtk_notebook_remove_tab_label
 503190 Doesn't build with directfb = 1.0
 491847 gtk-builder-convert --root option doesn't work for GtkWin...
 492977 Setup autorelease pool automatically in each mainloop ite...
 499951 GtkAssistant remove_page may leave current_page as a dang...
 502250 Leak in gtkfilechooserdefault.c:shortcuts_reload_icons()
 503569 Leak in GtkTreeViewColumn
 504753 Destroyed subviews are not removed from the view hierarchy
 504804 Typo in TEST_EXPAND_ROW signal
 504984 Problems with hiding/showing transient windows
 505708 compatibility macros for signals has wrong type.
 506107 mem leak in print dialogue
 502850 gtk-builder-convert program not found
 504749 gtk-builder-convert and GtkMenu 

 * Updated translations:
 Greek (el)
 Spanish (es)
 Estonian (et)
 Basque (eu)
 Irish (ga)
 Swedish (sv)


A list of all the fixed bugs can be found at:
http://bugzilla.gnome.org/buglist.cgi?bug_id=494667,502250,388321,502850,492977,503190,503569,503824,496546,504749,504753,504804,504984,505708,506107,491847,499951

Thanks to all contributors:
Richard Hult
Yevgen Muntyan
Tor Lillqvist
Paul Davis
Sebastian Dröge
Xan Lopez
Mathias Hasselmann
Sébastien Granjoux
Benjamin Berg
Kristian Rietveld
Yuri Pimenov
Johan Dahlin
Sadrul Habib Chowdhury
Cody Russell
MINAMI Hirokazu
Christian Persch
Johannes Schmid
Emmanuele Bassi
Claudio Saavedra
Michael Natterer
Phil Lello
Andreas Sandberg
Ed Catmur


January 8, 2008
Matthias Clasen


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


Re: State of natural size, Havoc/Behdad style

2008-01-08 Thread Mathias Hasselmann
Seems I didn't get all details of Behdad's algorithm.
Fixed. Like it much better now:

http://taschenorakel.de/media/movies/natural-size-behdad-style.ogg

TODO:

- get size-group-natural-size interaction halfway right.
- get agreement on code/API (commit?)
- factor out Behdad's/Havoc's natural size algorithm for reuse


Am Dienstag, den 08.01.2008, 19:17 +0100 schrieb Mathias Hasselmann:
 Attached the current state of natural size, with an API similiar to
 Havoc's wishes and implementing the natural size allocation they both
 suggested.
 
 Havoc suggest to have two methods: get_desired_width() and
 get_desired_height(), but I implemented get_desired_size(), since I do
 not see how to implement this for GtkLabel, without recalculating the
 entire layout four times on each desired size request.
-- 
Mathias Hasselmann [EMAIL PROTECTED]
Openismus GmbH: http://www.openismus.com/
Personal Site: http://taschenorakel.de/
diff -u b/gtk/gtkhbox.c b/gtk/gtkhbox.c
--- b/gtk/gtkhbox.c
+++ b/gtk/gtkhbox.c
@@ -169,7 +169,7 @@
 }
 
 static gint
-gtk_vbox_compare_gap (gconstpointer p1,
+gtk_hbox_compare_gap (gconstpointer p1,
   gconstpointer p2,
   gpointer  data)
 {
@@ -178,16 +178,14 @@
   const GtkBoxSpreading *c2 = p2;
 
   const gint d1 = MAX (sizes[c1-index].natural_size -
-   sizes[c1-index].minimum_size,
-   0);
+   sizes[c1-index].minimum_size, 0);
   const gint d2 = MAX (sizes[c2-index].natural_size -
-   sizes[c2-index].minimum_size,
-   0);
+   sizes[c2-index].minimum_size, 0);
 
-  gint delta = (d1 - d2);
+  gint delta = (d2 - d1); /* sort descending by gap... */
 
-  if (0 == delta)
-delta = (c1-index - c2-index);
+  if (0 == delta) /* ...and position on draw. */
+delta = (c2-index - c1-index);
 
   return delta;
 }
@@ -209,6 +207,8 @@
   nexpand_children = 0;
   children = box-children;
 
+  /* Count number of visible children. */
+
   while (children)
 {
   child = children-data;
@@ -236,7 +236,7 @@
 
   gint width;
   gint extra;
-  gint x, i;
+  gint i, x;
 
   width = (allocation-width - border_width * 2 -
(nvis_children - 1) * box-spacing);
@@ -247,7 +247,7 @@
 	}
   else
 {
-  /* Retreive desired size for visible children */
+  /* Retreive desired size for visible children. */
 
   for (packing = GTK_PACK_START; packing = GTK_PACK_END; ++packing)
 {
@@ -275,23 +275,51 @@
 }
 }
 
-  /* Sort children by difference between natural and minimum size */
+  /* Distribute the container's extra space c_gap. We want to assign
+   * this space such that the sum of extra space assigned to children
+   * (c^i_gap) is equal to c_cap. The case that there's not enough
+   * space for all children to take their natural size needs some
+   * attention. The goals we want to achieve are:
+   *
+   *   a) Maximize number of children taking their natural size.
+   *   b) The allocated size of children should be a continuous
+   *   function of c_gap.  That is, increasing the container size by
+   *   one pixel should never make drastic changes in the distribution.
+   *   c) If child i takes its natural size and child j doesn't,
+   *   child j should have received at least as much gap as child i.
+   *
+   * The following code distributes the additional space by following
+   * this rules.
+   */
+
+  /* Sort descending by gap and position. */
 
   g_qsort_with_data (spreading,
  nvis_children, sizeof (GtkBoxSpreading),
- gtk_vbox_compare_gap, sizes);
+ gtk_hbox_compare_gap, sizes);
 
-  for (i = 0; width  0  i  nvis_children; ++i)
+  /* Distribute available space.
+   * This master piece of a loop was conceived by Behdad Esfahbod.
+   */
+  for (i = nvis_children - 1; i = 0; --i)
 {
-  extra = sizes[spreading[i].index].natural_size
-- sizes[spreading[i].index].minimum_size;
-
-  extra = MIN (width, extra);
-  width -= extra;
+  /* Divide remaining space by number of remaining children.
+   * Sort order and reducing remaining space by assigned space
+   * ensures that space is distributed equally.
+   */
+  gint glue = (width + i) / (i + 1);
+  gint gap = sizes[spreading[i].index].natural_size
+   - sizes[spreading[i].index].minimum_size;
 
+  extra = MIN (glue, gap);
   sizes[spreading[i].index].minimum_size += extra;
+
+  width -= extra;
 }
 
+  /* 

Re: GTK+ Website Review - Hosting Windows Binaries

2008-01-08 Thread Shawn Amundson
Martyn Russell wrote:
 Hi all,
 
 I will be posting my final review of the gtk.org pages in the coming few
 weeks and I wanted people's opinions on a few things.
 
 1. Would anyone object to putting the Windows binaries on the gtk.org
 site instead of Tor's site? It makes sense to me to have it there. Tor,
 any input here?

Excellent idea.

 2. With regards to the FAQ, is there a burning need to have this in a
 docbook format? Currently it is a mess and I am thinking of reforming
 it, but before I do, I wonder if we should just put it completely in
 HTML and as part of the website. Is there any need for us to put it in
 PDF or any other format, really?

How about it be placed in a wiki?

 3. Do we really need a gtk 1.2 FAQ? If not, I will remove the cruft from
 the FAQ that is no longer pertinent.

No, and if someone wanted a GTK+ 1.2 FAQ, they could always get it off
the FTP site inside the source tar file. ;-)

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