Gtk Window

2001-11-14 Thread haojl



how to create a window that i can't access other window , if i 
don't close the window , and when the code of gtk_widget_show(window) is execute 
, next code not continue execute if the window don't close (not destroy , hide 
the window)


Re: Borderless window

2001-11-14 Thread Jean-Christophe Berthon

Some while ago this question has been post and the answer was :
gdk_window_set_decorations(GTK_WIDGET(MyWidget_Window)->window, 0);



Best regards,
---
Jean-Christophe Berthon

Cap Gemini -- Ernst & Young
France
Skill IS -- Image Quality
Email: [EMAIL PROTECTED]
Tel: (+33) 561 31 6639


- Original Message -
From: "Dinesh Nadarajah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 14, 2001 6:51 AM
Subject: Borderless window


> Hi:
>
> How can I create a borderless window (without any of the decorations, any
> window manager buttons, etc)?
>
> Thanks.
>
> -D
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
> ___
> gtk-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/gtk-list

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



Re: Gtk Window

2001-11-14 Thread Jean-Christophe Berthon



You have to set your window _Modal_ to block access 
of other window. But to stop the execution of the code, I don't know if there is 
a Gtk implementation of it. I'm doing this solution. I have a boolean that is 
initialized to TRUE when I'm showing the modal window and then I have the 
folowing code :
 while ((gtk_events_pending()) || 
(bDlgInfoState_X == 
TRUE)) {  gtk_main_iteration(); }
 
This loop process the gtk-event, so the modal 
window respond to user interaction. And as soon as the modal window is hidden, 
bDlgInfoState_X is set to False, so I'm exiting this loop.
 
Hope this help :-)
 
 
 
Best regards,---Jean-Christophe Berthon
 
Cap Gemini -- Ernst & YoungFranceSkill IS -- Image 
QualityEmail: [EMAIL PROTECTED]Tel: 
(+33) 561 31 6639
 
 

  - Original Message - 
  From: 
  haojl 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, November 14, 2001 9:05 
  AM
  Subject: Gtk Window
  
  how to create a window that i can't access other window , if 
  i don't close the window , and when the code of gtk_widget_show(window) is 
  execute , next code not continue execute if the window don't close (not 
  destroy , hide the window)


Re: help

2001-11-14 Thread tam


On Tue, 13 Nov 2001 11:18:29 -0500, [EMAIL PROTECTED] said:

> Hi,
>  
>  I try to install GLIB-1.2.10 in my company machine.   It fails.
>  
>  What I did are the followings:
>  
>  1.gzip -cd glib-1.2.10.tar.gz | tar xvf -
>  2.  cd glib-1.2.10
>  3.  modify configure file:
>   ac_default_prefix=/usr/local ==>
>  ac_default_prefix=/home/kzvp4x
>(/home/kzvp4x  is  my own home directory. I am not root user)

Maybe you should better do ./configure --prefix=/your/home/dir/

>  4.  ./configure
>  5.  make
>  6.  make install
>  
>  
>  When I run into the step 6,  an error,  "corps_install
>  .libs/libglib-1.2.so.0.0.10 /home/kzvp4x/lib/libglib-1.2.so.0.0.10
>  ./libtool: corps_install: not found" ,   occurred.
>  

Edit your Makefile and look for the INSTALL var.
set it to install ( INSTALL= install)

>  
>  I attatch three log files, configure_log, make_log and install_log,   which
>  record all the infomations during configure, make and make install.
>  
>  
>  Could you give me some helps to indicate me where I am wrong?   I would rather
>  apprecaite.
>  
>  
>  Regards,
>  
>  Changming Wang
>  (See attached file: configure_log)(See attached file: make_log)(See attached
>  file: install_log)
>  

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



Re: How to get "gtkmozembed.h" ??

2001-11-14 Thread tam


On Mon, 12 Nov 2001 22:51:14 +0100, [EMAIL PROTECTED] said:

> Hi,
>  Please, can any one send me the file "gtkmozembed.h" or tell me where to find it.
>  Thanks a lot.
>  Bye
>  
>  
>  
>  Faites un voeu et puis Voila ! www.voila.fr
>  Avec Voila Mail, consultez vos e-mails sur votre mobile Wap.
>  
>  ___
>  gtk-list mailing list
>  [EMAIL PROTECTED]
>  http://mail.gnome.org/mailman/listinfo/gtk-list
>  

Hi,
You can find it on mozilla.org
You'll need to download the source tarball.

Tâm


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



Re: Borderless window

2001-11-14 Thread tam


On Tue, 13 Nov 2001 23:51:40 -0600, Dinesh Nadarajah said:

> Hi:
>  
>  How can I create a borderless window (without any of the decorations, any 
>  window manager buttons, etc)?
>  
>  Thanks.
>  
>  -D
>  
>  _
>  Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>  
>  ___
>  gtk-list mailing list
>  [EMAIL PROTECTED]
>  http://mail.gnome.org/mailman/listinfo/gtk-list
>  

Hi:

just do

GtkWidget *win;

win=gtk_window_new(GTK_WINDOW_POPUP);

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



Re: Borderless window

2001-11-14 Thread Jean-Christophe Berthon


>
> Hi:
>
> just do
>
> GtkWidget *win;
>
> win=gtk_window_new(GTK_WINDOW_POPUP);
>

With this solution depending of the window manager you don't get a
border-less window but you usualy get a less decorate window.
To really get ride of the border use what I told in my previous email.

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



Re: GDK colors

2001-11-14 Thread John Cupitt

Zielinski Zbigniew wrote:

> Hi!
> How to increase number of colors in GDK. J have only 64 colors.



Hiya, you could try gdk_rgb_set_min_colors( 128 ), it sometimes helps 
(depends a bit on your version of gtk).

John


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



Creeping gaps in GtkToolbar

2001-11-14 Thread Neil Bird


   This was noticed in ther GTK+ (1.2.10) build of vim, but 
looking at the code, it seems more likely to be a bug in GTK.

   What happens is that when an item in a toolbar is removed*, a 
small gap is left behind - continued adding/removal of an item 
at a specific point causes an ever expanding blank space [to the 
left of the insertion point, FWIW] in that location.

   I'd guess that a spacing/gap size added with the child widget 
isn't 'removed' alongside the child's own width when it's deleted.

   Is this some flaw on GtkToolbar?  I can't see any real 
problem with *that*, so it seems that the problem would be in 
the parent GtkContainer - but surely someone would've noticed an 
item-removal bug in that?


* - GtkToolbar doesn't export a remove call, but the vim code 
pretty well matches a recommended (1999) solution on this list; 
it's a fairly straightforward widget-unparent followed by a 
queued resize signal (plus the usual list gubbins).

-- 
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit

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



Memory usage

2001-11-14 Thread Richard Warren

Dear all,

After noticing that my application appeared to be gradually consuming memory
over a long period of time, I created a simple test program based on the
"label" example to investigate it.

The program is attached to this email, but basically creates a label and
then repeatedly changes the text in it (10 times a second).  It seems to
consume memory at roughly 3Mb per hour (or approximately 88 bytes per label
change on average), as shown in "top".

All I'm doing is calling gtk_label_set_text() in a timer callback function
(installed with g_timeout_add()), but gradually the memory gets used up.

Am I missing something?  I know the FAQ says that things are cached within
GLIB etc. even when freed and that you shouldn't rely on "top" for memory
debugging, but does this really explain the memory usage here?

I'm using GTK V1.3.9 at the moment.  I tried it with V1.2.8 and that's
fine - the memory stays constant.

I've tried following through the code from gtk_label_set_text() and
basically got down to a call to gdk_window_invalide_rect() which if I
commented out then the memory stayed stable (but the label obviously wasn't
updated).  I got confused at this point by all the rectangle
allocation/freeing actions such as gdk_region_rectangle() and
gdk_region_destroy().  The route through the code seemed to be ...

gtk_label_set_text()
gtk_label_recalculate()
gtk_widget_queue_resize()
gtk_widget_queue_clear()
gtk_widget_queue_clear_area()
gdk_window_invalidate_rect()
gdk_region_rectangle() / gdk_region_destroy() etc.

I expect I'm being stupid (in which case please point out my mistake!), but
if not I'd be grateful if anyone can explain what's going on and how I can
stop the memory being used up.

Thanks in advance,
Richard.





label.c
Description: Binary data


gtk_ctree_insert_node - why so slow?

2001-11-14 Thread Olaf Frączyk

Hi,

As I found inserting 6000 nodes takes 4.5 second (+/- 100 msec) on Celeron 
466 with no load.
I include a sample function below.
It's rather strange, because in 'balsa' (every one knows - mail client) it 
takes about the same time for the same number of nodes.
But in 'pan' (newsreader) a ctree with 8000 nodes is populated in less 
than 1 second.
I investigated 'pan' code, but didn't find any trick.

Any advice?

Regards,

Olaf

void ShowList(int num_of_rows)
{
int i;
gchar *User[3];
char test[255], test2[255];
gtk_clist_freeze(GTK_CLIST(UsersList));
for (i=0;ihttp://mail.gnome.org/mailman/listinfo/gtk-list



Re: Memory usage

2001-11-14 Thread Sven Neumann

Hi,

"Richard Warren" <[EMAIL PROTECTED]> writes:

> After noticing that my application appeared to be gradually consuming memory
> over a long period of time, I created a simple test program based on the
> "label" example to investigate it.
> 
> The program is attached to this email, but basically creates a label and
> then repeatedly changes the text in it (10 times a second).  It seems to
> consume memory at roughly 3Mb per hour (or approximately 88 bytes per label
> change on average), as shown in "top".

this is a known issue and has been reported earlier. I have just checked
and it seems to be still present with the current CVS versions. The bug
is tracked in:

  http://bugzilla.gnome.org/show_bug.cgi?id=59893

> I expect I'm being stupid (in which case please point out my mistake!), but
> if not I'd be grateful if anyone can explain what's going on and how I can
> stop the memory being used up.

Use a stable version of GTK+.


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



Re: Memory usage

2001-11-14 Thread Havoc Pennington


"Richard Warren" <[EMAIL PROTECTED]> writes: 
> I expect I'm being stupid (in which case please point out my mistake!), but
> if not I'd be grateful if anyone can explain what's going on and how I can
> stop the memory being used up.

Owen mentioned this bug last week I think, I'm not sure if he checked
in a fix yet. You might file a report on bugzilla.gnome.org to be
sure. Remember 1.3.x is the unstable series.

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



NULL text entries?

2001-11-14 Thread David J. Topper

Hi folks,

I'm trying to set up text entry boxes that are empty.  Unfortunately,
when I create one as such, I get the following error:

Gtk-CRITICAL **: file gtkentry.c: line 398 (gtk_entry_set_text):
assertion `text != NULL' failed.

It's not a show stopper, but I'd rather avoid it.

Isn't there a way to create  text entry with nothing in it?  I mean,
besides the quick hack of stashing " " in there.

Thanks all,

DT
--
Technical Director - Virginia Center for Computer Music
http://www.virginia.edu/music/vccm.html


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



Re: NULL text entries?

2001-11-14 Thread Havoc Pennington


"David J. Topper" <[EMAIL PROTECTED]> writes:
> 
> I'm trying to set up text entry boxes that are empty.  Unfortunately,
> when I create one as such, I get the following error:
> 
> Gtk-CRITICAL **: file gtkentry.c: line 398 (gtk_entry_set_text):
> assertion `text != NULL' failed.
> 
> It's not a show stopper, but I'd rather avoid it.
> 
> Isn't there a way to create  text entry with nothing in it?  I mean,
> besides the quick hack of stashing " " in there.
> 

How about using ""? That's the intended method - an empty string. NULL
is different, it's not a string at all.

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