ellipsize expander label

2009-03-01 Thread Vladimir Nadvornik
Hi,

Is it possible to ellipsize expander label?

The simple approach does not work for me.

expander = gtk_expander_new(NULL);
label = gtk_label_new(some longer text);
gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
gtk_expander_set_label_widget(GTK_EXPANDER(expander), label);

It shows just ... even if there is enough room for the whole text.


BTW, is there any good documentation how the stuff with size-request
and size-allocate works?

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


How to make a simple beep?

2009-03-01 Thread Garth's KidStuff
Hey All,

I'm running under Ubuntu 8.10 and want to make a simple beep -- like the
Windows Beep function which takes a frequency (in Hz) and a duration (in
milliseconds).  Does anyone have a place to point me?

TIA

-Garth

-- 
Garth Upshaw
Garth's KidStuff
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


setuid / setgid

2009-03-01 Thread John Emmas

I hope this is the right list to post this query.

An application that I've built many times before is now suddenly refusing to
run.  I see an error message saying:-

Gtk-WARNING: This process is currently running setuid or setgid
This is not a supported use of GTK+. You must create a helper program.
Refusing to initialze GTK+.

It gives a link to a web page for more information
(http://www.gtk.org/setuid.html) but to be honest, it doesn't explain the
situation very well.  It doesn't explain what a setuid program is, nor why
a program that was never previously a setuid program would suddenly become
one.

The same program (i.e. the same source code) builds and runs fine on a
different machine.  Is it possible that an environment variable has changed
or something?  Or might I need to upgrade GTK+ or something like that?

Thanks,

John 


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


tuning widgets base size

2009-03-01 Thread Alexander
Hi, list.

I've noticed many widgets calculate its base size relying on font sizes (font 
size, ascent, descent...) of its pango context. Thus I've tried to change 
PangoFontDescription of widgets in this way just after widget creation:

  context = gtk_widget_get_pango_context ( wg );
  descr1 = pango_context_get_font_description ( context );
  descr2 = pango_font_description_copy(descr1) ;

  int size = pango_font_description_get_size(descr2);

  size  = ( size * 2 ) / 3;

  pango_font_description_set_size(descr2, size);
  pango_context_set_font_description(context, descr2); 

But this doesn't work. What is the right solution of my problem? Finaly I want 
make widgets smaller than default widgets, like toolbox widgets in The GIMP. 

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


Re: ellipsize expander label

2009-03-01 Thread Tristan Van Berkom
On Sun, Mar 1, 2009 at 9:48 AM, Vladimir Nadvornik nadvor...@suse.cz wrote:
 Hi,

 Is it possible to ellipsize expander label?

 The simple approach does not work for me.

 expander = gtk_expander_new(NULL);
 label = gtk_label_new(some longer text);
 gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
 gtk_expander_set_label_widget(GTK_EXPANDER(expander), label);

 It shows just ... even if there is enough room for the whole text.

The label will only request size for the ellipsis if you dont manually
set a size request - you could just use a value...

...or... if you want an expand to fit label... I dont know if this is
documented anywhere
but just take a look at the size_request() and size_allocate_after()
functions here:
http://svn.gnome.org/viewvc/glade3/trunk/gladeui/glade-editor-property.c?revision=2034view=markup
(note the calculation for the child label allocation will be alot
simpler if you just wrap it alone
in an hbox or something).

Its a little evil and hackish but the technique will give you expand to fit
allocation ellipsis (although personally I've only tried it for word wrapping).

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


GtkCalendar

2009-03-01 Thread John Coppens
Hello people.

I wonder how to solve this elegantly:

If I first set the day of the GtkCalendar, I sometimes hit an error
depending on the number of weeks in the following month.

If I set the month first, I have the same problem, depenging on the day
selected previously. 

In both cases, the error message is:

Gtk-CRITICAL **: calendar_invalidate_day_num: assertion `row != -1' failed

I can understand why the error appears, but I don't see how to remedy it.
Do I have to produce some code to test if the date/month I want to set
will appear on a correct row? Seems to me it is the responsability of the
widget to provide a way to validly change in any order.

John

PS: also tried to change the properties in one gtk_object_set, but that
gives the same result.

Changing the structure's variables directly doesn't produce an update of
the display.

Freeze and thaw are deprecated, and could've been a solution.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GLib 2.19.10 released

2009-03-01 Thread Matthias Clasen
GLib 2.19.10 is now available for download at:

  ftp://ftp.gtk.org/pub/glib/2.19/
  http://download.gnome.org/sources/glib/2.19/

glib-2.19.10.tar.bz2 md5sum: 2cec449d5593835b6080d662a17078ca
glib-2.19.10.tar.gz  md5sum: fbae7251ba6486228a78388f829639ed

This is the a development release leading up to GLib 2.20.

Notes:

 * This is unstable development release. While it has had
  a bit of testing, there are certainly plenty of bugs
  remaining to be found. This release should not be used
  in production.

 * Installing this version will overwrite your existing
  copy of GLib 2.18. If you have problems, you'll need
  to reinstall GLib 2.18.

 * GLib 2.20 will be source and binary compatible with
  the GLib 2.18 series; the new API additions in GLib 2.19
  are finalized at this point.

 * Bugs should be reported to http://bugzilla.gnome.org.


About GLib
==

GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
portability wrappers, and interfaces for such runtime functionality as
an event loop, threads, dynamic loading, and an object system.

More information about GLib is available at:

 http://www.gtk.org/

An installation guide for the GTK+ libraries, including GLib, can
be found at:

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


Overview of Changes from GLib 2.19.8 to GLib 2.19.10


* GMarkup:
 - Considerable speedup

* GIO
 - Add G_FILE_CREATE_REPLACE_DESTINATION flag to allow replacing
   the destination of a copying operation as if it did not exit before.
 - Be more careful when classifying files as desktop files
 - Support desktop file key X-GIO-NoFuse which disables the use
   of fuse pathnames for %u and %U arguments

* Bugs fixed:
 572672 glib/gthread.c: argument is different type
 572464 Doc for g_file_get_contents
 572151 “it's” and “its” confused in docs and comments
 570501 g_win32_get_system_data_dirs uses invalid conversion...
 167569 g_string_append_printf crashes on win32 when used...
 572508 gmarkup speedup
 560564 Replacing a symlink with its linked file truncates... 
 549298 impossible to copy files with p (pipe) flag
 543183 Clarify docs for g_file_has_prefix
 540461 g_memory_output_stream_get_data_size() doesn't behave...
 573462 GEmblemedIcon leak
 573421 Clarify message format in GMountOperation
 573658 Deadlock in giomodule.c
 556706 Inconsistent help arguments -h, -?
 573527 Wrong shell to run config.status in Makefile.in.in
 573128 A couple of typos in GObject documentation

* Updated translations:
 Catalan (ca)
 British English (en_GB)
 Spanish (es)
 Basque (eu)
 Finnish (fi)
 French (fr)
 Gujarati (gu)
 Hebrew (he)
 Hungarian (hu)
 Korean (ko)
 Maithili (mai)
 Norwegian bokmål (nb)
 Dutch (nl)
 Portugese (pt)
 Swedish (sv)
 Thai (th)
 Traditional Chinese (zh_HK)
 Traditional Chinese (zh_TW)


Thanks to all contributors:
Kazuki Iwamoto
Øystein Johansen
Will Thompson
Tor Lillqvist
Paolo Borelli
Owen Taylor
Ryan Lortie
Alexander Larsson
Markus Duft
Fabian Groffen
David Zeuthen
Christian Dywan
Loïc Minier
Dimitri Vorbiev


March 2, 2009
Matthias Clasen


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