[nautilus-actions] Remove irrelevant TAB_UPDATABLE_SIGNAL_ENABLE_TAB signal
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Remove irrelevant TAB_UPDATABLE_SIGNAL_ENABLE_TAB signal
- Date: Wed, 16 Jun 2010 22:06:29 +0000 (UTC)
commit e3806c8e843bd862a996d6282534cdc8d4d2e324
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Jun 15 23:45:50 2010 +0200
Remove irrelevant TAB_UPDATABLE_SIGNAL_ENABLE_TAB signal
This signal used to advertise other tabs of a target toggle.
With new specifications version, tabs which may need to change their state when the
target is toggled should rather connect to TAB_UPDATABLE_SIGNAL_ITEM_UPDATED signal.
ChangeLog | 11 +++++++++++
src/nact/nact-iaction-tab.c | 3 ---
src/nact/nact-ibasenames-tab.c | 13 -------------
src/nact/nact-icapabilities-tab.c | 22 ----------------------
src/nact/nact-ienvironment-tab.c | 30 ------------------------------
src/nact/nact-ifolders-tab.c | 13 -------------
src/nact/nact-imimetypes-tab.c | 13 -------------
src/nact/nact-ischemes-tab.c | 13 -------------
src/nact/nact-main-tab.h | 1 -
src/nact/nact-main-window.c | 20 --------------------
10 files changed, 11 insertions(+), 128 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6811da0..65d383e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2010-06-15 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-iaction-tab.c:
+ * src/nact/nact-ibasenames-tab.c:
+ * src/nact/nact-icapabilities-tab.c:
+ * src/nact/nact-ienvironment-tab.c:
+ * src/nact/nact-ifolders-tab.c:
+ * src/nact/nact-imimetypes-tab.c:
+ * src/nact/nact-ischemes-tab.c:
+ * src/nact/nact-main-tab.h:
+ * src/nact/nact-main-window.c:
+ Remove irrelevant TAB_UPDATABLE_SIGNAL_ENABLE_TAB signal.
+
* src/nact/nact-match-list.c:
Do not try to get filters when there is no current context.
diff --git a/src/nact/nact-iaction-tab.c b/src/nact/nact-iaction-tab.c
index 6687a85..b5ba3f4 100644
--- a/src/nact/nact-iaction-tab.c
+++ b/src/nact/nact-iaction-tab.c
@@ -514,7 +514,6 @@ on_target_selection_toggled( GtkToggleButton *button, NactIActionTab *instance )
if( editable ){
na_object_set_target_selection( action, is_target );
- g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ENABLE_TAB, action );
g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, action, FALSE );
} else {
@@ -553,7 +552,6 @@ on_target_location_toggled( GtkToggleButton *button, NactIActionTab *instance )
if( editable ){
na_object_set_target_location( action, is_target );
- g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ENABLE_TAB, action );
g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, action, FALSE );
} else {
@@ -657,7 +655,6 @@ on_target_toolbar_toggled( GtkToggleButton *button, NactIActionTab *instance )
if( editable ){
na_object_set_target_toolbar( action, is_target );
- g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ENABLE_TAB, action );
g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, action, FALSE );
toolbar_same_label_set_sensitive( instance, NA_OBJECT_ITEM( action ));
toolbar_label_set_sensitive( instance, NA_OBJECT_ITEM( action ));
diff --git a/src/nact/nact-ibasenames-tab.c b/src/nact/nact-ibasenames-tab.c
index 6bd16e1..6bb45dc 100644
--- a/src/nact/nact-ibasenames-tab.c
+++ b/src/nact/nact-ibasenames-tab.c
@@ -58,7 +58,6 @@ static void interface_base_finalize( NactIBasenamesTabInterface *klass );
static void on_matchcase_toggled( GtkToggleButton *button, BaseWindow *window );
static void on_tab_updatable_selection_changed( BaseWindow *window, gint count_selected );
-static void on_tab_updatable_enable_tab( BaseWindow *window, NAObjectItem *item );
static GSList *get_basenames( void *context );
static void set_basenames( void *context, GSList *filters );
@@ -192,12 +191,6 @@ nact_ibasenames_tab_runtime_init_toplevel( NactIBasenamesTab *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_ENABLE_TAB,
- G_CALLBACK( on_tab_updatable_enable_tab ));
-
button = base_window_get_widget( BASE_WINDOW( instance ), "BasenamesMatchcaseButton" );
base_window_signal_connect(
BASE_WINDOW( instance ),
@@ -290,12 +283,6 @@ on_tab_updatable_selection_changed( BaseWindow *window, gint count_selected )
st_on_selection_change = FALSE;
}
-static void
-on_tab_updatable_enable_tab( BaseWindow *window, NAObjectItem *item )
-{
- nact_match_list_on_enable_tab( window, ITAB_NAME, item );
-}
-
static GSList *
get_basenames( void *context )
{
diff --git a/src/nact/nact-icapabilities-tab.c b/src/nact/nact-icapabilities-tab.c
index d69772a..97ac63e 100644
--- a/src/nact/nact-icapabilities-tab.c
+++ b/src/nact/nact-icapabilities-tab.c
@@ -83,7 +83,6 @@ static void interface_base_finalize( NactICapabilitiesTabInterface *klas
static void runtime_init_connect_signals( NactICapabilitiesTab *instance, GtkTreeView *listview );
static void on_tab_updatable_selection_changed( NactICapabilitiesTab *instance, gint count_selected );
-static void on_tab_updatable_enable_tab( NactICapabilitiesTab *instance, NAObjectItem *item );
static void on_selcount_ope_changed( GtkComboBox *combo, NactICapabilitiesTab *instance );
static void on_selcount_int_changed( GtkEntry *entry, NactICapabilitiesTab *instance );
static void on_add_clicked( GtkButton *button, BaseWindow *window );
@@ -229,12 +228,6 @@ runtime_init_connect_signals( NactICapabilitiesTab *instance, GtkTreeView *listv
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_ENABLE_TAB,
- G_CALLBACK( on_tab_updatable_enable_tab ));
-
selcount_ope = base_window_get_widget( BASE_WINDOW( instance ), "ConditionsCountSigneCombobox" );
base_window_signal_connect(
BASE_WINDOW( instance ),
@@ -329,21 +322,6 @@ on_tab_updatable_selection_changed( NactICapabilitiesTab *instance, gint count_s
}
static void
-on_tab_updatable_enable_tab( NactICapabilitiesTab *instance, NAObjectItem *item )
-{
- static const gchar *thisfn = "nact_icapabilities_tab_on_tab_updatable_enable_tab";
-
- g_return_if_fail( NACT_IS_ICAPABILITIES_TAB( instance ));
-
- if( st_initialized && !st_finalized ){
-
- g_debug( "%s: instance=%p, item=%p", thisfn, ( void * ) instance, ( void * ) item );
-
- tab_set_sensitive( instance );
- }
-}
-
-static void
on_selcount_ope_changed( GtkComboBox *combo, NactICapabilitiesTab *instance )
{
NAObjectItem *edited;
diff --git a/src/nact/nact-ienvironment-tab.c b/src/nact/nact-ienvironment-tab.c
index 96c8ca1..fbb76b6 100644
--- a/src/nact/nact-ienvironment-tab.c
+++ b/src/nact/nact-ienvironment-tab.c
@@ -79,7 +79,6 @@ static void interface_base_init( NactIEnvironmentTabInterface *klass );
static void interface_base_finalize( NactIEnvironmentTabInterface *klass );
static void on_tab_updatable_selection_changed( NactIEnvironmentTab *instance, gint count_selected );
-static void on_tab_updatable_enable_tab( NactIEnvironmentTab *instance, NAObjectItem *item );
static void on_show_always_toggled( GtkToggleButton *togglebutton, NactIEnvironmentTab *instance );
static void on_only_show_toggled( GtkToggleButton *togglebutton, NactIEnvironmentTab *instance );
@@ -244,12 +243,6 @@ nact_ienvironment_tab_runtime_init_toplevel( NactIEnvironmentTab *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_ENABLE_TAB,
- G_CALLBACK( on_tab_updatable_enable_tab ));
-
button = base_window_get_widget( BASE_WINDOW( instance ), "ShowAlwaysButton" );
base_window_signal_connect(
BASE_WINDOW( instance ),
@@ -490,29 +483,6 @@ on_tab_updatable_selection_changed( NactIEnvironmentTab *instance, gint count_se
}
static void
-on_tab_updatable_enable_tab( NactIEnvironmentTab *instance, NAObjectItem *item )
-{
- static const gchar *thisfn = "nact_ienvironment_tab_on_tab_updatable_enable_tab";
- NAObjectProfile *profile;
- NAIContext *context;
-
- g_return_if_fail( NACT_IS_IENVIRONMENT_TAB( instance ));
-
- if( st_initialized && !st_finalized ){
-
- g_debug( "%s: instance=%p, item=%p", thisfn, ( void * ) instance, ( void * ) item );
-
- g_object_get(
- G_OBJECT( instance ),
- TAB_UPDATABLE_PROP_EDITED_PROFILE, &profile,
- NULL );
-
- context = ( profile ? NA_ICONTEXT( profile ) : ( NAIContext * ) item );
- tab_set_sensitive( instance, context );
- }
-}
-
-static void
on_show_always_toggled( GtkToggleButton *toggle_button, NactIEnvironmentTab *instance )
{
static const gchar *thisfn = "nact_ienvironment_tab_on_show_always_toggled";
diff --git a/src/nact/nact-ifolders-tab.c b/src/nact/nact-ifolders-tab.c
index a4758d7..98710c1 100644
--- a/src/nact/nact-ifolders-tab.c
+++ b/src/nact/nact-ifolders-tab.c
@@ -69,7 +69,6 @@ static void interface_base_finalize( NactIFoldersTabInterface *klass );
static void on_browse_folder_clicked( GtkButton *button, BaseWindow *window );
static void on_tab_updatable_selection_changed( NactIFoldersTab *instance, gint count_selected );
-static void on_tab_updatable_enable_tab( NactIFoldersTab *instance, NAObjectItem *item );
static GSList *get_folders( void *context );
static void set_folders( void *context, GSList *filters );
@@ -190,12 +189,6 @@ nact_ifolders_tab_runtime_init_toplevel( NactIFoldersTab *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_ENABLE_TAB,
- G_CALLBACK( on_tab_updatable_enable_tab ));
-
nact_match_list_init_view( BASE_WINDOW( instance ), ITAB_NAME );
button = base_window_get_widget( BASE_WINDOW( instance ), "FolderBrowseButton" );
@@ -331,12 +324,6 @@ on_tab_updatable_selection_changed( NactIFoldersTab *instance, gint count_select
nact_match_list_on_selection_changed( BASE_WINDOW( instance ), ITAB_NAME, count_selected );
}
-static void
-on_tab_updatable_enable_tab( NactIFoldersTab *instance, NAObjectItem *item )
-{
- nact_match_list_on_enable_tab( BASE_WINDOW( instance ), ITAB_NAME, item );
-}
-
static GSList *
get_folders( void *context )
{
diff --git a/src/nact/nact-imimetypes-tab.c b/src/nact/nact-imimetypes-tab.c
index 376857e..1015eb6 100644
--- a/src/nact/nact-imimetypes-tab.c
+++ b/src/nact/nact-imimetypes-tab.c
@@ -56,7 +56,6 @@ static void interface_base_init( NactIMimetypesTabInterface *klass );
static void interface_base_finalize( NactIMimetypesTabInterface *klass );
static void on_tab_updatable_selection_changed( BaseWindow *window, gint count_selected );
-static void on_tab_updatable_enable_tab( BaseWindow *window, NAObjectItem *item );
static GSList *get_mimetypes( void *context );
static void set_mimetypes( void *context, GSList *filters );
@@ -189,12 +188,6 @@ nact_imimetypes_tab_runtime_init_toplevel( NactIMimetypesTab *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_ENABLE_TAB,
- G_CALLBACK( on_tab_updatable_enable_tab ));
-
nact_match_list_init_view( BASE_WINDOW( instance ), ITAB_NAME );
}
}
@@ -239,12 +232,6 @@ on_tab_updatable_selection_changed( BaseWindow *window, gint count_selected )
nact_match_list_on_selection_changed( window, ITAB_NAME, count_selected );
}
-static void
-on_tab_updatable_enable_tab( BaseWindow *window, NAObjectItem *item )
-{
- nact_match_list_on_enable_tab( window, ITAB_NAME, item );
-}
-
static GSList *
get_mimetypes( void *context )
{
diff --git a/src/nact/nact-ischemes-tab.c b/src/nact/nact-ischemes-tab.c
index 48176f5..cecf42f 100644
--- a/src/nact/nact-ischemes-tab.c
+++ b/src/nact/nact-ischemes-tab.c
@@ -59,7 +59,6 @@ static void interface_base_finalize( NactISchemesTabInterface *klass );
static void on_add_from_defaults( GtkButton *button, BaseWindow *window );
static void on_tab_updatable_selection_changed( BaseWindow *window, gint count_selected );
-static void on_tab_updatable_enable_tab( BaseWindow *window, NAObjectItem *item );
static GSList *get_schemes( void *context );
static void set_schemes( void *context, GSList *filters );
@@ -180,12 +179,6 @@ nact_ischemes_tab_runtime_init_toplevel( NactISchemesTab *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_ENABLE_TAB,
- G_CALLBACK( on_tab_updatable_enable_tab ));
-
nact_match_list_init_view( BASE_WINDOW( instance ), ITAB_NAME );
button = base_window_get_widget( BASE_WINDOW( instance ), "AddFromDefaultButton" );
@@ -276,12 +269,6 @@ on_tab_updatable_selection_changed( BaseWindow *window, gint count_selected )
nact_match_list_on_selection_changed( window, ITAB_NAME, count_selected );
}
-static void
-on_tab_updatable_enable_tab( BaseWindow *window, NAObjectItem *item )
-{
- nact_match_list_on_enable_tab( window, ITAB_NAME, item );
-}
-
static GSList *
get_schemes( void *context )
{
diff --git a/src/nact/nact-main-tab.h b/src/nact/nact-main-tab.h
index af933df..d21c207 100644
--- a/src/nact/nact-main-tab.h
+++ b/src/nact/nact-main-tab.h
@@ -51,7 +51,6 @@
/* signals
*/
#define TAB_UPDATABLE_SIGNAL_ITEM_UPDATED "nact-tab-updatable-item-updated"
-#define TAB_UPDATABLE_SIGNAL_ENABLE_TAB "nact-tab-updatable-enable-tab"
#define TAB_UPDATABLE_SIGNAL_PROVIDER_CHANGED "nact-tab-updatable-provider-changed"
/* notebook tabs
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 1615a2c..28a2d18 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -130,7 +130,6 @@ enum {
PROVIDER_CHANGED,
SELECTION_CHANGED,
ITEM_UPDATED,
- ENABLE_TAB,
UPDATE_SENSITIVITIES,
ORDER_CHANGED,
LAST_SIGNAL
@@ -463,25 +462,6 @@ class_init( NactMainWindowClass *klass )
G_TYPE_BOOLEAN );
/**
- * nact-tab-updatable-enable-tab:
- *
- * This signal is emitted by the IActionTab when the nature of the
- * item has been modified: some tabs should probably be enabled or
- * disabled
- */
- st_signals[ ENABLE_TAB ] = g_signal_new(
- TAB_UPDATABLE_SIGNAL_ENABLE_TAB,
- G_TYPE_OBJECT,
- G_SIGNAL_RUN_LAST,
- 0, /* no default handler */
- NULL,
- NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE,
- 1,
- G_TYPE_POINTER );
-
- /**
* main-window-update-sensitivities:
*
* This signal is emitted each time a user interaction may led the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]