Efficiency question

2002-10-22 Thread The Surprises
Greetings,

I am developing a gtk app that uses motion events to capture mouse
pointer location and continuously update a gtk label.  I have also
implemented routines to drag various gnome canvas items around a canvas.
I have found that calling the gtk_label_set_text routine to update the
label significantly degrades performance of the app.  There is a serious
lag during fast canvas item drag that disappears completely when I
comment out the gtk_label_set_text call.  Without this line, the items
drag completely smooth even at full screen zoom.  With the line, I get
smooth scrolling up to a certain app size, any larger causes slowdown.

The label, along with the canvas, is packed into a table.  My thinking
is that the label changing text is causing all the widgets within the
table to trigger a size_allocate or something.  The bigger the app, the
more expensive the size allocate.  I did notice that the label widget
changes size depending on the text size.  I played around with various
packing options (x expand, fill, etc, etc), but couldn't get any
improvement.  Any ideas on how to fix this?

Thanks,
Jason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



building XML- and/or GTK source code from ANSI-C code

2002-10-22 Thread pvosta
Hi,

Glade is baing used to build C-code for GTK/GNOMEfrom XML-code, which is
fine for some projects. However if you have an extensive set of
C-libraries and you simply want to put them into a GTK/GNOME interface,
at this moment you have to build the XML-code by hand which is very
cumbersome.

Are there scripts to convert ANSI-C prototypes int XML ? It would
already be a great help if it would be possible to create the dialogs in
this way. If there are scripts to create GTK/GNOME C-code starting form
the ANSI_C prototypes this would help too of course.

e.g.:

int myfunc( int a, int b ) -

?xml version=1.0?
GTK-Interface

project
...
  widget
classGtkMenuItem/class
namemyfunc/name
signal
  nameactivate/name
  handleron_myfunc_activate/handler
  last_modification_timeTue, 22 Oct 2002 07:40:26
GMT/last_modification_time
/signal
labelMyfunc/label
right_justifyFalse/right_justify
...


Kind regards,

Peter Van Osta

http://ourworld.compuserve.com/homepages/pvosta/cvwww.htm
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Efficiency question

2002-10-22 Thread John . Cupitt
The Surprises wrote:
 I am developing a gtk app that uses motion events to capture mouse
 pointer location and continuously update a gtk label.  I have also
 implemented routines to drag various gnome canvas items around a canvas.
 I have found that calling the gtk_label_set_text routine to update the
 label significantly degrades performance of the app.  There is a serious
 lag during fast canvas item drag that disappears completely when I
 comment out the gtk_label_set_text call.  Without this line, the items
 drag completely smooth even at full screen zoom.  With the line, I get
 smooth scrolling up to a certain app size, any larger causes slowdown.
 
 The label, along with the canvas, is packed into a table.  My thinking
 is that the label changing text is causing all the widgets within the
 table to trigger a size_allocate or something.  The bigger the app, the
 more expensive the size allocate.  I did notice that the label widget
 changes size depending on the text size.  I played around with various
 packing options (x expand, fill, etc, etc), but couldn't get any
 improvement.  Any ideas on how to fix this?

Hi, as an experiment you could try gtk_widget_set_usize(100,100) on the 
label. This would give it a useless but fixed size ... if your app still 
runs slowly, you'll be able to rule out resizing problems.

Another solution would be to add a timer to your motion callback, and 
limit label updates to no more than (eg.) 5 per second. That should be 
fast enough for the user and it'll take the CPU load right down.

John



== 

Madame de Pompadour 
Images of a Mistress 

16 October 2002 - 12 January 2003 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/pompadour/default.htm
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Gtk 1.2 gtk_menu_get_title ()

2002-10-22 Thread amitjain
Hi All
I am using Gtk 1.2.
I want to get title of Gtk Menu so is there any function for getting it.
we know about gtk_menu_set_title () , but couldn't find like 
gtk_menu_get_title (); so if anybody knows how to change GtkMenu
title please let me know.
Thanks in Advance
Amit Jain

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



Re: Gtk 1.2 gtk_menu_get_title ()

2002-10-22 Thread Olexiy Avramchenko
amitjain wrote:

Hi All
I am using Gtk 1.2.
I want to get title of Gtk Menu so is there any function for getting it.
we know about gtk_menu_set_title () , but couldn't find like 
gtk_menu_get_title (); so if anybody knows how to change GtkMenu
title please let me know.

You can use this to get the title of GtkMenu:
(gchar*)gtk_object_get_data(menu, gtk-menu-title);

Olexiy


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



gtk install problems

2002-10-22 Thread Sarah Leitner
To all,

I have been trying to install GTK for about 2 weeks. I
have solved many problems along the way, but I am
completely stuck on this one. GCC is telling me 

/h/gtk/gtk-query-immodules-2.0*.la  gtk.immodules 
make[3]: *** [gtk.immodules] Error 139
make[3]: Leaving directory
'/h/gtk+12.0.6/modules/input

Please help!

Sarah Leitner

__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Job ad: Red Hat OS developer

2002-10-22 Thread Havoc Pennington

Hi,

(shameless job ad, delete if not interested [1])

Wanted to let people know about the Operating System Engineer job
mentioned on http://www.redhat.com/about/careers/. This isn't a
GTK/GNOME position specifically, though it may involve some of
that. Run rpm -qa | less and look at all the packages, you might
deal with any of them. We have openings in both the desktop team and
the core OS team. The desktop team covers KDE, OpenOffice, Mozilla,
WINE, etc. in addition to GNOME.  The core OS team covers everything
from CUPS to sendmail to Emacs.

The job is a mix of developing new code, packaging upstream code,
keeping in touch with upstream maintainers, and fixing incoming bugs
on https://bugzilla.redhat.com. Feel free to ask me questions if you
want to know what the life of a Red Hat developer is like.

We're open minded about your exact experience and skill set, as long
as you are an outstanding C or C++ programmer who's excited about
doing a lot of work to advance Red Hat Linux (and open source software
in general).

Relocation to Boston or Raleigh is expected. There may also be a
position in Stuttgart, Germany, though it isn't listed on the web site
yet.

If you're interested, follow the directions on
http://www.redhat.com/about/careers/ to apply.

Thanks,
Havoc

[1] http://mail.gnome.org/archives/gtk-list/2002-August/msg00118.html
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



GTK 2.0 reference

2002-10-22 Thread Tony Denault

Can anyone recommend a good GTK 2.0 book? I have some 1.2 reference, but
will make the move to 2.0 soon.

Thanks,

Tony

/---\
| Tony Denault | Email: [EMAIL PROTECTED] |
| Institute for Astronomy  |  Phone: (808) 932-2378 |
| 640 North Aohoku Place   |Fax: (808) 933-0737 |
| Hilo, Hawaii 96720   ||
\---/

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



Re: Moving canvas item's to new canvas not working

2002-10-22 Thread Paul Davis
I am trying to move gnome_canvas_item's from one canvas to another.  I
am using gnome_canvas_item_reparent, and giving it the item to move, and
the new canvas's root, like this:

gnome_canvas_item_reparent (clip_box, gnome_canvas_root(GNOME_CAVAS(new_canvas
));

I get the following error when I try this:

GnomeUI-CRITICAL **: file gnome-canvas.c: line 1280 (gnome_canvas_item_reparen
t): assertion `item-canvas == GNOME_CANVAS_ITEM (new_group)-canvas' failed.

It's not liking the reparenting for some reason but I'm not getting it.
Any ideas?

reparenting doesn't mean moving from one canvas to another, it means
moving from one group to another. there is no way to do this without
breaking the API open. 

--p

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



Re: Moving canvas item's to new canvas not working

2002-10-22 Thread The Surprises
On Tue, Oct 22, 2002 at 08:39:29PM -0400, Paul Davis wrote:
 I am trying to move gnome_canvas_item's from one canvas to another.  I
 am using gnome_canvas_item_reparent, and giving it the item to move, and
 the new canvas's root, like this:
 
 gnome_canvas_item_reparent (clip_box, gnome_canvas_root(GNOME_CAVAS(new_canvas
 ));
 
 I get the following error when I try this:
 
 GnomeUI-CRITICAL **: file gnome-canvas.c: line 1280 (gnome_canvas_item_reparen
 t): assertion `item-canvas == GNOME_CANVAS_ITEM (new_group)-canvas' failed.
 
 It's not liking the reparenting for some reason but I'm not getting it.
 Any ideas?
 
 reparenting doesn't mean moving from one canvas to another, it means
 moving from one group to another. there is no way to do this without
 breaking the API open. 
 
 --p

That's what I figured :(  Guess I'll have to do it the hard way.
Speaking of that, is there any way to redirect canvas item events to
another canvas item?  For example, if I am implemented a drag and drop
routine between canvas', while the user has the button pressed and is
moving a canvas item from one canvas to another, I would like to delete
the first item, create a new item in the new canvas, and have that new
item take over the button press/release event.  Is this possible?

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



stop user from select new tab in notebook

2002-10-22 Thread calmar
Hi,
I have a notebook page where the user can select some things.
When the user wants to go to another page of the notebook, I wanted to 
verify the data he selected.
g_signal_connect (G_OBJECT (notebook), switch_page,G_CALLBACK 
(refresh),NULL));

In this refresh function, I calculate if the textentries and so  have 
proper values...
If not, I tried to this: 
gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook),3); ..in order he 
cant' move away from page 3.(in this callback function..from the 
'switch_page' ..callback.

This seems not to work unfortunately. ... maybe because when gtk sets 
the new page after my function maybe.
Does anybody know how I could do this?

(well another solution would be to take care of everything the user 
changes, and then react there directly..before he can try to leave the 
page).

I just thought I could also work when I just send him back to where he 
just were  .. which really doens't seem to work.

Thanks for any hints

marco candrian



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


Re: Moving canvas item's to new canvas not working

2002-10-22 Thread Paul Davis
moving a canvas item from one canvas to another, I would like to delete
the first item, create a new item in the new canvas, and have that new
item take over the button press/release event.  Is this possible?

yes, but you'll likely have no head left when you're done, because it
will rise up and bite it off. seriously, thats a deeply ugly
hack. don't do it.

--p
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Moving canvas item's to new canvas not working

2002-10-22 Thread The Surprises
On Tue, Oct 22, 2002 at 09:48:43PM -0400, Paul Davis wrote:
 moving a canvas item from one canvas to another, I would like to delete
 the first item, create a new item in the new canvas, and have that new
 item take over the button press/release event.  Is this possible?
 
 yes, but you'll likely have no head left when you're done, because it
 will rise up and bite it off. seriously, thats a deeply ugly
 hack. don't do it.
 
 --p

How would I go about doing it then?  I could merge all my seperate
canvas' into one, but then I'd have to handle all the
packing/resizing/etc myself which I really didn't want to have to do.


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



(no subject)

2002-10-22 Thread Preethi Vasanth

Hi all,
I'm working on GTK,in fact,I've just started.My task is to create Multiple windows.Is there any such option in GTK?We are Glade to do the programming.
AlsoI want to know if the display in the Tables is editable during runtime,ie,dynamically?
How doI create multiple windows in one window?The main idea is to click on the child window and it should expand to a bigger one.
Anyways,Thanx in advance.
Preethi.
Get a speedy connection with MSN Broadband.  Join now! Click Here 
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Multiple Windows,Editable Tables

2002-10-22 Thread Preethi Vasanth
Hi all,
I'm working on GTK and we are using Glade to do the programming.In 
fact,I've started working just now.
The main task assigned to me is to create multiple windows in a 
main window.The idea is to click on the small window in the main 
window and generate a new window related to the small window .Is 
there any such option in GTK using GLADE?Pls let me know the 
way.
Another thing is to create Tables or CLists which can be edited 
during during runtime.The idea is to provide the user to edit his 
own values for any no.of entries into the Table or List.Can I do 
that?
Anyways thanx in advance.
Preethi.


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


Change Font of GtkClist title

2002-10-22 Thread amitjain
Hi !!!
I am using Gtk1.2. I wnat to set font for GtkClist title.
I am doint it in this way.

style =  gtk_widget_get_style( clist ) ;
style-font = font_load;
gtk_widget_set_style( clist, style ) ;

But it is not reflecting chang on GtkClist title. 
Please help me.

Thanks in Advance
Amit Jain


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