Problems - GTK no receiving signals - no running callbacks
- From: Flavio Alberto Lopes Soares <flaviothunder terra com br>
- To: GTK List <gtk-list gnome org>
- Subject: Problems - GTK no receiving signals - no running callbacks
- Date: Tue, 08 Nov 2005 15:29:13 -0200
Hello all, I'm creating an application using GTK+ 2.6.4-3, your
interface was made using glade-2 and I connected some functions on some
signals of main window (the single window at now), these signals are
"activate_default", "activate_focus", "show", "destroy", but when I ran
the program the callbacks from these signals was not called, what I did
wrong ? Why the callbacks aren't called ?
I using libglade in this program and the "pressed-button" signal are
working OK, but the signal "show" not, I create a simple test program
using glade-2 not using libglade and the behaviour are the same - no
callbacks called for "show" signal.
My application will run "stand-alone" (out of GNOME/KDE etc) in PC and
the window hasn't decorations.
My development system is Debian Sarge with kernel 2.6.8-2-k7.
Bellow are my .glade file (start) with the signal definitions and the
piece of the callbacks.c of these callback.
Thanks for any help.
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<widget class="GtkWindow" id="window_main">
<property name="width_request">1024</property>
<property name="height_request">768</property>
<property name="visible">True</property>
<property name="events">GDK_EXPOSURE_MASK</property>
<property name="title" translatable="yes">MAQFACE</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
<property name="modal">True</property>
<property name="default_width">1024</property>
<property name="default_height">768</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
<property name="icon">logo_small.png</property>
<property name="decorated">False</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<signal name="activate_default"
handler="on_window_main_activate_default" last_modification_time="Tue,
08 Nov 2005 12:19:09 GMT"/>
<signal name="activate_focus" handler="on_window_main_activate_focus"
last_modification_time="Tue, 08 Nov 2005 12:19:54 GMT"/>
<signal name="show" handler="on_window_main_show"
last_modification_time="Tue, 08 Nov 2005 12:21:11 GMT"/>
<signal name="destroy" handler="on_window_main_destroy"
last_modification_time="Tue, 08 Nov 2005 12:21:36 GMT"/>
<child>
<widget class="GtkEventBox" id="eventbox_main">
<property name="visible">True</property>
<property name="visible_window">True</property>
<property name="above_child">False</property>
.
.
.
callbacks.c :
void
on_window_main_activate_default (GtkWindow *window,
gpointer user_data)
{
printf("ACTIVATE DEFAULT\n");
}
void
on_window_main_activate_focus (GtkWindow *window,
gpointer user_data)
{
printf("ACTIVATE FOCUS\n");
}
void
on_window_main_show (GtkWidget *widget,
gpointer user_data)
{
printf("MAIN SHOW\n");
}
void
on_window_main_destroy (GtkObject *object,
gpointer user_data)
{
printf("MAIN DESTROY\n");
}
--
Flavio Alberto Lopes Soares <flaviothunder terra com br>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]