[nautilus-actions] NactIMimetypesTab: enable the page if a context is available
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] NactIMimetypesTab: enable the page if a context is available
- Date: Wed, 15 Feb 2012 21:18:28 +0000 (UTC)
commit 5a8bcf48bb8258614a07b8d5b4f27de5b77de604
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Feb 15 22:15:26 2012 +0100
NactIMimetypesTab: enable the page if a context is available
ChangeLog | 1 +
src/nact/nact-imimetypes-tab.c | 15 ++++++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 68545ad..73400e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2012-02-15 Pierre Wieser <pwieser trychlos org>
+ * 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):
* src/nact/nact-ibasenames-tab.c (on_main_selection_changed):
diff --git a/src/nact/nact-imimetypes-tab.c b/src/nact/nact-imimetypes-tab.c
index 3b95c19..85d4bd7 100644
--- a/src/nact/nact-imimetypes-tab.c
+++ b/src/nact/nact-imimetypes-tab.c
@@ -59,7 +59,7 @@ static void interface_base_finalize( NactIMimetypesTabInterface *klass );
static void on_base_initialize_gtk( NactIMimetypesTab *instance, GtkWindow *toplevel, gpointer user_data );
static void on_base_initialize_window( NactIMimetypesTab *instance, gpointer user_data );
-static void on_main_selection_changed( BaseWindow *window, GList *selected_items, gpointer user_data );
+static void on_main_selection_changed( NactIMimetypesTab *instance, GList *selected_items, gpointer user_data );
static GSList *get_mimetypes( void *context );
static void set_mimetypes( void *context, GSList *filters );
@@ -232,9 +232,18 @@ on_base_initialize_window( NactIMimetypesTab *instance, void *user_data )
}
static void
-on_main_selection_changed( BaseWindow *window, GList *selected_items, gpointer user_data )
+on_main_selection_changed( NactIMimetypesTab *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_MIMETYPES, enable_tab );
}
static GSList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]