]> Pileus Git - ~andy/gtk/blobdiff - gtk/a11y/gtknotebookaccessible.c
Change FSF Address
[~andy/gtk] / gtk / a11y / gtknotebookaccessible.c
index c4e5b26c94800ff0ebda18ef591e9467b718f8bd..b755552e78070b99a5d16e3a5ac423f0497ee5b7 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
@@ -42,6 +40,8 @@ check_focus_tab (gpointer data)
   atk_obj = ATK_OBJECT (data);
   accessible = GTK_NOTEBOOK_ACCESSIBLE (atk_obj);
   widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_obj));
+  if (widget == NULL)
+    return FALSE;
   notebook = GTK_NOTEBOOK (widget);
 
   accessible->idle_focus_id = 0;
@@ -132,17 +132,6 @@ page_removed_cb (GtkNotebook *notebook,
 }
 
 
-static void
-accessible_destroyed (gpointer data)
-{
-  GtkNotebookAccessible *accessible = GTK_NOTEBOOK_ACCESSIBLE (data);
-
-  if (accessible->idle_focus_id)
-    {
-      g_source_remove (accessible->idle_focus_id);
-      accessible->idle_focus_id = 0;
-    }
-}
 static void
 gtk_notebook_accessible_initialize (AtkObject *obj,
                                     gpointer   data)
@@ -171,8 +160,6 @@ gtk_notebook_accessible_initialize (AtkObject *obj,
   g_signal_connect (notebook, "page-removed",
                     G_CALLBACK (page_removed_cb), NULL);
 
-  g_object_weak_ref (G_OBJECT (notebook), (GWeakNotify)accessible_destroyed, obj);
-
   obj->role = ATK_ROLE_PAGE_TAB_LIST;
 }