[nautilus-actions] NactICapabilitiesTab: enable the page if a context is available
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] NactICapabilitiesTab: enable the page if a context is available
- Date: Wed, 15 Feb 2012 21:18:02 +0000 (UTC)
commit 929b9e6ede138cae967efc4085bcc46905b9a76e
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Feb 15 22:11:33 2012 +0100
NactICapabilitiesTab: enable the page if a context is available
ChangeLog | 1 +
src/nact/nact-icapabilities-tab.c | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cb652db..219abe6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2012-02-15 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-icapabilities-tab.c (on_main_selection_changed):
* src/nact/nact-ibasenames-tab.c (on_main_selection_changed):
Enable the tab if a context is available.
diff --git a/src/nact/nact-icapabilities-tab.c b/src/nact/nact-icapabilities-tab.c
index 79412e3..11255d9 100644
--- a/src/nact/nact-icapabilities-tab.c
+++ b/src/nact/nact-icapabilities-tab.c
@@ -222,7 +222,16 @@ on_base_initialize_window( NactICapabilitiesTab *instance, void *user_data )
static void
on_main_selection_changed( NactICapabilitiesTab *instance, GList *selected_items, gpointer user_data )
{
- /* nothing to do here */
+ NAIContext *context;
+ gboolean editable;
+ gboolean enable_tab;
+
+ g_object_get( G_OBJECT( instance ),
+ MAIN_PROP_CONTEXT, &context, MAIN_PROP_EDITABLE, &editable,
+ NULL );
+
+ enable_tab = ( context != NULL );
+ nact_main_tab_enable_page( NACT_MAIN_WINDOW( instance ), TAB_CAPABILITIES, enable_tab );
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]