gtk_container_add :: GtkContainer -> GtkWidget -> IO ()
gtk_container_add container widget = do
  widget_typename <- peekCString $ gobj_type_name widget
  container_typename <- peekCString $ gobj_type_name container
  putStrLn ("adding widget of type " ++ widget_typename ++ " to a " ++ container_typename)
  case (container_typename, widget_typename) of
    (_, "GtkMenuBar") -> return ()
    {-
    ("GtkFrame", _) -> do
      gtk_widget_hide widget
      orig <- orig_gtk_container_add
      orig container widget -}
    --(_, "GtkToolbar") -> return ()
    _ -> withDL "libgtk-x11-2.0.so" [RTLD_LAZY] $ \gtk -> do
           ptr <- dlsym gtk "gtk_container_add"
           let orig = mkCWVFun ptr
           orig container widget
gtk_container_add :: GtkContainer -> GtkWidget -> IO ()
gtk_container_add container widget = do
  widget_typename <- peekCString $ gobj_type_name widget
  container_typename <- peekCString $ gobj_type_name container
  putStrLn ("adding widget of type " ++ widget_typename ++ " to a " ++ container_typename)
  case (container_typename, widget_typename) of
    (_, "GtkMenuBar") -> return ()
    {-
    ("GtkFrame", _) -> do
      gtk_widget_hide widget
      orig <- orig_gtk_container_add
      orig container widget -}
    --(_, "GtkToolbar") -> return ()
    _ -> withDL "libgtk-x11-2.0.so" [RTLD_LAZY] $ \gtk -> do
           ptr <- dlsym gtk "gtk_container_add"
           let orig = mkCWVFun ptr
           orig container widget
gtk_container_add container widget = do
  widget_typename <- peekCString $ gobj_type_name widget
  container_typename <- peekCString $ gobj_type_name container
  putStrLn ("adding widget of type " ++ widget_typename ++ " to a " ++ container_typename)
  case (container_typename, widget_typename) of
    (_, "GtkMenuBar") -> return ()
    {-
    ("GtkFrame", _) -> do
      gtk_widget_hide widget
      orig <- orig_gtk_container_add
      orig container widget -}
    --(_, "GtkToolbar") -> return ()
    _ -> withDL "libgtk-x11-2.0.so" [RTLD_LAZY] $ \gtk -> do
           ptr <- dlsym gtk "gtk_container_add"
           let orig = mkCWVFun ptr
           orig container widget