[nautilus-actions] Environment and Properties tabs: add trace messages
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Environment and Properties tabs: add trace messages
- Date: Mon, 31 Jan 2011 21:40:52 +0000 (UTC)
commit 631e72f56257211722cad7be3a8ea2d4590ef416
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Jan 28 09:37:28 2011 +0100
Environment and Properties tabs: add trace messages
src/nact/nact-ienvironment-tab.c | 102 +++++++++-----------------------------
src/nact/nact-iproperties-tab.c | 83 ++++++++++++------------------
2 files changed, 57 insertions(+), 128 deletions(-)
---
diff --git a/src/nact/nact-ienvironment-tab.c b/src/nact/nact-ienvironment-tab.c
index f177574..bbedfed 100644
--- a/src/nact/nact-ienvironment-tab.c
+++ b/src/nact/nact-ienvironment-tab.c
@@ -215,7 +215,6 @@ nact_ienvironment_tab_initial_load_toplevel( NactIEnvironmentTab *instance )
g_return_if_fail( NACT_IS_IENVIRONMENT_TAB( instance ));
if( st_initialized && !st_finalized ){
-
g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
init_selection_count_combobox( instance );
@@ -234,8 +233,6 @@ void
nact_ienvironment_tab_runtime_init_toplevel( NactIEnvironmentTab *instance )
{
static const gchar *thisfn = "nact_ienvironment_tab_runtime_init_toplevel";
- GtkWidget *selcount_ope, *selcount_int;
- GtkWidget *button, *entry;
GtkTreeView *listview;
GtkTreeModel *model;
GtkTreeIter iter;
@@ -246,7 +243,6 @@ nact_ienvironment_tab_runtime_init_toplevel( NactIEnvironmentTab *instance )
g_return_if_fail( NACT_IS_IENVIRONMENT_TAB( instance ));
if( st_initialized && !st_finalized ){
-
g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
base_window_signal_connect(
@@ -255,40 +251,20 @@ nact_ienvironment_tab_runtime_init_toplevel( NactIEnvironmentTab *instance )
MAIN_WINDOW_SIGNAL_SELECTION_CHANGED,
G_CALLBACK( on_tab_updatable_selection_changed ));
- selcount_ope = base_window_get_widget( BASE_WINDOW( instance ), "SelectionCountSigneCombobox" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( selcount_ope ),
- "changed",
- G_CALLBACK( on_selcount_ope_changed ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "SelectionCountSigneCombobox", "changed", G_CALLBACK( on_selcount_ope_changed ));
- selcount_int = base_window_get_widget( BASE_WINDOW( instance ), "SelectionCountNumberEntry" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( selcount_int ),
- "changed",
- G_CALLBACK( on_selcount_int_changed ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "SelectionCountNumberEntry", "changed", G_CALLBACK( on_selcount_int_changed ));
- button = base_window_get_widget( BASE_WINDOW( instance ), "ShowAlwaysButton" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( button ),
- "toggled",
- G_CALLBACK( on_show_always_toggled ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "ShowAlwaysButton", "toggled", G_CALLBACK( on_show_always_toggled ));
- button = base_window_get_widget( BASE_WINDOW( instance ), "OnlyShowButton" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( button ),
- "toggled",
- G_CALLBACK( on_only_show_toggled ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "OnlyShowButton", "toggled", G_CALLBACK( on_only_show_toggled ));
- button = base_window_get_widget( BASE_WINDOW( instance ), "DoNotShowButton" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( button ),
- "toggled",
- G_CALLBACK( on_do_not_show_toggled ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "DoNotShowButton", "toggled", G_CALLBACK( on_do_not_show_toggled ));
listview = GTK_TREE_VIEW( base_window_get_widget( BASE_WINDOW( instance ), "EnvironmentsDesktopTreeView" ));
model = gtk_tree_view_get_model( listview );
@@ -306,54 +282,26 @@ nact_ienvironment_tab_runtime_init_toplevel( NactIEnvironmentTab *instance )
column = gtk_tree_view_get_column( listview, ENV_BOOL_COLUMN );
renderers = gtk_cell_layout_get_cells( GTK_CELL_LAYOUT( column ));
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( renderers->data ),
- "toggled",
- G_CALLBACK( on_desktop_toggled ));
+ base_window_signal_connect( BASE_WINDOW( instance ),
+ G_OBJECT( renderers->data ), "toggled", G_CALLBACK( on_desktop_toggled ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "TryExecEntry", "changed", G_CALLBACK( on_try_exec_changed ));
- entry = base_window_get_widget( BASE_WINDOW( instance ), "TryExecEntry" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( entry ),
- "changed",
- G_CALLBACK( on_try_exec_changed ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "TryExecButton", "clicked", G_CALLBACK( on_try_exec_browse ));
- button = base_window_get_widget( BASE_WINDOW( instance ), "TryExecButton" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( button ),
- "clicked",
- G_CALLBACK( on_try_exec_browse ));
-
- entry = base_window_get_widget( BASE_WINDOW( instance ), "ShowIfRegisteredEntry" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( entry ),
- "changed",
- G_CALLBACK( on_show_if_registered_changed ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "ShowIfRegisteredEntry", "changed", G_CALLBACK( on_show_if_registered_changed ));
- entry = base_window_get_widget( BASE_WINDOW( instance ), "ShowIfTrueEntry" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( entry ),
- "changed",
- G_CALLBACK( on_show_if_true_changed ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "ShowIfTrueEntry", "changed", G_CALLBACK( on_show_if_true_changed ));
- entry = base_window_get_widget( BASE_WINDOW( instance ), "ShowIfRunningEntry" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( entry ),
- "changed",
- G_CALLBACK( on_show_if_running_changed ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "ShowIfRunningEntry", "changed", G_CALLBACK( on_show_if_running_changed ));
- button = base_window_get_widget( BASE_WINDOW( instance ), "ShowIfRunningButton" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( button ),
- "clicked",
- G_CALLBACK( on_show_if_running_browse ));
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "ShowIfRunningButton", "clicked", G_CALLBACK( on_show_if_running_browse ));
}
}
@@ -365,7 +313,6 @@ nact_ienvironment_tab_all_widgets_showed( NactIEnvironmentTab *instance )
g_return_if_fail( NACT_IS_IENVIRONMENT_TAB( instance ));
if( st_initialized && !st_finalized ){
-
g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
}
}
@@ -414,7 +361,6 @@ on_tab_updatable_selection_changed( NactIEnvironmentTab *instance, gint count_se
g_return_if_fail( NACT_IS_IENVIRONMENT_TAB( instance ));
if( st_initialized && !st_finalized ){
-
g_debug( "%s: instance=%p, count_selected=%d", thisfn, ( void * ) instance, count_selected );
context = nact_main_tab_get_context( NACT_MAIN_WINDOW( instance ), &editable );
diff --git a/src/nact/nact-iproperties-tab.c b/src/nact/nact-iproperties-tab.c
index 546835e..5668994 100644
--- a/src/nact/nact-iproperties-tab.c
+++ b/src/nact/nact-iproperties-tab.c
@@ -117,7 +117,6 @@ interface_base_init( NactIPropertiesTabInterface *klass )
static const gchar *thisfn = "nact_iproperties_tab_interface_base_init";
if( !st_initialized ){
-
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
klass->private = g_new0( NactIPropertiesTabInterfacePrivate, 1 );
@@ -132,7 +131,6 @@ interface_base_finalize( NactIPropertiesTabInterface *klass )
static const gchar *thisfn = "nact_iproperties_tab_interface_base_finalize";
if( st_initialized && !st_finalized ){
-
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
st_finalized = TRUE;
@@ -149,8 +147,7 @@ nact_iproperties_tab_initial_load_toplevel( NactIPropertiesTab *instance )
g_return_if_fail( NACT_IS_IPROPERTIES_TAB( instance ));
if( st_initialized && !st_finalized ){
-
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+ g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
}
}
@@ -159,56 +156,34 @@ nact_iproperties_tab_runtime_init_toplevel( NactIPropertiesTab *instance )
{
static const gchar *thisfn = "nact_iproperties_tab_runtime_init_toplevel";
GtkButton *enabled_button;
- GtkWidget *button;
GtkWidget *label_widget;
GtkTextBuffer *buffer;
g_return_if_fail( NACT_IS_IPROPERTIES_TAB( instance ));
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+ base_window_signal_connect( BASE_WINDOW( instance ),
+ G_OBJECT( instance ), MAIN_WINDOW_SIGNAL_SELECTION_CHANGED, G_CALLBACK( on_tab_updatable_selection_changed ));
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( instance ),
- MAIN_WINDOW_SIGNAL_SELECTION_CHANGED,
- G_CALLBACK( on_tab_updatable_selection_changed ));
-
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( instance ),
- TAB_UPDATABLE_SIGNAL_PROVIDER_CHANGED,
- G_CALLBACK( on_tab_updatable_provider_changed ));
+ base_window_signal_connect( BASE_WINDOW( instance ),
+ G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_PROVIDER_CHANGED, G_CALLBACK( on_tab_updatable_provider_changed ));
enabled_button = get_enabled_button( instance );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( enabled_button ),
- "toggled",
- G_CALLBACK( on_enabled_toggled ));
+ base_window_signal_connect( BASE_WINDOW( instance ),
+ G_OBJECT( enabled_button ), "toggled", G_CALLBACK( on_enabled_toggled ));
label_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionDescriptionText" );
buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( label_widget ));
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( buffer ),
- "changed",
- G_CALLBACK( on_description_changed ));
-
- button = base_window_get_widget( BASE_WINDOW( instance ), "SuggestedShortcutButton" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( button ),
- "clicked",
- G_CALLBACK( on_shortcut_clicked ));
-
- button = base_window_get_widget( BASE_WINDOW( instance ), "ActionReadonlyButton" );
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( button ),
- "toggled",
- G_CALLBACK( on_readonly_toggled ));
+ base_window_signal_connect( BASE_WINDOW( instance ),
+ G_OBJECT( buffer ), "changed", G_CALLBACK( on_description_changed ));
+
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "SuggestedShortcutButton", "clicked", G_CALLBACK( on_shortcut_clicked ));
+
+ base_window_signal_connect_by_name( BASE_WINDOW( instance ),
+ "ActionReadonlyButton", "toggled", G_CALLBACK( on_readonly_toggled ));
#if 0
g_signal_override_class_handler( "toggled", GTK_TYPE_TOGGLE_BUTTON, G_CALLBACK( on_readonly_toggle_cb ));
@@ -224,10 +199,10 @@ nact_iproperties_tab_all_widgets_showed( NactIPropertiesTab *instance )
{
static const gchar *thisfn = "nact_iproperties_tab_all_widgets_showed";
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
g_return_if_fail( NACT_IS_IPROPERTIES_TAB( instance ));
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
}
}
@@ -236,10 +211,10 @@ nact_iproperties_tab_dispose( NactIPropertiesTab *instance )
{
static const gchar *thisfn = "nact_iproperties_tab_dispose";
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
g_return_if_fail( NACT_IS_IPROPERTIES_TAB( instance ));
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
}
}
@@ -259,11 +234,12 @@ on_tab_updatable_selection_changed( NactIPropertiesTab *instance, gint count_sel
GtkTextBuffer *buffer;
gchar *label, *shortcut;
- g_debug( "%s: instance=%p, count_selected=%d", thisfn, ( void * ) instance, count_selected );
g_return_if_fail( BASE_IS_WINDOW( instance ));
g_return_if_fail( NACT_IS_IPROPERTIES_TAB( instance ));
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p (%s), count_selected=%d",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), count_selected );
g_object_get(
G_OBJECT( instance ),
@@ -339,9 +315,8 @@ on_tab_updatable_provider_changed( NactIPropertiesTab *instance, NAObjectItem *i
{
static const gchar *thisfn = "nact_iproperties_tab_on_tab_updatable_provider_changed";
- g_debug( "%s: instance=%p, item=%p", thisfn, ( void * ) instance, ( void * ) item );
-
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p, item=%p", thisfn, ( void * ) instance, ( void * ) item );
display_provider_name( instance, item );
}
@@ -361,9 +336,10 @@ on_enabled_toggled( GtkToggleButton *button, NactIPropertiesTab *instance )
gboolean enabled;
gboolean editable;
- if( !st_on_selection_change ){
- g_debug( "%s: button=%p, instance=%p", thisfn, ( void * ) button, ( void * ) instance );
+ g_debug( "%s: button=%p, instance=%p, on_selection_change=%s",
+ thisfn, ( void * ) button, ( void * ) instance, st_on_selection_change ? "True":"False" );
+ if( !st_on_selection_change ){
g_object_get(
G_OBJECT( instance ),
TAB_UPDATABLE_PROP_SELECTED_ITEM, &item,
@@ -407,9 +383,10 @@ on_readonly_toggled( GtkToggleButton *button, NactIPropertiesTab *instance )
static const gchar *thisfn = "nact_iproperties_tab_on_readonly_toggled";
gboolean active;
- if( !st_on_selection_change ){
- g_debug( "%s: button=%p, instance=%p", thisfn, ( void * ) button, ( void * ) instance );
+ g_debug( "%s: button=%p, instance=%p, on_selection_change=%s",
+ thisfn, ( void * ) button, ( void * ) instance, st_on_selection_change ? "True":"False" );
+ if( !st_on_selection_change ){
active = gtk_toggle_button_get_active( button );
g_signal_handlers_block_by_func(( gpointer ) button, on_readonly_toggled, instance );
@@ -464,10 +441,13 @@ on_readonly_toggle_hook( GSignalInvocationHint *ihint,
static void
on_description_changed( GtkTextBuffer *buffer, NactIPropertiesTab *instance )
{
+ static const gchar *thisfn = "nact_iproperties_tab_on_description_changed";
NAObjectItem *item;
GtkTextIter start, end;
gchar *text;
+ g_debug( "%s: buffer=%p, instance=%p", thisfn, ( void * ) buffer, ( void * ) instance );
+
g_object_get(
G_OBJECT( instance ),
TAB_UPDATABLE_PROP_SELECTED_ITEM, &item,
@@ -500,10 +480,13 @@ on_shortcut_clicked( GtkButton *button, NactIPropertiesTab *instance )
static void
display_provider_name( NactIPropertiesTab *instance, NAObjectItem *item )
{
+ static const gchar *thisfn = "nact_iproperties_tab_display_provider_name";
GtkWidget *label_widget;
gchar *label;
NAIOProvider *provider;
+ g_debug( "%s: instance=%p, item=%p", thisfn, ( void * ) instance, ( void * ) item );
+
label_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionItemProvider" );
label = NULL;
if( item ){
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]