gpointer gtk_object_get_user_data (GtkObject *object) { if

gpointer
gtk_object_get_user_data (GtkObject *object)
{
  if (user_data_key_id)
-    gtk_object_get_data_by_id (object, user_data_key_id);
+    return gtk_object_get_data_by_id (object, user_data_key_id);

  return NULL;
}

boy oh boy, that was a *neat* one ;)
-timj
This commit is contained in:
Tim Janik 1998-03-14 06:22:28 +00:00
parent bc98ea9ce1
commit 8cde2c5c21
2 changed files with 5 additions and 5 deletions

View File

@ -587,18 +587,18 @@ static gint
gtk_menu_shell_is_item (GtkMenuShell *menu_shell,
GtkWidget *child)
{
GtkMenuShell *parent;
GtkWidget *parent;
g_return_val_if_fail (menu_shell != NULL, FALSE);
g_return_val_if_fail (GTK_IS_MENU_SHELL (menu_shell), FALSE);
g_return_val_if_fail (child != NULL, FALSE);
parent = GTK_MENU_SHELL (child->parent);
parent = child->parent;
while (parent && GTK_IS_MENU_SHELL (parent))
{
if (parent == menu_shell)
if (parent == (GtkWidget*) menu_shell)
return TRUE;
parent = GTK_MENU_SHELL (parent->parent_menu_shell);
parent = GTK_MENU_SHELL (parent)->parent_menu_shell;
}
return FALSE;

View File

@ -1210,7 +1210,7 @@ gpointer
gtk_object_get_user_data (GtkObject *object)
{
if (user_data_key_id)
gtk_object_get_data_by_id (object, user_data_key_id);
return gtk_object_get_data_by_id (object, user_data_key_id);
return NULL;
}