Basic Differences

2008-03-12 Thread Aswathy Prasad
Hi



   Is there any basic difference between GTK+, Qt and Motif? Is gtk+
advantageous over others? I just heard of these tools for developing GUIs.
Is there any other tools also used for this purpose? Can gtk+ be used in KDE
environment also? GNOME and KDE are 2 desktop environments of Linux
platform, right. Is there any particular difference between GNOME and KDE?
Can this be used in Windows? If no, then why is told that gtk+ can be used
in Windows also..



   Will it be better to use Glade to design the GUI's in Fedora, actually
our platform is OLPC? Or is there any other GUI builder which is better than
Glade? Could anyone suggest the better one… Can we compile an application
built using gtk+ in C using the sdcc compiler? Because we need to execute
and run as the user changes the settings in the interface. So in OLPC there
is only sdcc. We don't know whether we can install the gcc compiler or not.
So will it create any problem.

 Waiting for the much needed answers.

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


GTK+ 2.12.9 released

2008-03-12 Thread Matthias Clasen
GTK+ 2.12.9 is now available for download at:

 http://download.gnome.org/sources/gtk+/2.12/

gtk+-2.12.9.tar.bz2   md5sum: 33499772fdc3bea569c6d5673e5831b4
gtk+-2.12.9.tar.gzmd5sum: dce06e3ea184208e3c9a60eb78c29894

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/


Contributing


GTK+ is a large project and relies on voluntary contributions.
We are actively searching for new contributors in various areas
and invite everyone to help project development.
If you are willing to participate, please subscribe to the project
mailing lists to offer your help and read over our list of vacant
project tasks:
http://live.gnome.org/GtkTasks


Overview of Changes from GTK+ 2.12.8 to 2.12.9
==

* Bugs fixed:
  505085 crash in Image Viewer: I opened file name.bmp, ...
  469210 Honor CUPS user default options for GtkPrint
  507605 [patch] gtk_recent_files_menu_populate() does not guard p...
  513230 Crash when using _set_tab_reorderable but tabs are hidden
  519199 Segmentation fault on unknown widget in UI-file
  521548 printing does not work for Custom PageSize
  461805 The combo cell renderer is broken theme wise
  493406 GtkEntry doesn't get unselected when tabbing out of it
  509885 crash when browsing for other folders
  513826 configure script has no option to override cups check
  516578 gtkfilesystemwin32 leaks registry key handles
  516757 gdk/quartz scroll events don't send state
  517338 Borderless non-opaque windows get incorrectly drawn shadow
  518398 gdkwindow-win32.c: variable is declared at middle of block
  518624 bad default for GTK_PRINT_PREVIEW_COMMAND on Mac OS X
  521442 x/y thickness is being overriden by the combobox realize ...
  417389 Scrollwheel on path bar
  469868 Filenames with colon : are not saved correctly
  505857 filepath entered in location bar should be loaded after u...
  353196 Add a file-set signal to GtkFileChooserButton 

* Updated translations:
  Arabic (ar)
  Assamese (as)
  British English (en_GB)
  Spanish (es)
  French (fr)
  Hungarian (hu)
  Italian (it)
  Kannada (kn)
  Norwegian bokmål (nb)
  Nepali (ne)
  Norwegian Nynorsk (nn)
  Brazilian Portugese (pt_BR)
  Russian (ru)
  Tamil (ta)
  Telugu (te)
  Turkish (tr)
  Uzbek ([EMAIL PROTECTED])


Thanks to all contributors:
William Pitcock
Emmanuele Bassi
Richard Hult
Tor Lillqvist
Carlos Garnacho
Mike Massonnet
Paul Davis
Johan Dahlin
Kazuki Iwamoto
Cody Russell
Michael Natterer
Sven Neumann
Federico Mena Quintero
Pavel Syomin
Stijn Hoop
Alberto Ruiz
Chris Wang
Wouter Bolsterlee
Claudio Saavedra


March 12, 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

Re: Locale definitions, dots and commas

2008-03-12 Thread Carlos Pereira
Tomas Carnecky wrote:
 Carlos Pereira wrote:
 Hi,
 I received a message (see below) complaining about using dots instead 
 of commas in decimal numbers. What are the best solutions for this, 
 from the gtk point of view?

 What happens is that in my French locale, the decimal symbol is ',' 
 not '.' !
 Have a nice day, (and good luck with the bug).



$ man 1p locale
- ENVIRONMENT VARIABLES


   This is the typical problem in engineering.
   you only puthis this method before gtk_main();
   gtk_disable_setlocale ();

Thanks for your answers, I realize this is not Gtk stuff,
but certainly affects every GTK app involving decimal numbers...

After setting in my .bashrc, for example (the same with portuguese, 
russian, etc.):

LC_ALL=french; export LC_ALL

Everything automatically works in my GTK app, with commas instead of 
dots, including exporting and importing files (involving for example the 
Expat XML library).

However, a problem remains: my app is distributed with several hundreds 
of example data files, ready to be imported. If these files are 
dot-based, comma people cannot import them. If these files are 
comma-based, dot people cannot import them... Unless I have two versions 
for each file (which seems odd), or I supply a script to automatically 
convert dot- to comma-based files...

If I use gtk_disable_setlocale, then dots are always used, but that does 
not seem quite right... basically I am ignoring user's preference for 
commas...

Is there a good solution for this? am I missing something?
What is the standard procedure in Gnome to handle this problem?

Thanks,
Carlos


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


Re: Locale definitions, dots and commas

2008-03-12 Thread Andrew W. Nosenko
On Wed, Mar 12, 2008 at 6:09 PM, Carlos Pereira
[EMAIL PROTECTED] wrote:
  Thanks for your answers, I realize this is not Gtk stuff,
  but certainly affects every GTK app involving decimal numbers...

  After setting in my .bashrc, for example (the same with portuguese,
  russian, etc.):

  LC_ALL=french; export LC_ALL

  Everything automatically works in my GTK app, with commas instead of
  dots, including exporting and importing files (involving for example the
  Expat XML library).

  However, a problem remains: my app is distributed with several hundreds
  of example data files, ready to be imported. If these files are
  dot-based, comma people cannot import them. If these files are
  comma-based, dot people cannot import them... Unless I have two versions
  for each file (which seems odd), or I supply a script to automatically
  convert dot- to comma-based files...

  If I use gtk_disable_setlocale, then dots are always used, but that does
  not seem quite right... basically I am ignoring user's preference for
  commas...

  Is there a good solution for this? am I missing something?
  What is the standard procedure in Gnome to handle this problem?

Please, consider some rewirtting of your application to do not write
locale-dependent values (floating point numbers, month abbrevs,
day-of-week abbrevs, and so on...) in the data files, or your files
will become unreadable after changing of locale (and, if I understand
correctly, you already hit this problem).  Use some locale-independent
variant instead.

For case of the floating point values it could be dot-based variant as
in the C locale.

See g_ascii_dtostr() and/or g_ascii_formatd()  for
formatting/serialization of double to string, and g_ascii_strtod()
and/or g_strtod() converting back from string to double.

-- 
Andrew W. Nosenko [EMAIL PROTECTED]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Locale definitions, dots and commas

2008-03-12 Thread zz
On Wednesday 12 March 2008 17:31:32 Andrew W. Nosenko wrote:
 On Wed, Mar 12, 2008 at 6:09 PM, Carlos Pereira
 [EMAIL PROTECTED] wrote:
   Thanks for your answers, I realize this is not Gtk stuff,
   but certainly affects every GTK app involving decimal numbers...
 
   After setting in my .bashrc, for example (the same with portuguese,
   russian, etc.):
 
   LC_ALL=french; export LC_ALL
 
   Everything automatically works in my GTK app, with commas instead of
   dots, including exporting and importing files (involving for example the
   Expat XML library).
 
   However, a problem remains: my app is distributed with several hundreds
   of example data files, ready to be imported. If these files are
   dot-based, comma people cannot import them. If these files are
   comma-based, dot people cannot import them... Unless I have two versions
   for each file (which seems odd), or I supply a script to automatically
   convert dot- to comma-based files...
 
   If I use gtk_disable_setlocale, then dots are always used, but that does
   not seem quite right... basically I am ignoring user's preference for
   commas...
 
   Is there a good solution for this? am I missing something?
   What is the standard procedure in Gnome to handle this problem?
 
 Please, consider some rewirtting of your application to do not write
 locale-dependent values (floating point numbers, month abbrevs,
 day-of-week abbrevs, and so on...) in the data files, or your files
 will become unreadable after changing of locale (and, if I understand
 correctly, you already hit this problem).  Use some locale-independent
 variant instead.
 
 For case of the floating point values it could be dot-based variant as
 in the C locale.
 
 See g_ascii_dtostr() and/or g_ascii_formatd()  for
 formatting/serialization of double to string, and g_ascii_strtod()
 and/or g_strtod() converting back from string to double.
 

Maybe you can use some char based format as DECIMAL in mysql.

DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]

For MySQL 5.0.3 and above:

A packed “exact” fixed-point number. M is the total number of digits (the 
precision) and D is the number of digits after the decimal point (the scale). 
The decimal point and (for negative numbers) the ‘-’ sign are not counted in M. 
If D is 0, values have no decimal point or fractional part. The maximum number 
of digits (M) for DECIMAL is 65 (64 from 5.0.3 to 5.0.5). The maximum number of 
supported decimals (D) is 30. If D is omitted, the default is 0. If M is 
omitted, the default is 10.

UNSIGNED, if specified, disallows negative values.

All basic calculations (+, -, *, /) with DECIMAL columns are done with a 
precision of 65 digits. 


so for example 123456,01 if you use as standard value DECIMAL(10,2) would be 
12345601.
This value could then be converted at runtime when imported to the correct 
decimal separator.

val = atoi(1234501) / 100;

Just an idea,
Tito

PS: sorry for the double post
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Locale definitions, dots and commas

2008-03-12 Thread Carlos Pereira
Andrew W. Nosenko wrote:
 On Wed, Mar 12, 2008 at 6:09 PM, Carlos Pereira
 [EMAIL PROTECTED] wrote:
   
  Thanks for your answers, I realize this is not Gtk stuff,
  but certainly affects every GTK app involving decimal numbers...

  After setting in my .bashrc, for example (the same with portuguese,
  russian, etc.):

  LC_ALL=french; export LC_ALL

  Everything automatically works in my GTK app, with commas instead of
  dots, including exporting and importing files (involving for example the
  Expat XML library).

  However, a problem remains: my app is distributed with several hundreds
  of example data files, ready to be imported. If these files are
  dot-based, comma people cannot import them. If these files are
  comma-based, dot people cannot import them... Unless I have two versions
  for each file (which seems odd), or I supply a script to automatically
  convert dot- to comma-based files...

  If I use gtk_disable_setlocale, then dots are always used, but that does
  not seem quite right... basically I am ignoring user's preference for
  commas...

  Is there a good solution for this? am I missing something?
  What is the standard procedure in Gnome to handle this problem?
 

 Please, consider some rewirtting of your application to do not write
 locale-dependent values (floating point numbers, month abbrevs,
 day-of-week abbrevs, and so on...) in the data files, or your files
 will become unreadable after changing of locale (and, if I understand
 correctly, you already hit this problem).  Use some locale-independent
 variant instead.

 For case of the floating point values it could be dot-based variant as
 in the C locale.

   
Fortunately the only locale dependent values I have issues with
are decimal numbers.

If I follow Martin's suggestion, inserting gtk_disable_setlocale ()
before gtk_init (), everything is consistent and works fine, XML 
importing/exporting, GTK interfaces, etc. I just tested it.

Unfortunately this means always using dot-based decimals. I always
use dots myself, so this is not an issue for me. But I understand that
other people might wish to use commas instead.

I think the ideal solution is: when importing files, accept both
dots and commas, so for example this XML line should be acceptable:

element x=1.0 y=2,0/

Then do all the work in the locale chosen decimal separator. So a US
user would work and export with dots, send the file to his french friend,
who reads the dots and then works with commas, export with commas,
send the file back to the US user who reads the commas without problems.

In fact I suspect this is how programs tend to work these days (I tested
Origin, I believe Excell does this also, etc.). Unfortunately it also means
that comma cannot be easily used as a separator in txt files.

I tried to read a file test.txt with only this line inside:
1.0 2,0
Gnumeric thinks the comma is a separator. OOCalc
asks for a separator, and after chosing space separators
reads 1.0 and 2,0 in two different cells, but changing the
number of decimal figures works only for 1.0 ...

Even if I use:
1,0 2,0
with LC_ALL set to french, gnumeric still ignores the commas
and reads this as 1 followed by 02 followed by 0 ...

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


app/window deactivation handling

2008-03-12 Thread Steve Splonskowski
Hello,

In an app we are working on we have some things that need to be done  
when the app (or window since we only have one main window) is  
deactivated. That is when the use switches to another application we  
want to get control to clean somethings up before being deactivated.

Any pointers on where to hook into this?


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


Re: app/window deactivation handling

2008-03-12 Thread Steve Splonskowski
Sorry for the loose terminology (thankfully I am not from the Windows  
world!).

I mean when the application looses focus (and is still running).


steve



On Mar 12, 2008, at 3:35 PM, G Hasse wrote:

 On Wed, Mar 12, 2008 at 03:20:15PM -0700, Steve Splonskowski wrote:
 Hello,

 In an app we are working on we have some things that need to be done
 when the app (or window since we only have one main window) is
 deactivated. That is when the use switches to another application we
 want to get control to clean somethings up before being deactivated.

 Do you mean that the application is loosing focus? It seems that  
 you are
 using some MS Windows lingo? An application kan lose focus - but it is
 still running. Are you meaning when the applicatioin exit?

 -- 
 Göran Hasse

 
 Göran Hasse   email: [EMAIL PROTECTED]  Tel: 08-6949270
 Raditex AB http://www.raditex.se
 Planiavägen 15, 1tr Mob: 070-5530148
 131 34  NACKA, SWEDEN OrgNr: 556240-0589
 VAT: SE556240058901
 --


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


Re: app/window deactivation handling

2008-03-12 Thread Eduardo M KALINOWSKI
Steve Splonskowski wrote:
 Hello,

 In an app we are working on we have some things that need to be done  
 when the app (or window since we only have one main window) is  
 deactivated. That is when the use switches to another application we  
 want to get control to clean somethings up before being deactivated.

 Any pointers on where to hook into this?
   

Look at the focus_in_event and focus_out_event signals.


-- 
You'll always be,
What you always were,
Which has nothing to do with,
All to do, with her.
-- Company

Eduardo M KALINOWSKI
[EMAIL PROTECTED]
http://move.to/hpkb

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