GtkComboBox and Libglade

2007-03-12 Thread Olivier Delhomme
Hello,

Is there a way to have a default value automatically selected in a combobox
created with libglade  ?

thanks,

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


Re: GtkEntryCompletion on a GtkCellRendererText

2007-03-12 Thread Vivien Malerba
On 3/3/07, Philip Withnall [EMAIL PROTECTED] wrote:
 Hi all,

 I've got a table of database rows set up using a GtkTreeView with a
 GtkListStore backend, and GtkCellRendererTexts for the table cells. This
 is all working nicely.

 What I'd like to do is have auto-completion available when editing the
 text cells, with a GtkEntryCompletion, but I can't figure out how to add
 one. The most likely way would be to get a pointer to the
 GtkCellRendererText's GtkEntry, but I can't find a way to do that. I
 also can't find any gtk_cell_renderer_text_* methods for adding a
 GtkEntryCompletion, or an object equivalent to a GtkEntryCompletion for
 use on GtkCellRendererTexts.


If it's not too late, I'd suggest trying first to code your own cell
renderer based on the GtkCellRendererText (add a property to specify
the completion), and when it works, propose it as an evolution in
bugzilla.

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


Re: GtkComboBox and Libglade

2007-03-12 Thread Tristan Van Berkom
On Mon, 2007-03-12 at 16:21 +0100, Olivier Delhomme wrote:
 Hello,
 
 Is there a way to have a default value automatically selected in a combobox
 created with libglade  ?

Have you tried setting the Active Item property ?

Cheers,
   -Tristan


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


Re: GtkComboBox and Libglade

2007-03-12 Thread Olivier Delhomme
2007/3/12, Tristan Van Berkom [EMAIL PROTECTED]:

 On Mon, 2007-03-12 at 16:21 +0100, Olivier Delhomme wrote:
  Hello,
 
  Is there a way to have a default value automatically selected in a
 combobox
  created with libglade  ?

 Have you tried setting the Active Item property


Where do you set such a property ? I have tried directly in XML tree, but
that
doesn't seem to work. Does this property takes the item number or the text
of the item itself ?

Cheers,

Olivier.


Cheers,
-Tristan



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


is there a g_option_print_usage() command?

2007-03-12 Thread Rick Jones
I see that goption can uatomagically handle --help and the like.  I'd 
like to emit a usage string when someone gives a bogus option - is there 
  a call one can make to just print the same stuff that goption does on 
its own with --help, or do I have to mess about with error hooks?

http://developer.gnome.org/doc/API/2.0/glib/glib-Commandline-option-parser.html
didn't mention one - before I use something I find from source I'd want 
to check that it was simply an oversight in the api docs :)

thanks,

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


displaying 2 images

2007-03-12 Thread lucks

hi...am using gtk+ on windows and am using visual c++ as compiler..in fact am
new to gtk+ programming and am having a difficulty in displaying 2 different
images by selecting a single item from combobox...when i displayed for one
image it works but to display another image for the same selected item
doesnt work...can anyone help me please?

here is the code that am using for the combobox signal:

void
on_cbo_pickobject_changed  (GtkComboBox *combobox,
gpointer user_data)
{

gchar *mystr;   

mystr = gtk_combo_box_get_active_text (combobox);

 if (strcmp (mystr, Chair 1) == 0)
{

/*this will display the first image(Chair 1.jpg) in the
img_objectpreview when Chair 1is selected from the
combobox***/
  
GtkWidget *myimage_object = lookup_widget(GTK_WIDGET(combobox),
img_objectpreview);   gtk_image_set_from_file
(GTK_IMAGE(myimage_object), Pictures/Chair 1.jpg); 

/*i added this piece of code for a second image(Chair 1.gif) to be
displayed in img_patternpreview/

   GtkWidget *myimage_pattern = lookup_widget(GTK_WIDGET(combobox),
img_patternpreview);  gtk_image_set_from_file
(GTK_IMAGE(myimage_pattern), Pictures/Chair 1.gif); 

}

else
{
.../* show default image */
}
 
g_free (mystr);

}

here is the error i got when compiled:

callbacks.c(162) : error C2275: 'GtkWidget' : illegal use of this type as an
expression
callbacks.c(162) : error C2065: 'myimage_pattern' : undeclared identifier




can someone please help me? what is missing in the code above? can someone
add the missing code for me please?? how will it work? please help..

i would be much grateful if someone can help me please..

thanks
-- 
View this message in context: 
http://www.nabble.com/displaying-2-images-tf3392267.html#a9443360
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.

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


Re: displaying 2 images

2007-03-12 Thread Yeti
On Mon, Mar 12, 2007 at 02:03:57PM -0700, lucks wrote:
 
 here is the code that am using for the combobox signal:

When you post code, please make it possible to read...

 void
 on_cbo_pickobject_changed  (GtkComboBox *combobox,
 gpointer user_data)
 {
 
 gchar *mystr; 
   
   mystr = gtk_combo_box_get_active_text (combobox);
 
  if (strcmp (mystr, Chair 1) == 0)  
   {
 
 /*this will display the first image(Chair 1.jpg) in the
 img_objectpreview when Chair 1is selected from the
 combobox***/
 
 GtkWidget *myimage_object = lookup_widget(GTK_WIDGET(combobox),
 img_objectpreview); gtk_image_set_from_file
 (GTK_IMAGE(myimage_object), Pictures/Chair 1.jpg); 

...because this makes very hard to find where one statement
ends and another starts.  And when it is hard even to find
the end of one statement and the start of another, how you
can hope to find bugs there (or ask others to find them for
you)?

 /*i added this piece of code for a second image(Chair 1.gif) to be
 displayed in img_patternpreview/
 
GtkWidget *myimage_pattern = lookup_widget(GTK_WIDGET(combobox),
 img_patternpreview);gtk_image_set_from_file
 (GTK_IMAGE(myimage_pattern), Pictures/Chair 1.gif); 
 
 }
   
 else
   {
   .../* show default image */
   }
  
   g_free (mystr);
 
 }
 
 here is the error i got when compiled:
 
 callbacks.c(162) : error C2275: 'GtkWidget' : illegal use of this type as an
 expression
 callbacks.c(162) : error C2065: 'myimage_pattern' : undeclared identifier

Also either include the complete file or note which line is
the one referenced in the error message (162 here).  Without
that it is impossible to tell not only which line of the
snippet is 162 but also whether the included code contains
line 162 at all.

Now, the problem is -- probably, as no one knows what is
actually on line 162 -- still the same it was five days ago
when you asked the first time:  You cannot mix declarations
and code in C.  This is mixed:

declaration-  GtkWidget *myimage_object = ...
code   -  gtk_image_set_from_file(...
declaration-  GtkWidget *myimage_pattern = ...
code   -  gtk_image_set_from_file(...

This is in the proper order declaration(s), then code:

declaration-  GtkWidget *myimage;
code   -  myimage = lookup_widget(...
code   -  gtk_image_set_from_file(...
code   -  myimage = lookup_widget(...
code   -  gtk_image_set_from_file(...

Yeti

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


GTK+ 2.10.10 released

2007-03-12 Thread Matthias Clasen
GTK+ 2.10.10 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/v2.10/
 http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.10/

gtk+-2.10.10.tar.bz2   md5sum: 73967e62a2e2e588ace772ac9db1bc32
gtk+-2.20.10.tar.gzmd5sum: c8d11992d13466147a00dfadb333f83d

This is a bugfix release in the 2.10.x 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.8 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.10.9 to 2.10.10
===

* Bugs fixed:
 329450 Crash on IM switch ... (was already reported earlier)
 406757 crash in Movie Player: Souhaite lire un DVD ave...
 382565 GtkTextView invisible text crash
 402453 crash to IA__gdk_x11_window_set_user_time
 409101 invalid read to gtkicontheme.c insert_theme(), might caus...
 413032 Locking issue with xcb in IA__gdk_display_sync
 402131 Theme color scheme is sometimes ignored on theme switches
 405327 io-jpeg can return FALSE without setting a GError
 124045 GtkExpander should draw the focus around the arrow when t...
 143213 shortcut selector on gtkfilechooser use too much horizonta...
 151169 Filechooser comes up too big
 153785 Filechooser expands horizontally
 347106 tga images upside down
 356515 [a11y] Orca unable to read items in Evolution Select a F...
 377164 Strange numbers in GtkRecentChooserMenu
 386618 Resizing columns need focusing first
 389765 Win32: Resizing a window does not repaint it often enough...
 393599 Previous and Next menus not active in a folder with *.ico...
 399907 Memory leak in gtk_page_setup dialog
 402565 [PATCH]GtkPrintBackendFile leaks string
 402806 GtkAboutDialog showing empty contributors
 403139 Leak reported by valgrind
 403255 gdk_pixbuf_loader_close returns TRUE but sets *error
 403409 Add a helpful comment on GtkCellRendererText:alignment
 403896 gtk+-2.10.9 fails to compile against win32api-3.8 due to ...
 405539 gdk_pixbuf_save() for PNG saver can return FALSE without ...
 405696 Make parent menu item insensitive if no items are to be s...
 409357 leak in color scheme code
 412221 Icons not working with Win32 file-system backend.
 412596 Setting the colour scheme property of GtkSettings has no ...
 413492 Minor build tweaks
 413664 Dragging tab greys out chat windows
 415645 Fix and clean up GtkCellRendererAccel
 310522 Buttons flicker and redraw slowly
 396899 glib mentions non-existing PATCH bugzilla keyword
 408018 GtkTextBuffer memory leak
 414875 Rendering the first icon triggers a style reset
 325477 Just make File Chooser window bigger
 414975 the popped up menu cannot have special theming
 331369 Menu short cuts do not work
 350988 crash with File Open in non-exisiting directory
 364946 crash in gtk_tree_model: Adding new account, or entering ...
 351671 textview should stop selecting when losing focus
 382904 Application crashed in gtk+
 385637 crash in testiconview
 396703 crash in testnouiprint
 396805 GtkTextView: crash on unsetting the GtkTextBuffer when in...
 410565 gnome-terminal crashes editing current profile
 335796 Gtk accelerator key event can't be passed to other widget...
 356515 [a11y] Orca unable to read items in Evolution Select a F...
 416525 gtkfilesystemwin32.c: C99 declaration
 372449 no need to emphasise the Location label
 402144 spinbutton window background not reset on theme switch

* New and updated translations (ar,[EMAIL PROTECTED],bg,ca,de,
  dz,el,en_GB,eo,fi,fr,gu,hu,ja,ko,lt,mk,ml,nb,nl,pl,
  pt,pt_BR,ro,ru,sl,sq,sr,[EMAIL PROTECTED],sv,ta,th,uk,vi,zh_CN,
  zh_HK,zh_TW)


A list of all bugs fixed in this release can be found at

Re: is there a g_option_print_usage() command?

2007-03-12 Thread James Scott Jr
On Mon, 2007-03-12 at 12:08 -0700, Rick Jones wrote:

 I see that goption can uatomagically handle --help and the like.  I'd 
 like to emit a usage string when someone gives a bogus option - is there 
   a call one can make to just print the same stuff that goption does on 
 its own with --help, or do I have to mess about with error hooks?
 
 http://developer.gnome.org/doc/API/2.0/glib/glib-Commandline-option-parser.html
 didn't mention one - before I use something I find from source I'd want 
 to check that it was simply an oversight in the api docs :)
 
 thanks,
 
 rick jones
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Rick,

The link you supplied gave a partial example that works.  However, here
is a full example; notice the if statement around
g_option_context_parse().

BEGIN EXAMPLE

/* gapc_notify.c20070123
 
  libnotify messaging routine for Linux scripting languages.
  output a titled message box to the graphical screen for 10 seconds

  Copyright (C) 2007 James Scott, Jr. [EMAIL PROTECTED]
  
  Compile Requirements: { tested on FC6 }
libnotify-0.4.2
libnotify-devel-0.4.2
gtk-2.6+
glib-2.6+

  Compile Command:
   $ gcc `pkg-config --cflags --libs libnotify` -o gapc_notify
gapc_notify.c
   
  Usage:
   $ ./gapc_notify -s 5 -t title of messagebox -m message in the box
   or 
   $ ./gapc_notify --help

  GPL2
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   
*/

#include libnotify/notify.h
#include stdio.h
#include unistd.h

static gchar   *gd_pch_title;
static gchar   *gd_pch_body;
static gchar   *gd_pch_icon;
static gint gd_i_seconds;

int main(int argc, char * argv[] ) 
{
NotifyNotification *nctx;  
GError  *gerror = NULL;
GOptionContext *context = NULL;
GOptionEntry entries[] = {
  {title, 't', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,
gd_pch_title,
 Title text on msg box, Uninterruptible Power Supply},
  {message, 'm', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,
gd_pch_body,
 Message body text, message},
  {icon-name, 'i', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,
gd_pch_icon,
 icon to include next to message,
gtk-dialog-info ...-warning ...-error},
  {show-seconds, 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT,
gd_i_seconds,
 seconds to display message, 10}, 
  {NULL}
};

/* Get command line parms */
context = g_option_context_new (
 - APCUPSD Commandline Notification Utility
 GPL2 [2007] [EMAIL PROTECTED]);
g_option_context_add_main_entries(context, entries, NULL);
g_option_context_set_ignore_unknown_options(context, FALSE);
if (!(g_option_context_parse(context, argc, argv, gerror))) {
 g_warning (Parse command line failed: %s, gerror-message);
 g_option_context_free(context);
 g_error_free(gerror);
 return (1);
}

if (gd_pch_title == NULL) {
gd_pch_title = Uninterruptible Power Supply;
}
if (gd_pch_body == NULL) {
gd_pch_body = message;
}
if (gd_pch_icon == NULL) {
gd_pch_icon = gtk-dialog-info;
}
if (gd_i_seconds  1 ) {
gd_i_seconds = 10;
}
  
notify_init(gapc_notify);

nctx = notify_notification_new (gd_pch_title, gd_pch_body,
gd_pch_icon, NULL); 

notify_notification_set_timeout (nctx, (gd_i_seconds * 1000) ); //
10 seconds

if (!notify_notification_show (nctx, NULL)) 
{
fprintf(stderr, failed to send notification\n);
return 2;
}

g_object_unref(G_OBJECT(nctx));

notify_uninit();

return 0;
}


END EXAMPLE




James Scott, Jr. 
Registered Linux User #270764
FC6 on Dual AMD-MP 2400+
Author: {gfhcm, gkrellfah2,gapcmon,giw}.sourceforge.net
http://mysite.verizon.net/skoona/index.html
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Pango-1.16.1 released

2007-03-12 Thread Behdad Esfahbod
Pango-1.16.1 is now available for download at:

  http://download.gnome.org/sources/pango/1.16/

4aa720633e53701a652f27700a7946dd  pango-1.16.1.tar.bz2
8002b54b956e1194a6145a765a267638  pango-1.16.1.tar.gz


This is a stable release and is source and binary compatible
with 1.16.0.


About Pango
===

Pango is a library for layout and rendering of text, with an emphasis
on internationalization. Pango can be used anywhere that text layout
is needed, though most of the work on Pango so far has been done in
the context of the GTK+ widget toolkit. Pango forms the core of text
and font handling for GTK+-2.x.

Pango is designed to be modular; the core Pango layout engine can
be used with different font backends. There are three basic backends,
with multiple options for rendering with each.

 - Client side fonts using the FreeType and fontconfig libraries.
   Rendering can be with with Cairo or Xft libraries, or directly
   to an in-memory buffer with no additional libraries.

 - Native fonts on Microsoft Windows using Uniscribe for complex-text
   handling. Rendering can be done via Cairo or directly using the
   native Win32 API.

 - Native fonts on MacOS X, rendering via Cairo.

The integration of Pango with Cairo (http://cairographics.org)
provides a complete solution with high quality text handling
and graphics rendering.

Dynamically loaded modules then handle text layout for particular
combinations of script and font backend. Pango ships with a wide
selection of modules, including modules for Hebrew, Arabic,
Hangul, Thai, and a number of Indic scripts. Virtually all of the
world's major scripts are supported.

As well as the low level layout rendering routines, Pango includes
PangoLayout, a high level driver for laying out entire blocks of text,
and routines to assist in editing internationalized text.

More information about Pango is available from http://www.pango.org/.
Bugs should be reported to http://bugzilla.gnome.org.

Pango 1.16 depends on version 2.12.0 or newer of the GLib
library and version 1.2.6 or newer of the cairo library (if the
cairo backend is desired); more information about GLib and cairo
can be found at http://www.gtk.org/ and http://cairographics.org/
respectively.

Overview of changes between 1.16.0 and 1.16.1
==
- Improved Win32 backend: The Win32 backend has been
  updated to always require Uniscribe at compile-time (it still
  is optional at run-time), and to use the wide-character variants
  of Windows APIs which improves the backend in many ways.  The
  1.16.0 release is obsolete as far as the Win32 backend is
  concerned, and official DLLs were not built for it.
- Misc build system fixes
- Bugs fixed in this release:
Bug 110521 – can't find bold and/or italic fonts on win32
Bug 120195 – there are some functions in pangowin32-fontmap.c that
might maybe should be static
Bug 407315 – Use wide character Win32 API in the pangowin32 code
Bug 412654 – SED variable undefined in the `libtool --config' output
used by configure
Bug 414297 – Fails to build with --enable-static
--with-included-modules in thai lang module
Patch from Loïc Minier

12 March 2007
Behdad Esfahbod
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list