[gtk+/refactor: 45/96] gtk/gtkmnemonichash.c: use accessor functions to access GtkWidget



commit bd4bd73d1d627271245c46093deb327d4001ccea
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Aug 11 23:06:45 2010 +0200

    gtk/gtkmnemonichash.c: use accessor functions to access GtkWidget

 gtk/gtkmnemonichash.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkmnemonichash.c b/gtk/gtkmnemonichash.c
index 6f85d04..37ee016 100644
--- a/gtk/gtkmnemonichash.c
+++ b/gtk/gtkmnemonichash.c
@@ -113,6 +113,7 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash,
 {
   GSList *list, *targets;
   GtkWidget *widget, *chosen_widget;
+  GdkWindow *window;
   gboolean overloaded;
 
   targets = g_hash_table_lookup (mnemonic_hash->hash,
@@ -125,11 +126,11 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash,
   for (list = targets; list; list = list->next)
     {
       widget = GTK_WIDGET (list->data);
-      
+      window = gtk_widget_get_window (widget);
+
       if (gtk_widget_is_sensitive (widget) &&
 	  gtk_widget_get_mapped (widget) &&
-          widget->window &&
-	  gdk_window_is_viewable (widget->window))
+          window && gdk_window_is_viewable (window))
 	{
 	  if (chosen_widget)
 	    {



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