[gtk+] Avoid warnings when widgets are not created yet



commit 676316bbd3a20a703d3005b841b593e0c5ff30a3
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Aug 28 22:30:24 2011 -0400

    Avoid warnings when widgets are not created yet
    
    This widget is created on-demand, so we can not unconditionally
    set its sensitivity in some other place.

 gtk/gtkfilechooserdefault.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index b494840..7eaaef2 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -4096,7 +4096,8 @@ check_copy_file_location_sensitivity (GtkFileChooserDefault *impl)
   else
     active = TRUE;
 
-  gtk_widget_set_sensitive (impl->browse_files_popup_menu_copy_file_location_item, active);
+  if (impl->browse_files_popup_menu_copy_file_location_item)
+    gtk_widget_set_sensitive (impl->browse_files_popup_menu_copy_file_location_item, active);
 }
 
 /* Constructs the popup menu for the file list if needed */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]