[nautilus-actions] NactISchemesTab: enable the page if a context is available
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] NactISchemesTab: enable the page if a context is available
- Date: Wed, 15 Feb 2012 21:18:38 +0000 (UTC)
commit b2080a52be4d9c7a73782d7d49f40af8155b63ec
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Feb 15 22:16:55 2012 +0100
NactISchemesTab: enable the page if a context is available
ChangeLog | 1 +
src/nact/nact-ischemes-tab.c | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 582e604..a62da33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2012-02-15 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-ischemes-tab.c (on_main_selection_changed):
* src/nact/nact-imimetypes-tab.c (on_main_selection_changed):
* src/nact/nact-ifolders-tab.c (on_main_selection_changed):
* src/nact/nact-icapabilities-tab.c (on_main_selection_changed):
diff --git a/src/nact/nact-ischemes-tab.c b/src/nact/nact-ischemes-tab.c
index 491dd31..aaece47 100644
--- a/src/nact/nact-ischemes-tab.c
+++ b/src/nact/nact-ischemes-tab.c
@@ -62,7 +62,7 @@ static void interface_base_finalize( NactISchemesTabInterface *klass );
static void on_base_initialize_gtk( NactISchemesTab *instance, GtkWindow *toplevel, gpointer user_data );
static void on_base_initialize_window( NactISchemesTab *instance, gpointer user_data );
-static void on_main_selection_changed( BaseWindow *window, GList *selected_items, gpointer user_data );
+static void on_main_selection_changed( NactISchemesTab *instance, GList *selected_items, gpointer user_data );
static void on_add_from_defaults( GtkButton *button, BaseWindow *window );
static GSList *get_schemes( void *context );
@@ -231,17 +231,21 @@ on_base_initialize_window( NactISchemesTab *instance, void *user_data )
}
static void
-on_main_selection_changed( BaseWindow *window, GList *selected_items, gpointer user_data )
+on_main_selection_changed( NactISchemesTab *instance, GList *selected_items, gpointer user_data )
{
NAIContext *context;
gboolean editable;
+ gboolean enable_tab;
GtkWidget *button;
- g_object_get( G_OBJECT( window ),
+ g_object_get( G_OBJECT( instance ),
MAIN_PROP_CONTEXT, &context, MAIN_PROP_EDITABLE, &editable,
NULL );
- button = base_window_get_widget( window, "AddFromDefaultButton" );
+ enable_tab = ( context != NULL );
+ nact_main_tab_enable_page( NACT_MAIN_WINDOW( instance ), TAB_SCHEMES, enable_tab );
+
+ button = base_window_get_widget( BASE_WINDOW( instance ), "AddFromDefaultButton" );
base_gtk_utils_set_editable( G_OBJECT( button ), editable );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]