Commit 9316f7be authored by Pierre Wieser's avatar Pierre Wieser

Rename BaseWindow signal defines

+ src/nact/base-assistant.c:
+ src/nact/nact-add-capability-dialog.c:
+ src/nact/nact-add-scheme-dialog.c:
+ src/nact/nact-assistant-export.c:
+ src/nact/nact-assistant-import.c:
+ src/nact/nact-confirm-logout.c:
+ src/nact/nact-export-ask.c:
+ src/nact/nact-icon-chooser.c:
+ src/nact/nact-main-window.c:
+ src/nact/nact-preferences-editor.c: Updated accordingly.
parent b3864097
2011-01-21 Pierre Wieser <pwieser@trychlos.org>
* src/nact/base-window.c:
* src/nact/base-window.h: Rename signal defines.
* src/nact/base-assistant.c:
* src/nact/nact-add-capability-dialog.c:
* src/nact/nact-add-scheme-dialog.c:
* src/nact/nact-assistant-export.c:
* src/nact/nact-assistant-import.c:
* src/nact/nact-confirm-logout.c:
* src/nact/nact-export-ask.c:
* src/nact/nact-icon-chooser.c:
* src/nact/nact-main-window.c:
* src/nact/nact-preferences-editor.c: Updated accordingly.
* src/nact/base-window.c:
* src/nact/base-window.h:
Remove unused properties.
......
......@@ -199,13 +199,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_initial_load ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_runtime_init ));
}
......
......@@ -265,7 +265,7 @@ class_init( BaseWindowClass *klass )
*/
st_signals[ INITIAL_LOAD ] =
g_signal_new_class_handler(
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_TYPE_FROM_CLASS( klass ),
G_SIGNAL_RUN_LAST,
G_CALLBACK( v_initial_load_toplevel ),
......@@ -285,7 +285,7 @@ class_init( BaseWindowClass *klass )
*/
st_signals[ RUNTIME_INIT ] =
g_signal_new_class_handler(
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_TYPE_FROM_CLASS( klass ),
G_SIGNAL_RUN_LAST,
G_CALLBACK( v_runtime_init_toplevel ),
......@@ -308,7 +308,7 @@ class_init( BaseWindowClass *klass )
*/
st_signals[ ALL_WIDGETS_SHOWED ] =
g_signal_new_class_handler(
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_TYPE_FROM_CLASS( klass ),
G_SIGNAL_RUN_LAST,
G_CALLBACK( v_all_widgets_showed ),
......@@ -359,7 +359,7 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
self,
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_runtime_init_toplevel ));
}
......@@ -584,7 +584,7 @@ base_window_init( BaseWindow *window )
g_return_val_if_fail( GTK_IS_WINDOW( window->private->gtk_toplevel ), FALSE );
if( !is_gtk_toplevel_initialized( window, window->private->gtk_toplevel )){
g_signal_emit_by_name( window, BASE_WINDOW_SIGNAL_INITIAL_LOAD, NULL );
g_signal_emit_by_name( window, BASE_SIGNAL_INITIALIZE_GTK, NULL );
set_gtk_toplevel_initialized( window, window->private->gtk_toplevel, TRUE );
}
......@@ -726,10 +726,10 @@ base_window_run( BaseWindow *window )
g_return_val_if_fail( GTK_IS_WINDOW( window->private->gtk_toplevel ), BASE_EXIT_CODE_START_FAIL );
g_debug( "%s: window=%p", thisfn, ( void * ) window );
g_signal_emit_by_name( window, BASE_WINDOW_SIGNAL_RUNTIME_INIT, NULL );
g_signal_emit_by_name( window, BASE_SIGNAL_INITIALIZE_WINDOW, NULL );
gtk_widget_show_all( GTK_WIDGET( window->private->gtk_toplevel ));
g_signal_emit_by_name( window, BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED, NULL );
g_signal_emit_by_name( window, BASE_SIGNAL_ALL_WIDGETS_SHOWED, NULL );
if( is_main_window( window )){
if( GTK_IS_DIALOG( window->private->gtk_toplevel )){
......
......@@ -209,20 +209,23 @@ typedef struct {
#define BASE_PROP_HAS_OWN_BUILDER "base-window-has-own-builder"
#define BASE_PROP_TOPLEVEL_NAME "base-window-toplevel-name"
/* signals defined in this class
/**
* Signals defined by the BaseWindow class.
*
* All signals of this class have the same behavior:
* - the message is sent to all derived classes, which are free to
* connect to the signal in order to implement their own code
* connect to the signal in order to implement their own code;
* - finally, the default class handler points to a virtual function
* - the virtual function actually tries to call the actual function
* as possibly implemented by the derived class
* as possibly implemented by the derived class;
* - each virtual method in a derived class should call the virtual
* method of its parent class if it exists;
* - if no derived class has implemented the virtual function, the call
* fall back to doing nothing at all
* fall back to doing nothing at all.
*/
#define BASE_WINDOW_SIGNAL_INITIAL_LOAD "nact-base-window-initial-load"
#define BASE_WINDOW_SIGNAL_RUNTIME_INIT "nact-base-window-runtime-init"
#define BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED "nact-base-window-all-widgets-showed"
#define BASE_SIGNAL_INITIALIZE_GTK "base-window-initialize-gtk"
#define BASE_SIGNAL_INITIALIZE_WINDOW "base-window-initialize-window"
#define BASE_SIGNAL_ALL_WIDGETS_SHOWED "base-window-all-widgets-showed"
GType base_window_get_type( void );
......
......@@ -185,19 +185,19 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_base_initial_load_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_base_runtime_init_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_base_all_widgets_showed));
self->private->dispose_has_run = FALSE;
......
......@@ -156,19 +156,19 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_base_initial_load_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_base_runtime_init_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_base_all_widgets_showed));
self->private->dispose_has_run = FALSE;
......
......@@ -243,19 +243,19 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_initial_load_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_runtime_init_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_all_widgets_showed ));
}
......
......@@ -193,13 +193,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_initial_load_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_runtime_init_dialog ));
self->private->dispose_has_run = FALSE;
......
......@@ -150,19 +150,19 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_base_initial_load_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_base_runtime_init_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_base_all_widgets_showed));
self->private->dispose_has_run = FALSE;
......
......@@ -164,19 +164,19 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_base_initial_load_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_base_runtime_init_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_base_all_widgets_showed));
self->private->dispose_has_run = FALSE;
......
......@@ -204,19 +204,19 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( self ),
G_OBJECT( self ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_base_initial_load_dialog ));
base_window_signal_connect(
BASE_WINDOW( self ),
G_OBJECT( self ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_base_runtime_init_dialog ));
base_window_signal_connect(
BASE_WINDOW( self ),
G_OBJECT( self ),
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_base_all_widgets_showed));
self->private->dispose_has_run = FALSE;
......
......@@ -649,19 +649,19 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_base_initial_load_toplevel ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_base_runtime_init_toplevel ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_base_all_widgets_showed ));
base_window_signal_connect(
......
......@@ -217,19 +217,19 @@ instance_init( GTypeInstance *instance, gpointer klass )
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_INITIAL_LOAD,
BASE_SIGNAL_INITIALIZE_GTK,
G_CALLBACK( on_base_initial_load_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_RUNTIME_INIT,
BASE_SIGNAL_INITIALIZE_WINDOW,
G_CALLBACK( on_base_runtime_init_dialog ));
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( instance ),
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
BASE_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_base_all_widgets_showed));
self->private->dispose_has_run = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment