GtkImage with animation: animation stops when all frames are shown

2007-06-01 Thread Alexander Semyonov
Hello. I create GtkImage with animation:

GdkPixbufSimpleAnim *anim = gdk_pixbuf_simple_anim_new (w, h, RATE);
gdk_pixbuf_simple_anim_add_frame (anim, pixbuf1);
gdk_pixbuf_simple_anim_add_frame (anim, pixbuf2);
gdk_pixbuf_simple_anim_add_frame (anim, pixbuf3);
...
GtkWidget *image = gtk_image_new_from_animation (GDK_PIXBUF_ANIMATION
(anim));

But when i display it animation stops when all animation frames are shown,
but i want to have a circular animation. It looks that I should use some
g_timeout_add (...) or anything else. Can someone help me with?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Virtual list boxes (using GtkTreeView or other)

2007-06-01 Thread Nuno Lucas
Hello,

I have been googling for some form of virtual list boxes, but can't
seem to find any reference.

How people do with very large list boxes? I was hopping I could have
some form of just seting up the column headers and say I have 1
rows and let the widget ask me for the data when it needs it.

It seems a bit heavy to add 1 rows one at a time, as it seems I'm
forced to do even if I derive my own ListStore.

Any hints?


Regards,
~Nuno Lucas
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Virtual list boxes (using GtkTreeView or other)

2007-06-01 Thread Andreas Stricker
Nuno Lucas schrieb:
 How people do with very large list boxes? I was hopping I could have
 some form of just seting up the column headers and say I have 1
 rows and let the widget ask me for the data when it needs it.
 
 It seems a bit heavy to add 1 rows one at a time, as it seems I'm
 forced to do even if I derive my own ListStore.

You have to derive your own GtkTreeModel, if the predefined GtkListStore
or GtkTreeStore are not sufficient (They simply stores all data at once).

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


Re: Virtual list boxes (using GtkTreeView or other)

2007-06-01 Thread Miroslav Rajcic
You can use gtk_tree_view_column_set_cell_data_func to register a callback
method to supply data for the tree view.

Regards,
  Miroslav

- Original Message - 
From: Nuno Lucas [EMAIL PROTECTED]
To: gtk-app-devel-list@gnome.org
Sent: Friday, June 01, 2007 2:53 PM
Subject: Virtual list boxes (using GtkTreeView or other)


 Hello,

 I have been googling for some form of virtual list boxes, but can't
 seem to find any reference.

 How people do with very large list boxes? I was hopping I could have
 some form of just seting up the column headers and say I have 1
 rows and let the widget ask me for the data when it needs it.

 It seems a bit heavy to add 1 rows one at a time, as it seems I'm
 forced to do even if I derive my own ListStore.

 Any hints?


 Regards,
 ~Nuno Lucas
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

 __ NOD32 2304 (20070601) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com

 

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


gdk_pixbuf_save question

2007-06-01 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Is there a way to add a creator tag when saving a jpeg image using
gdk_pixbuf_save.

For example I would like to put the name of my program in the jpeg image
so that I know what created that image. Even setting some if the EXIF
data would be ok. Is there any way to do that?

Thanks,

Kevin
- --
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x7D0BD5D1
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org

iD8DBQFGYCjO6w2kMH0L1dERAgrlAJ9wBGYDPaMe8YZAqyTN/O3ElK5L5QCeOBhM
brqp2dvimf7t3dGNeQsS6uc=
=J026
-END PGP SIGNATURE-
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gdk_pixbuf_save question

2007-06-01 Thread Dr. Michael J. Chudobiak
Kevin DeKorte wrote:
 Is there a way to add a creator tag when saving a jpeg image using
 gdk_pixbuf_save.
 
 For example I would like to put the name of my program in the jpeg image
 so that I know what created that image. Even setting some if the EXIF
 data would be ok. Is there any way to do that?

The gdk_pixbuf routines do not support saving exif data.

You would need to save your jpeg file, then use libexif, exiv2, or 
another library to write the exif data to the jpeg (i.e., a second file 
write). gThumb, for example, uses libexif.

- Mike

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


cross compiling and ld auto-import errors

2007-06-01 Thread Bethany Seeger
Hi, 

I'm cross compiling a linux application to work on Windows using
i586-mingw32msvc-gcc. 

The application is using Gtk and Gdk calls.  

I'm getting linking errors about glib that I don't know how to resolve.
Here's the compile time output. 

i586-mingw32msvc-gcc   demo.o dthread.o callbacks.o interface.o
hsv2rgb.o polar.o rebin.o scope.o seismograph.o sgram.o spin.o
vbargraph.o
waterfall.o  /usr/local/win32gtk2.4/Runtime/lib/iconv.dll 
/usr/local/win32gtk2.4/Runtime/lib/intl.dll 
/usr/local/win32gtk2.4/Runtime/lib/libatk-1.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libgdk-win32-2.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libgdk_pixbuf-2.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libglib-2.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libgmodule-2.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libgobject-2.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libgthread-2.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libgtk-win32-2.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libpango-1.0-0.dll 
/usr/local/win32gtk2.4/Runtime/lib/libpangowin32-1.0-0.dll -lm -o demo
polar.o:polar.c:(.text+0x2a5): variable
'_g_thread_functions_for_glib_use' can't be auto-imported. Please read
the documentation for ld's --enable-auto-import for details.
polar.o:polar.c:(.text+0x2e1): variable
'_g_thread_functions_for_glib_use' can't be auto-imported. Please read
the documentation for ld's --enable-auto-import for details.
polar.o:polar.c:(.text+0x913): variable
'_g_thread_functions_for_glib_use' can't be auto-imported. Please read
the documentation for ld's --enable-auto-import for details.
polar.o:polar.c:(.text+0x95d): variable
'_g_thread_functions_for_glib_use' can't be auto-imported. Please read
the documentation for ld's --enable-auto-import for details.
polar.o:polar.c:(.text+0x19a0): variable
'_g_thread_functions_for_glib_use' can't be auto-imported. Please read
the documentation for ld's --enable-auto-import for details.
polar.o:polar.c:(.text+0x19dc): variable
'_g_thread_functions_for_glib_use' can't be auto-imported. Please read
the documentation for ld's --enable-auto-import for details.
Info: resolving _g_threads_got_initialized by linking to
__imp__g_threads_got_initialized (auto-import)
Info: resolving _g_thread_functions_for_glib_use by linking to
__imp__g_thread_functions_for_glib_use (auto-import)
collect2: ld returned 1 exit status
make: *** [demo] Error 1

From what I've read, I need to force (external) constants to be
variables, but I'm not sure how I can do that when the errors are coming
from the glib library, underneath Gtk/Gdk.  (or declare them explicitly
with __declspec(dllimport)).  

I'm relatively new to cross-compiling, so I'm a little baffled as to
where to go with this. 

Any advice you can offer would be greatly appreciated. 

Thanks,
Bethany

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


Re: Virtual list boxes (using GtkTreeView or other)

2007-06-01 Thread Nuno Lucas
On 6/1/07, Andreas Stricker [EMAIL PROTECTED] wrote:
 Nuno Lucas schrieb:
  How people do with very large list boxes? I was hopping I could have
  some form of just seting up the column headers and say I have 1
  rows and let the widget ask me for the data when it needs it.
 
  It seems a bit heavy to add 1 rows one at a time, as it seems I'm
  forced to do even if I derive my own ListStore.

 You have to derive your own GtkTreeModel, if the predefined GtkListStore
 or GtkTreeStore are not sufficient (They simply stores all data at once).

I may be missing something, but I don't see a way to set the number of
virtual rows.

From what I see in the documentation, the only way to grow is by
appending a single row at a time (which I guess then emits the
row-changed signal and updates the scrollbar).

What seems to be missing is a way to say I already have 10k, 100k or
even 1M rows of data ready (at least I will cache that data myself).

Even if I implement my own GtkTreeModel, I don't see a way of escaping
this limitation. At least on the documentation.


Regards,
~Nuno Lucas

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


Re: Virtual list boxes (using GtkTreeView or other)

2007-06-01 Thread Yeti
On Fri, Jun 01, 2007 at 03:47:36PM +0100, Nuno Lucas wrote:
 
  You have to derive your own GtkTreeModel, if the predefined GtkListStore
  or GtkTreeStore are not sufficient (They simply stores all data at once).
 
 I may be missing something, but I don't see a way to set the number of
 virtual rows.

See http://gwyddion.net/documentation/head/libgwydgets/GwyNullStore.php
for a simple purely virtual store.  This is a cheap hack,
but it demonstrates the point IMO.

 From what I see in the documentation, the only way to grow is by
 appending a single row at a time (which I guess then emits the
 row-changed signal and updates the scrollbar).

You are mixing two things here:
- if the model grows is must emit the row-inserted signal,
  because if it does not do this, the tree views showing it
  break
- however, if no one is watching, namely when the model is
  created, it can be instantaneously created with a million
  of rows

There are more troubles with huge tree views, namely the
tree view needs to know the sizes of the columns and rows --
even those not currently visible as they still affect what
is visible.  So you will probably end up using all the
confusing fixed size modes, and avoiding work in cell data
functions for invisible cells.

However, for a milion of rows scrolling through the tree
manually is no longer useful anyway, i.e. the user interface
ceases to be suitable for the task.  You may want to use
a multilevel or search+paging base interface instead --
essentially something that avoids the signle list with
a million of rows by design.

Yeti

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


Re: Virtual list boxes (using GtkTreeView or other)

2007-06-01 Thread Nuno Lucas
On 6/1/07, David Nečas (Yeti) [EMAIL PROTECTED] wrote:
 On Fri, Jun 01, 2007 at 03:47:36PM +0100, Nuno Lucas wrote:
  
   You have to derive your own GtkTreeModel, if the predefined GtkListStore
   or GtkTreeStore are not sufficient (They simply stores all data at once).
 
  I may be missing something, but I don't see a way to set the number of
  virtual rows.

 See http://gwyddion.net/documentation/head/libgwydgets/GwyNullStore.php
 for a simple purely virtual store.  This is a cheap hack,
 but it demonstrates the point IMO.

Thanks! That is exactly the kind of sample I needed to look at!

  From what I see in the documentation, the only way to grow is by
  appending a single row at a time (which I guess then emits the
  row-changed signal and updates the scrollbar).

 You are mixing two things here:
 - if the model grows is must emit the row-inserted signal,
   because if it does not do this, the tree views showing it
   break
 - however, if no one is watching, namely when the model is
   created, it can be instantaneously created with a million
   of rows

I see. Now I understand. I only need to implement my own store
and make sure I only call gtk_tree_set_model() after I set the
number of rows I want.

 There are more troubles with huge tree views, namely the
 tree view needs to know the sizes of the columns and rows --
 even those not currently visible as they still affect what
 is visible.  So you will probably end up using all the
 confusing fixed size modes, and avoiding work in cell data
 functions for invisible cells.

I am aware of this kind of problems and am expecting them.

 However, for a milion of rows scrolling through the tree
 manually is no longer useful anyway, i.e. the user interface
 ceases to be suitable for the task.  You may want to use
 a multilevel or search+paging base interface instead --
 essentially something that avoids the signle list with
 a million of rows by design.

I agree, but that's what the boss wants ;-)

On the other hand, as I'm using a generic tree view to show a list, I
could use that property to show a next and previous page controls (as
owner drawn root columns) and restrict the ouput to some row limit.

 Yeti

Thank you, you were most helpful.

Best regards,
~Nuno Lucas
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: cross compiling and ld auto-import errors

2007-06-01 Thread Bethany Seeger
Never mind, I solved it.  There were a few g_mutex_lock/unlock calls in
the code and that seemed to be the problem. I replaced them with
gdk_threads_enter() and gdk_threads_leave() (after ensuring that
g_threads_init() and gdk_threads_init() were both called) and the linker
was much happier. 

-Bethany

On Fri, 2007-06-01 at 10:43 -0400, Bethany Seeger wrote:
 Hi, 
 
 I'm cross compiling a linux application to work on Windows using
 i586-mingw32msvc-gcc. 
 
 The application is using Gtk and Gdk calls.  
 
 I'm getting linking errors about glib that I don't know how to resolve.
 Here's the compile time output. 
 
 i586-mingw32msvc-gcc   demo.o dthread.o callbacks.o interface.o
 hsv2rgb.o polar.o rebin.o scope.o seismograph.o sgram.o spin.o
 vbargraph.o
 waterfall.o  /usr/local/win32gtk2.4/Runtime/lib/iconv.dll 
 /usr/local/win32gtk2.4/Runtime/lib/intl.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libatk-1.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libgdk-win32-2.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libgdk_pixbuf-2.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libglib-2.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libgmodule-2.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libgobject-2.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libgthread-2.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libgtk-win32-2.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libpango-1.0-0.dll 
 /usr/local/win32gtk2.4/Runtime/lib/libpangowin32-1.0-0.dll -lm -o demo
 polar.o:polar.c:(.text+0x2a5): variable
 '_g_thread_functions_for_glib_use' can't be auto-imported. Please read
 the documentation for ld's --enable-auto-import for details.
 polar.o:polar.c:(.text+0x2e1): variable
 '_g_thread_functions_for_glib_use' can't be auto-imported. Please read
 the documentation for ld's --enable-auto-import for details.
 polar.o:polar.c:(.text+0x913): variable
 '_g_thread_functions_for_glib_use' can't be auto-imported. Please read
 the documentation for ld's --enable-auto-import for details.
 polar.o:polar.c:(.text+0x95d): variable
 '_g_thread_functions_for_glib_use' can't be auto-imported. Please read
 the documentation for ld's --enable-auto-import for details.
 polar.o:polar.c:(.text+0x19a0): variable
 '_g_thread_functions_for_glib_use' can't be auto-imported. Please read
 the documentation for ld's --enable-auto-import for details.
 polar.o:polar.c:(.text+0x19dc): variable
 '_g_thread_functions_for_glib_use' can't be auto-imported. Please read
 the documentation for ld's --enable-auto-import for details.
 Info: resolving _g_threads_got_initialized by linking to
 __imp__g_threads_got_initialized (auto-import)
 Info: resolving _g_thread_functions_for_glib_use by linking to
 __imp__g_thread_functions_for_glib_use (auto-import)
 collect2: ld returned 1 exit status
 make: *** [demo] Error 1
 
 From what I've read, I need to force (external) constants to be
 variables, but I'm not sure how I can do that when the errors are coming
 from the glib library, underneath Gtk/Gdk.  (or declare them explicitly
 with __declspec(dllimport)).  
 
 I'm relatively new to cross-compiling, so I'm a little baffled as to
 where to go with this. 
 
 Any advice you can offer would be greatly appreciated. 
 
 Thanks,
 Bethany
 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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


Re: Clear A Pixmap

2007-06-01 Thread nahuel9728

Thaxs Yeti for the answer but Sorry I'm not able to do it. I explain a little
bit what im doing and i would like to do:
main(){
mem_map=gtk_drawing_area_new();
gtk_signal_connect (GTK_OBJECT (mem_map), expose_event,(GtkSignalFunc)
expose_event, NULL);
gtk_signal_connect
(GTK_OBJECT(mem_map),configure_event,(GtkSignalFunc)configure_event,
NULL);
gtk_signal_connect (GTK_OBJECT (mem_map),
button_press_event,(GtkSignalFunc) button_press_event, NULL);
/*A button to erase all the drawed and paint things*/
boton = gtk_button_new_with_label (Clear and paint);
gtk_signal_connect_object (GTK_OBJECT (boton), clicked,GTK_SIGNAL_FUNC
(clear_and_paint),GTK_OBJECT (main_window));
show
}

void expose_event(){
gdk_draw_pixmap
}

void clear_and_pain(GtkWidget *widget, GdkEventExpose *event){
/*HERE I WANNA CLEAN ALL MY DRAWED AREA*/
   gtk_widget_queue_draw_area(GTK_WIDGET(mem_map),0,0,910,440);
/*This up should clean all the area??? */
 
/*And later draw things.*/
draw_brush();
}
Any idea anyone??? Has done somthing similar

David Nečas (Yeti)-2 wrote:
 
 On Thu, May 31, 2007 at 03:35:07PM -0700, nahuel9728 wrote:
 I explain my thing... I have a pixmap, a drawing area. 
 There are events that draw on it. But i have a button that must clear,
 erase
 all the painted on the drawing area.
 Any idea how to make it happen
 
 Make the drawing area repaint (e.g. with gtk_widget_queue_draw())
 and just do not draw anything there in the expose-event
 handler this time.
 
 Yeti
 
 --
 http://gwyddion.net/
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 
 

-- 
View this message in context: 
http://www.nabble.com/Clear-A-Pixmap-tf3849301.html#a10922708
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

Window resizing

2007-06-01 Thread John Coppens
Hi all...

I need a hand. In a program I have a small toolbar separate from the main
window. The toolbar is a GtkToolbar inside a GtkWindow. The problem is
that I cannot seem to make the GtkWindow resize to adjust to the toolbar
size (I want to switch vertical/horizontal). Also, I need to adjust to
other glyph sizes.

I tried to obtain the toolbar's size, but get the actual size, not the
one I need to show the toolbar completely.

It seems as if the toolbar doesn't have any influence on the window's
size...

Can anybody help?

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


Re: Window resizing

2007-06-01 Thread John Coppens
On Fri, 1 Jun 2007 22:13:47 -0300
John Coppens [EMAIL PROTECTED] wrote:

 Hi all...
 
 I need a hand. In a program I have a small toolbar separate from the
 main window. The toolbar is a GtkToolbar inside a GtkWindow. The
 problem is that I cannot seem to make the GtkWindow resize to adjust to
 the toolbar size (I want to switch vertical/horizontal). Also, I need
 to adjust to other glyph sizes.
 
 I tried to obtain the toolbar's size, but get the actual size, not the
 one I need to show the toolbar completely.
 
 It seems as if the toolbar doesn't have any influence on the window's
 size...

Quite accidently, solved! If the 'arrow' is enabled, no size requests
seem to go the window, because the 'arrow' on the toolbar would take care
of shifts anyway. 

Sorry for the noise...

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


gtk+ about dialog doesn't close

2007-06-01 Thread John Zoidberg
Hi,

I have a problem with the gtk about dialog: When I click on the Close button
it doesn't close.
There seems to be no event connected to the close button clicked signal.
And I can't add one either in Glade (v2 as well as v3).

What am I supposed to add to the code so that it works?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk+ about dialog doesn't close

2007-06-01 Thread Samuel Cormier-Iijima
Since GtkAboutDialog is a subclass of GtkDialog, it is intended to be used
as a modal dialog. Hence, you would do something like:

gtk_dialog_run(about_dialog);

gtk_widget_hide(about_dialog);

Also, see
http://developer.gnome.org/doc/API/2.0/gtk/GtkAboutDialog.html#gtk-show-about-dialog

Samuel

On 6/2/07, John Zoidberg [EMAIL PROTECTED] wrote:

 Hi,

 I have a problem with the gtk about dialog: When I click on the Close
 button
 it doesn't close.
 There seems to be no event connected to the close button clicked signal.
 And I can't add one either in Glade (v2 as well as v3).

 What am I supposed to add to the code so that it works?
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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


Moving maemo-gtk as gtk+ branch?

2007-06-01 Thread Tommi Komulainen
Hi,

As there's growing interest for Hildon outside the maemo context we're
currently discussing moving Hildon to gnome.org infrastructure to give
it more independent status. The plan is to ensure that Hildon can be
used with stock gtk+, though with somewhat limited capabilities.

However we'll still need to maintain our branch of gtk+ for the time
being and with Hildon moving to gnome.org it would be somewhat awkward
to have the gtk+ branch elsewhere.

Now my question is, do you think it would make sense to move maemo gtk+
to a gtk+ branch, or would you prefer us maintaining it elsewhere?


-- 
Tommi Komulainen[EMAIL PROTECTED]
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Common OSD widget?

2007-06-01 Thread Philip Withnall
Hi,

I'm looking at the possibility of adding an OSD to Totem
(http://bugzilla.gnome.org/show_bug.cgi?id=442925), similar to the one
now in gnome-control-center/gnome-settings-daemon for display when the
mixer volume's changed
(http://bugzilla.gnome.org/show_bug.cgi?id=383066). There's also a bug
for getting one in gnome-power-manager
(http://bugzilla.gnome.org/show_bug.cgi?id=400844), which makes me
wonder if it might just be better to write a common widget and put it
somewhere like libegg (and eventually GTK?). There's already a
GtkWindow-derived object for it in gnome-settings-daemon
(http://svn.gnome.org/viewcvs/gnome-control-center/trunk/gnome-settings-daemon/gsd-media-keys-window.c?view=markup),
 so that could probably be used as a base. However, it would be better to use 
themed icons, rather than drawing a picture on screen manually using Cairo, as 
the code does at the moment.

I just want to know what people's thoughts are on this, and if they're
positive, what I should do to go about getting it working.

Cheers,
Philip


signature.asc
Description: This is a digitally signed message part
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Common OSD widget?

2007-06-01 Thread Bastien Nocera
On Fri, 2007-06-01 at 15:43 +0100, Philip Withnall wrote:
 Hi,
 
 I'm looking at the possibility of adding an OSD to Totem
 (http://bugzilla.gnome.org/show_bug.cgi?id=442925), similar to the one
 now in gnome-control-center/gnome-settings-daemon for display when the
 mixer volume's changed
 (http://bugzilla.gnome.org/show_bug.cgi?id=383066). There's also a bug
 for getting one in gnome-power-manager
 (http://bugzilla.gnome.org/show_bug.cgi?id=400844), which makes me
 wonder if it might just be better to write a common widget and put it
 somewhere like libegg (and eventually GTK?). There's already a
 GtkWindow-derived object for it in gnome-settings-daemon
 (http://svn.gnome.org/viewcvs/gnome-control-center/trunk/gnome-settings-daemon/gsd-media-keys-window.c?view=markup),
  so that could probably be used as a base. However, it would be better to use 
 themed icons, rather than drawing a picture on screen manually using Cairo, 
 as the code does at the moment.
 
 I just want to know what people's thoughts are on this, and if they're
 positive, what I should do to go about getting it working.

It would probably be a good idea to make this easier to achieve, but I
don't think we'd get that many applications actually sharing that code.
Only gnome-power-manager and gnome-settings-daemon would use similar
middle of the screen popups.

Most media/movie players would have different needs as far as those sort
of popups are concerned, eg. you can expect Totem to show keys pressed,
as a visual feedback, whereas Rhythmbox would only show visual effects
and fade artist information in and out in fullscreen mode.

Trying to share too much here is probably an optimisation too early.

-- 
Bastien Nocera [EMAIL PROTECTED] 

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


Re: Moving maemo-gtk as gtk+ branch?

2007-06-01 Thread Matthias Clasen
On 6/1/07, Tommi Komulainen [EMAIL PROTECTED] wrote:
 Hi,

 As there's growing interest for Hildon outside the maemo context we're
 currently discussing moving Hildon to gnome.org infrastructure to give
 it more independent status. The plan is to ensure that Hildon can be
 used with stock gtk+, though with somewhat limited capabilities.

 However we'll still need to maintain our branch of gtk+ for the time
 being and with Hildon moving to gnome.org it would be somewhat awkward
 to have the gtk+ branch elsewhere.

 Now my question is, do you think it would make sense to move maemo gtk+
 to a gtk+ branch, or would you prefer us maintaining it elsewhere?

I don't see any particular problem with a maemo branch. If the
longterm goal is to reduce the delta down to zero, it might be good if
there was an uptodate list of the remaining differences and their
merge status. Maybe that already exists somewhere in the maemo wiki
and I am not aware of it...
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Moving maemo-gtk as gtk+ branch?

2007-06-01 Thread Xan
On 6/2/07, Matthias Clasen [EMAIL PROTECTED] wrote:
 On 6/1/07, Tommi Komulainen [EMAIL PROTECTED] wrote:
  Hi,
 
  As there's growing interest for Hildon outside the maemo context we're
  currently discussing moving Hildon to gnome.org infrastructure to give
  it more independent status. The plan is to ensure that Hildon can be
  used with stock gtk+, though with somewhat limited capabilities.
 
  However we'll still need to maintain our branch of gtk+ for the time
  being and with Hildon moving to gnome.org it would be somewhat awkward
  to have the gtk+ branch elsewhere.
 
  Now my question is, do you think it would make sense to move maemo gtk+
  to a gtk+ branch, or would you prefer us maintaining it elsewhere?

 I don't see any particular problem with a maemo branch. If the
 longterm goal is to reduce the delta down to zero, it might be good if
 there was an uptodate list of the remaining differences and their
 merge status. Maybe that already exists somewhere in the maemo wiki
 and I am not aware of it...

http://live.gnome.org/Maemo/Gtk210Changes has all the gory details of
the delta against upstream. The longterm goal is to reduce the
difference as much as possible yes (and we did great progress in the
last few months).

Cheers, Xan

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

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


Re: Moving maemo-gtk as gtk+ branch?

2007-06-01 Thread Tommi Komulainen
On 6/2/07, Matthias Clasen [EMAIL PROTECTED] wrote:

 I don't see any particular problem with a maemo branch. If the
 longterm goal is to reduce the delta down to zero, it might be good if
 there was an uptodate list of the remaining differences and their
 merge status. Maybe that already exists somewhere in the maemo wiki
 and I am not aware of it...

We have such a list and it was recently moved to gnome.org:
http://live.gnome.org/Maemo/Gtk210Changes

However I'm not sure we can get down to zero any time soon. Hopefully
very, very close eventually, but maybe not down to zero.


-- 
Tommi Komulainen [EMAIL PROTECTED]
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Installing gtk+2.10.12 issues.

2007-06-01 Thread Robert Pearce
Hi Sergei,

On Thu, 31 May 2007 15:22:08 -0700 (PDT) you wrote:
 
 FOSS is also about freedom of speech.
 
WTF? How is that supposed to be relevant?

 To shut me up develop a better/easier for end user way of building.

No, the best way is for you to stop being such a spammer and restrict yourself 
to answering the point asked rather than plugging your product at every 
possible opportunity. You're behaving like one of those wannabee author 
celebrities who turn up on chat shows ostensibly to be interesting and spend 
all the time plugging their new book.

The simple fact is, if every single post you contribute says why not use 
AppsFromScratch? Look what it can do! then I would consider anyone choosing to 
blacklist you as perfectly justified. Is that how a person wishing to 
contribute to the community wants to come across?

If your product is good, we'll all start using it on the recommendation of 
others. If it's so bad that you need to push it with all the arrogance and 
persistence of Microsoft then I'm not even going to take a look.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Regarding GTK

2007-06-01 Thread Sashi Kiran Akella
Hi,

I've removed gtk+-2.3.5 and installed gtk+-2.6.1-2, even after 
that I';m getting the following error:

checking for PACKAGE... Requested 'gtk+-2.0 = 2.4.0' but version of 
GTK+ is 2.3.5
configure: error: Package requirements (gtk+-2.0 = 2.4.0 libglade-2.0 
glib-2.0 gthread-2.0) were not met:



Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PACKAGE_CFLAGS
and PACKAGE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details

Please help me come out of this problem.
 
--Sashi
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Installing gtk+2.10.12 issues.

2007-06-01 Thread Sergei Steshenko
 If your product is good, we'll all start using it on the recommendation of 
 others. If it's so
 bad that you need to push it with all the arrogance and persistence of 
 Microsoft then I'm not
 even going to take a look.
 ___


Happy manual environment variables setting, installing as root and screwing up 
your
system consequently.

This list is full of questions about gtk+ building; every time people have to 
set
environment variables manually and tediously build dependencies.

For me it's sufficient that one guy highly appreciated the tool in the spring 
of 2006,
because it allowed him to build and deploy 'gtk+' and 'glade' in the company he 
was
working for.

He, however, was also a Perl guy, and was constructively lazy - similar to 
myself.

So, please do me a favor and continue all this boring manual work related to 
building,
never-ever even think of trying my tool.

FWIW, Microsoft spoiled general population by showing it that properly built 
software
can be on-click-installed.

So, I'm working in the direction of one-click-build software tool.

--Sergei.




Applications From Scratch: http://appsfromscratch.berlios.de/


 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Installing gtk+2.10.12 issues.

2007-06-01 Thread Sergei Steshenko

--- Ana [EMAIL PROTECTED] wrote:

 On Fri, Jun 01, 2007 at 12:52:02AM +0200, David Ne?as (Yeti) wrote:
  On Thu, May 31, 2007 at 03:22:08PM -0700, Sergei Steshenko wrote:
   
   FOSS is also about freedom of speech.
   
   So, you and others are entitled to have your opinion about what I'm 
   saying, but
   I will be posting what _I_ think is relevant and necessary.
  
  As you might or might not notice, no one tried to deprive
  you of the freedom of speech.  The problem is in the form.
  Do not be surprised if you end up not being listened to, even
  with all your freedom of speech.
  
  (Hm, this would probably weigh more if someone else said it.)
 
 Forgive me Sergei, but I started deleting your email, on site, quite a
 while ago.
 
 You may wish to Google: shameless self-promotion netiquette
 
 Here's an example of what's returned:
 http://www.passionatepen.com/netiquettearticle.htm
 
 - Ana
 ___
 gtk-list mailing list
 gtk-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-list
 

Sounds great - still, since you've replied to me.

If you want to look consistent, just ignore me altogether, OK ? :-)

--Sergei.


Applications From Scratch: http://appsfromscratch.berlios.de/


   

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


GtkEntry update problems. Or: How do I force a widget to loose focus?

2007-06-01 Thread Toralf Lund
In one of our applications, we have lots of GtkEntry widgets that 
mirror values also stored in variables. For reasons I won't go into 
here, we don't want to change the variables in question each and every 
time a character is typed, so we are doing updates on the activate and 
focus-out, which means that values are synchronised if the user moves 
the cursor e.g. to another GtkEntry field, and an update may also be 
forced by pressing Enter. That's very nearly what we want, but not 
quite. The problem is that the focus-out event only occurs if the user 
selects another that will accept focus. This is not the case for e.g. 
menu items or toolbar items, so no variables are updated when those are 
selected - and we want them to be.

So, is there any way at all I can make sure my variable is updated in 
all cases where the user stops entering text and selects anther GUI 
item? Essentially, the problem would be solved if I could force the 
focus to be taken away from the GtkEntry widget, but how? I might use 
the grab_focus call, of course, but I would have to add this to 
signals on all other widgets, then, and even that may not help, since I 
don't necessarily have a widget that can accept focus. And I don't see 
the GtkEntry in question from inside signal handers for buttons, menu 
items etc, of course...

Ideas, anyone?

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


Re: GtkEntry update problems. Or: How do I force a widget to loose focus?

2007-06-01 Thread Yeti
On Fri, Jun 01, 2007 at 01:42:14PM +0200, Toralf Lund wrote:
 In one of our applications, we have lots of GtkEntry widgets that 
 mirror values also stored in variables. For reasons I won't go into 
 here, we don't want to change the variables in question each and every 
 time a character is typed, so we are doing updates on the activate and 
 focus-out, which means that values are synchronised if the user moves 
 the cursor e.g. to another GtkEntry field, and an update may also be 
 forced by pressing Enter. That's very nearly what we want, but not 
 quite. The problem is that the focus-out event only occurs if the user 
 selects another that will accept focus. This is not the case for e.g. 
 menu items or toolbar items, so no variables are updated when those are 
 selected - and we want them to be.
 
 So, is there any way at all I can make sure my variable is updated in 
 all cases where the user stops entering text and selects anther GUI 
 item? Essentially, the problem would be solved if I could force the 
 focus to be taken away from the GtkEntry widget, but how? I might use 
 the grab_focus call, of course, but I would have to add this to 
 signals on all other widgets, then, and even that may not help, since I 
 don't necessarily have a widget that can accept focus. And I don't see 
 the GtkEntry in question from inside signal handers for buttons, menu 
 items etc, of course...

You do.  When the action that requires to commit the update
first occurs, use gtk_window_set_focus() (you should be able
to see the window) to get the focused widget, check
whether it needs activate to be emitted on it (this can be
done for instance by marking it with g_object_set_data() and
then looking for the data) and call gtk_widget_activate() it
if does.

Yeti

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


Re: Installing gtk+2.10.12 issues.

2007-06-01 Thread Yeti
On Fri, Jun 01, 2007 at 03:31:31AM -0700, Sergei Steshenko wrote:
 FWIW, Microsoft spoiled general population by showing it that properly built 
 software
 can be on-click-installed.
 
 So, I'm working in the direction of one-click-build software tool.

No, you are not as I explained this to you once already.

Unless you create something that software authors start
actively using themselves, i.e. it gets incorporated to the
packages (as it happened with autoconf, for instance), you
have only two options:
- fail
- fail some time later

The idea of maintaining all the build information for all
packages in some centralized perl file just does not scale.

So, yes, you wrote a tool that can help some people in some
situations.  Good work.  But have not solved any of the
underlying problems -- in fact you are not even attempting.

Yeti

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


Palette in GtkColorDialog from GtkColorButton

2007-06-01 Thread Canek Peláez
Hi; I don't quite understand the logic of GtkColorButton: it allows to
define that the resulting GtkColorSelectionDialog uses or not alpha,
but it doesn't has anything similar for the palette. Why is that? I
searched the archives of the mailing list, but I didn't find anything.

Please respond with CC to me, because I'm not subscribed.
-- 
Canek Peláez Valdés
Facultad de Ciencias, UNAM
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Regarding GTK

2007-06-01 Thread Gian Mario Tagliaretti
2007/6/1, Sashi Kiran Akella [EMAIL PROTECTED]:

 I've removed gtk+-2.3.5 and installed gtk+-2.6.1-2, even after
 that I';m getting the following error:

 checking for PACKAGE... Requested 'gtk+-2.0 = 2.4.0' but version of
 GTK+ is 2.3.5

It depends on many factors, did you install the old and/or the new
version of gtk in a non system folder? did you use the packaging
software of you distro? (I dubt that)

I guess you now have part of the old gtk installation most likely in
the system path e.g. /usr/lib and the new install in a non system
folder e.g. /usr/local/lib.

To help you with that we should know where and what you did in your
attempt of removing/installing the library,

cheers
-- 
Gian Mario Tagliaretti
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


GTK+ Website Prototype Design

2007-06-01 Thread Yesudeep

Greetings,

I've been creating a Website design template for www.gtk.org
and would like people to review the designs and post comments.
There is a parallel effort by Martyn here:

http://www.imendio.com/~martyn/gtk/ http://www.imendio.com/%7Emartyn/gtk/

Screenshots for my current layouts can be found here:

http://www.jamesbooker.co.uk/~jburd/gtk/screenshot.pnghttp://www.jamesbooker.co.uk/%7Ejburd/gtk/screenshot.png
http://www.jamesbooker.co.uk/~jburd/gtk/screenshot-2.pnghttp://www.jamesbooker.co.uk/%7Ejburd/gtk/screenshot-2.png

Thanks.

Regards,
Yesudeep.
--
येसुदीप मंगलािपल्ली

Can't see the above text?
http://unicode.org/help/display_problems.html

Do not send me Word documents.  I will bite.
http://www.gnu.org/philosophy/sylvester-response.html

I use free software.  Do you?
http://www.gnu.org
http://www.gnome.org
http://www.ubuntu.com
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Installing gtk+2.10.12 issues.

2007-06-01 Thread Sergei Steshenko

--- David Neèas (Yeti) [EMAIL PROTECTED] wrote:


 
 The idea of maintaining all the build information for all
 packages in some centralized perl file just does not scale.
 


I think you didn't quite get the idea and/or not quite familiar with Perl.

Yes, it is true there is a number of Perl files.

The two most important ones are:

default_target_build_sub.prl
default_build_data_sub.prl
.

The first of them is what its name says, and the second is currently 
configuration data
and patches, i.e. small pieces of code that work around the wide variety of 
developers'
inconsistencies, to begin from inconsistent naming conventions.

Now about possible unfamiliarity with Perl.

If you have a piece of code like this:


...
$u = 1;
$v = 2;
$x = 3;
$y = 4;
...

, you can split it into, say, two files:

file1.pl will contain

$u = 1;
$v = 2;

and file2.pl will contain

$x = 3;
$y = 4;

, so the whole above piece of code can be rewritten this way:

...
do file1.pl;
do file2.pl;
...
.

I mean that, for example, I or anybody else can split 
default_build_data_sub.prl into
file per target, and/or, for example, to put 'gtk+' with all its dependencies 
in one
file or whatever in a similar manner.

'do' can be nested.

For an end user whop is not going to add targets and/or to modify the code it 
doesn't
matter, this is because for quite a time it is possible to specify targets to 
built
on command line.

...

It's really ridiculous to read every other day posts of people suffering from 
unproperly
set PKG_CONFIG_PATH and friends and the standard advice to check them.

I mean, the ridiculous part is the ever repeating itself advice to do manual 
job.

--Sergei.



Applications From Scratch: http://appsfromscratch.berlios.de/


  
___
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Installing gtk+2.10.12 issues.

2007-06-01 Thread Sergei Steshenko


 The world is full of frustrated people who invented the
 perfect software building, packaging and distribution
 systems.  Something to think over...
 
 Yeti


And who said the word perfect ?

And how can software building be perfect if there is no limitations
on how the sources are generated, and thus no way to automatically determine
dependencies in all cases ?

And the uglyness of search paths in addition to that - or as part of that ...

--Sergei.


Applications From Scratch: http://appsfromscratch.berlios.de/


   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GTK+ Website Prototype Design

2007-06-01 Thread Antonio Gomes
hey Yesudeep,

nice work ... could you tell us more about what it'd improve in the
current site?

regards

On 6/1/07, Yesudeep [EMAIL PROTECTED] wrote:
 Greetings,

 I've been creating a Website design template for www.gtk.org
  and would like people to review the designs and post comments.
 There is a parallel effort by Martyn here:

 http://www.imendio.com/~martyn/gtk/

 Screenshots for my current layouts can be found here:

  http://www.jamesbooker.co.uk/~jburd/gtk/screenshot.png
 http://www.jamesbooker.co.uk/~jburd/gtk/screenshot-2.png

 Thanks.

 Regards,
 Yesudeep.
 --
 येसुदीप मंगलािपल्ली

 Can't see the above text?
 http://unicode.org/help/display_problems.html

 Do not send me Word documents.  I will bite.
 http://www.gnu.org/philosophy/sylvester-response.html

 I use free software.  Do you?
  http://www.gnu.org
 http://www.gnome.org
 http://www.ubuntu.com


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




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


Re: Installing gtk+2.10.12 issues.

2007-06-01 Thread Antonio Gomes
hey guys, I believe discussion went out of control. Everyone's
messages were sent, so there is no reason to keep this
thread/spam/fight.

we all have some real emails to spend time with ;)

regards

On 6/1/07, Sergei Steshenko [EMAIL PROTECTED] wrote:


  The world is full of frustrated people who invented the
  perfect software building, packaging and distribution
  systems.  Something to think over...
 
  Yeti


 And who said the word perfect ?

 And how can software building be perfect if there is no limitations
 on how the sources are generated, and thus no way to automatically determine
 dependencies in all cases ?

 And the uglyness of search paths in addition to that - or as part of that ...

 --Sergei.


 Applications From Scratch: http://appsfromscratch.berlios.de/



 Ready
  for the edge of your seat?
 Check out tonight's top picks on Yahoo! TV.
 http://tv.yahoo.com/
 ___
 gtk-list mailing list
 gtk-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-list



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


Re: GTK+ Website Prototype Design

2007-06-01 Thread Yeti
On Fri, Jun 01, 2007 at 08:49:55PM +0530, Yesudeep wrote:
 I've been creating a Website design template for www.gtk.org
 and would like people to review the designs and post comments.
 There is a parallel effort by Martyn here:
 
 http://www.imendio.com/~martyn/gtk/ http://www.imendio.com/%7Emartyn/gtk/

This one looks reasonably, although the number of useful
links on the home page decreased considerably and some
things may be hard to find due to the reduction (few people
looking for mailing lists wish to develop Gtk+).  Also, with
no sidebar/box the lines can exceed the optimum length
considerably, even though with short paragraphs this gets
annoying more slowly than the too short lines, unfortunately
quite common on the web.

 Screenshots for my current layouts can be found here:
 
 http://www.jamesbooker.co.uk/~jburd/gtk/screenshot.pnghttp://www.jamesbooker.co.uk/%7Ejburd/gtk/screenshot.png

Too little empty space, way too many links to some actual
content, only a handful colorful boxes, measly one type of
background color emphasize, too small and too ordinary
fonts, ... and no dotted frames at all?

Yeti

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


Out of scope and gtk variable

2007-06-01 Thread William Walter

Hi! I'm having trouble explaining a code(gtk 1.2). My application has a top
window which
contains a GtkList widget. I 've also created a
function(fill_list_with_items())
which populates the clist widget with 50 list items.


GList *fill_list_with_items(GtkWidget *list)
{  int i;
  GList *list_items;
  list_items = NULL;
  for(i = 1; i = 50; i++)
  {
 list_items = g_list_prepend(list_items,
   populate_row(list, i));
  }
  list_items = g_list_reverse(list_items);

  gtk_list_append_items(GTK_LIST(list), list_items);
  return list_items;
}

int main(int argc, char *argv[])
{


.
gtk_widget_show(list);
.


populate_row() function create GtkListItem for each row and populate with
vbox which
contains a GtkLabel widget. My question is: in the above code GList
*list_items
does not exist beyond the function fill_list_with_items(). So how come the
compiler
doesn not complain about it when i later view clist?

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


Out of scope and a function

2007-06-01 Thread DC A
Hi! I'm having trouble explaining a code. My application has a top window 
which
contains a GtkList widget. I 've also created a 
function(fill_list_with_items())
which populates the clist widget.


GList *fill_list_with_items(GtkWidget *list)
{  int i;
   GList *list_items;
   list_items = NULL;
   for(i = 1; i = 50; i++)
   {
  list_items = g_list_prepend(list_items,
populate_row(list, i));
   }
   list_items = g_list_reverse(list_items);

   gtk_list_append_items(GTK_LIST(list), list_items);
   return list_items;
}


populate_row() function create GtkListItem for each row and populate with 
vbox which
contains a GtkLabel widget. My question is: in the above code GList 
*list_items
does not exist beyond the function fill_list_with_items(). So how come the 
compiler
doesn not complain about it of getting out of scope?

Thanks.

_
See Fireworks On Live Image Search 
http://search.live.com/images/results.aspx?q=Fireworksmkt=en-caFORM=SERNEP

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