Re: show signal problem



The show signal is a Run-First signal, which means the default handler
is always ran before any event handlers.

Just override the show virtual function and do stuff before chaining up
to the parent member function. Emitting a signal is not necessary if you
are already using overriding. 

May I ask you what the desired behavior is when the label text is
modified, after the window is shown?


- Yu

On Wed, 2009-03-18 at 00:43 +0100, Perriman wrote:
Hi again,

      As I can see, anyone knows how to solve this... Then I will
overwrite the show method of my GscInfo object (inherit from GtkWindow)
and I will emit a "before-show" signal or a "show-info" signal before
to call GtkWindow->show.

Regads,
      Perriman


El Sun, 15 Mar 2009 04:06:59 +0100
Perriman <chuchiperriman gmail com> escribiÃ:

Hi all!!!

    I have a problem with "show" signal. I have a window and I
need to change its size and position before showing it. Currently if
I do:

1.- set the label text
2.- set the window size (based on label text)
3.- move the window
4.- show the window

All works fine but if I have problems by doing:

1.- Connect to "show" signal
2.- set the label text
3.- gtk_widget_show (window);
When "show" signal is emited:
    - set the window size (based on the label text previously
setted)
    - move the window

The problems are:
    1.- The window size is not properly calculated
    2.- I get a "flicker" because the window is show at (0,0) and
then moved to the correct position.

The "show" signal is emited after the real show mechanism and
"configure" and "map" events don't work...


Can you help me?

Thanks a lot!!!!
    Perriman


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




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]