/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <gtk/gtk.h>
*****************************************************************************/
vlc_module_begin();
int i_cap;
- set_description( _("Gtk+ GUI helper") );
+ set_description( N_("Gtk+ GUI helper") );
#if defined(MODULE_NAME_IS_gtk_main)
i_cap = 90;
add_shortcut( "gtk" );
return VLC_SUCCESS;
}
- p_gtk_main = vlc_object_create( p_this, VLC_OBJECT_GENERIC );
+ p_gtk_main = vlc_object_create( p_this, sizeof( vlc_object_t ) );
/* Only initialize gthreads if it's the first time we do it */
if( !g_thread_supported() )
/* Launch the gtk_main() thread. It will not return until it has
* called gdk_threads_enter(), which ensures us thread safety. */
if( vlc_thread_create( p_gtk_main, "gtk_main", GtkMain,
- VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
+ VLC_THREAD_PRIORITY_LOW, true ) )
{
- vlc_object_destroy( p_gtk_main );
+ vlc_object_release( p_gtk_main );
i_refcount--;
vlc_mutex_unlock( lock );
return VLC_ETHREAD;
gtk_main_quit();
vlc_thread_join( p_gtk_main );
- vlc_object_destroy( p_gtk_main );
+ vlc_object_release( p_gtk_main );
p_gtk_main = NULL;
vlc_mutex_unlock( lock );
gdk_threads_leave();
}
-