[nautilus-actions] GTK_WIDGET_IS_SENSITIVE is deprecated from Gtk 2.20
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] GTK_WIDGET_IS_SENSITIVE is deprecated from Gtk 2.20
- Date: Fri, 2 Apr 2010 00:45:23 +0000 (UTC)
commit 7069518bda46c53824c65ffceee4469e3cb3545b
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Apr 2 02:44:50 2010 +0200
GTK_WIDGET_IS_SENSITIVE is deprecated from Gtk 2.20
ChangeLog | 4 ++++
configure.ac | 1 +
src/nact/nact-main-tab.c | 5 +++++
3 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 946ea11..7cf2adf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-04-02 Pierre Wieser <pwieser trychlos org>
+ * configure.ac:
+ * src/nact/nact-main-tab.c (nact_main_tab_is_page_enabled):
+ GTK_WIDGET_IS_SENSITIVE is deprecated starting from gtk 2.20.
+
* src/core/na-core-utils.c (na_core_utils_file_exists):
* src/io-xml/naxml-writer.c (output_xml_to_file):
Takes an URI as the filename.
diff --git a/configure.ac b/configure.ac
index b16c980..9935392 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,7 @@ AM_GCONF_SOURCE_2
# Gtk >= 2.12: GtkBuilder
#
# [nact-assistant] remove work-around for #589745 when Gtk+ >= 2.18
+# [nact-main-tab.c] remove test on gtk_version when Gtk >= 2.18
# [nact-main-menubar] GtkActivatable only available starting with Gtk+ 2.16
# [configure.ac, nautilus-actions.c] remove test for
# nautilus_menu_provider_emit_items_updated_signal() when Gnome >= 2.16
diff --git a/src/nact/nact-main-tab.c b/src/nact/nact-main-tab.c
index 027467b..5d527d5 100644
--- a/src/nact/nact-main-tab.c
+++ b/src/nact/nact-main-tab.c
@@ -73,7 +73,12 @@ nact_main_tab_is_page_enabled( NactMainWindow *window, gint num_page )
notebook = GTK_NOTEBOOK( base_window_get_widget( BASE_WINDOW( window ), "MainNotebook" ));
page = gtk_notebook_get_nth_page( notebook, num_page );
+#if(( GTK_MAJOR_VERSION > 2 ) || ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION > 18 ))
+ is_sensitive = gtk_widget_is_sensitive( page );
+#else
is_sensitive = GTK_WIDGET_IS_SENSITIVE( page );
+#endif
+
g_debug( "nact_main_tab_is_page_enabled: num_page=%d, is_sensitive=%s", num_page, is_sensitive ? "True":"False" );
return( is_sensitive );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]