Commit 28117e0f authored by Pierre Wieser's avatar Pierre Wieser

Check for Gtk+ >= 2.18 before using gtk_widget_get_sensitive()

parent 16de5d4a
2010-08-02 Pierre Wieser <pwieser@trychlos.org>
* src/nact/nact-add-capability-dialog.c (try_for_send_ok):
* src/nact/nact-add-scheme-dialog.c (try_for_send_ok):
* src/nact/nact-main-tab.c (nact_main_tab_is_page_enabled):
Check that Gtk+ is more recent that 2.18 for gtk_widget_get_sensitive().
Split the NACT manual by chapter.
* doc/nact/C/nact-usage.xml:
......
......@@ -543,10 +543,17 @@ static void
try_for_send_ok( NactAddCapabilityDialog *dialog )
{
GtkWidget *button;
gboolean is_sensitive;
button = base_window_get_widget( BASE_WINDOW( dialog ), "OKButton" );
if( gtk_widget_get_sensitive( button )){
#if(( GTK_MAJOR_VERSION > 2 ) || ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 18 ))
is_sensitive = gtk_widget_is_sensitive( button );
#else
is_sensitive = GTK_WIDGET_IS_SENSITIVE( button );
#endif
if( is_sensitive ){
send_ok( dialog );
}
}
......
......@@ -402,10 +402,17 @@ static void
try_for_send_ok( NactAddSchemeDialog *dialog )
{
GtkWidget *button;
gboolean is_sensitive;
button = base_window_get_widget( BASE_WINDOW( dialog ), "OKButton" );
if( gtk_widget_get_sensitive( button )){
#if(( GTK_MAJOR_VERSION > 2 ) || ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 18 ))
is_sensitive = gtk_widget_is_sensitive( button );
#else
is_sensitive = GTK_WIDGET_IS_SENSITIVE( button );
#endif
if( is_sensitive ){
send_ok( dialog );
}
}
......
......@@ -75,7 +75,7 @@ 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 ))
#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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment