* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.58 2003/03/11 19:02:30 fenrir Exp $
+ * $Id: vlc_common.h,v 1.59 2003/03/17 18:02:11 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
#ifndef HAVE_STRNDUP
# if defined(STRNDUP_IN_GNOME_H) && \
- (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main))
+ (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main)||\
+ defined(MODULE_NAME_IS_gnome2)||defined(MODULE_NAME_IS_gnome2_main))
/* Do nothing: gnome.h defines strndup for us */
# else
# define strndup vlc_strndup
VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) );
#if defined( ENABLE_NLS ) && \
- (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main))
+ (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main)||\
+ defined(MODULE_NAME_IS_gnome2)||defined(MODULE_NAME_IS_gnome2_main))
/* Declare nothing: gnome.h will do it for us */
#elif defined( ENABLE_NLS ) && defined( HAVE_INCLUDED_GETTEXT )
# include "libintl.h"
* familiar.c : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: familiar.c,v 1.32 2003/03/17 13:49:14 marcari Exp $
+ * $Id: familiar.c,v 1.33 2003/03/17 18:02:10 sam Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
}
#ifdef NEED_GTK_MAIN
- msg_Dbg( p_intf, "Using gtk_main" );
- p_intf->p_sys->p_gtk_main = module_Need( p_this, "gtk_main", "gtk" );
+ msg_Dbg( p_intf, "Using gui-helper" );
+ p_intf->p_sys->p_gtk_main = module_Need( p_this, "gui-helper", "gtk" );
if( p_intf->p_sys->p_gtk_main == NULL )
{
free( p_intf->p_sys );
}
#ifdef NEED_GTK_MAIN
- msg_Dbg( p_intf, "Releasing gtk_main" );
+ msg_Dbg( p_intf, "Releasing gui-helper" );
module_Unneed( p_intf, p_intf->p_sys->p_gtk_main );
#endif
#ifndef NEED_GTK_MAIN
/* gtk_init needs to know the command line. We don't care, so we
* give it an empty one */
- char *p_args[] = { "" };
+ char *p_args[] = { "", NULL };
char **pp_args = p_args;
int i_args = 1;
int i_dummy;
exit (1);
#else
gtk_set_locale ();
- #ifndef NEED_GTK_MAIN
+# ifndef NEED_GTK_MAIN
msg_Dbg( p_intf, "Starting familiar GTK+ interface" );
gtk_init( &i_args, &pp_args );
- #else
+# else
/* Initialize Gtk+ */
msg_Dbg( p_intf, "Starting familiar GTK+ interface thread" );
gdk_threads_enter();
- #endif
+# endif
#endif
/* Create some useful widgets that will certainly be used */
// FIXME: magic path
add_pixmap_directory("share");
add_pixmap_directory("/usr/share/vlc");
+
/* Path for pixmaps under linupy 1.4 */
add_pixmap_directory("/usr/local/share/pixmaps/vlc");
-
/* Path for pixmaps under linupy 2.0 */
add_pixmap_directory("/usr/share/pixmaps/vlc");
modules/gui/gtk/playlist.c \
modules/gui/gtk/modules.c \
modules/gui/gtk/preferences.c \
- modules/gui/gtk/gtk_callbacks.c
+ modules/gui/gtk/gtk_callbacks.c \
+ $(NULL)
SOURCES_gtk = \
modules/gui/gtk/gtk.c \
modules/gui/gtk/gtk_interface.h \
modules/gui/gtk/playlist.h \
modules/gui/gtk/preferences.h \
- modules/gui/gtk/gtk_support.h
+ modules/gui/gtk/gtk_support.h \
+ $(NULL)
EXTRA_DIST += \
modules/gui/gtk/gtk.glade \
modules/gui/gtk/gnome.glade \
- modules/gui/gtk/gnome_callbacks.c
+ modules/gui/gtk/gnome_callbacks.c \
+ $(NULL)
* gnome.c : Gnome plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.13 2003/03/10 18:17:19 gbazin Exp $
+ * $Id: gnome.c,v 1.14 2003/03/17 18:02:10 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
return VLC_ENOMEM;
}
- p_intf->p_sys->p_gtk_main = module_Need( p_this, "gtk_main", "gnome" );
+ p_intf->p_sys->p_gtk_main = module_Need( p_this, "gui-helper", "gnome" );
if( p_intf->p_sys->p_gtk_main == NULL )
{
free( p_intf->p_sys );
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: gtk.c,v 1.18 2003/03/10 18:17:19 gbazin Exp $
+ * $Id: gtk.c,v 1.19 2003/03/17 18:02:10 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
}
#ifdef NEED_GTK_MAIN
- p_intf->p_sys->p_gtk_main = module_Need( p_this, "gtk_main", "gtk" );
+ p_intf->p_sys->p_gtk_main = module_Need( p_this, "gui-helper", "gtk" );
if( p_intf->p_sys->p_gtk_main == NULL )
{
free( p_intf->p_sys );
#else
/* gtk_init needs to know the command line. We don't care, so we
* give it an empty one */
- char *p_args[] = { "" };
+ char *p_args[] = { "", NULL };
char **pp_args = p_args;
int i_args = 1;
int i_dummy;
* gtk_main.c : Gtk+ wrapper for gtk_main
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: gtk_main.c,v 1.11 2003/01/15 13:16:39 sam Exp $
+ * $Id: gtk_main.c,v 1.12 2003/03/17 18:02:10 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#include <gtk/gtk.h>
-#ifdef MODULE_NAME_IS_gnome_main
+#if defined(MODULE_NAME_IS_gtk2_main)
+# include <glib.h>
+#endif
+
+#if defined(MODULE_NAME_IS_gnome_main) || defined(MODULE_NAME_IS_gnome2_main)
# include <gnome.h>
#endif
* Module descriptor
*****************************************************************************/
vlc_module_begin();
- set_description( _("Gtk+ helper module") );
-#ifdef MODULE_NAME_IS_gtk_main
- set_capability( "gtk_main", 90 );
-#else
- set_capability( "gtk_main", 100 );
+ int i_cap;
+ set_description( _("Gtk+ GUI helper module") );
+#if defined(MODULE_NAME_IS_gtk_main)
+ i_cap = 90;
+ add_shortcut( "gtk" );
+#elif defined(MODULE_NAME_IS_gnome_main)
+ i_cap = 100;
+ add_shortcut( "gtk" );
add_shortcut( "gnome" );
+#elif defined(MODULE_NAME_IS_gtk2_main)
+ i_cap = 95;
+ add_shortcut( "gtk2" );
+#elif defined(MODULE_NAME_IS_gnome2_main)
+ i_cap = 105;
+ add_shortcut( "gtk2" );
+ add_shortcut( "gnome2" );
#endif
- add_shortcut( "gtk" );
+ set_capability( "gui-helper", i_cap );
set_callbacks( Open, Close );
linked_with_a_crap_library_which_uses_atexit();
vlc_module_end();
{
/* gtk_init needs to know the command line. We don't care, so we
* give it an empty one */
- static char *p_args[] = { "" };
-#ifdef MODULE_NAME_IS_gtk_main
+ static char *p_args[] = { "", NULL };
+#if defined(MODULE_NAME_IS_gtk_main) || defined(MODULE_NAME_IS_gtk2_main)
static char **pp_args = p_args;
#endif
static int i_args = 1;
/* FIXME: deprecated ? */
/* gdk_threads_init(); */
-#ifdef MODULE_NAME_IS_gnome_main
+#if defined(MODULE_NAME_IS_gnome_main) || defined(MODULE_NAME_IS_gnome2_main)
gnome_init( p_this->p_vlc->psz_object_name, VERSION, i_args, p_args );
#else
gtk_set_locale();
* qte_main.c : QT Embedded wrapper for gte_main
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: qte_main.cpp,v 1.4 2003/03/06 10:11:33 jpsaman Exp $
+ * $Id: qte_main.cpp,v 1.5 2003/03/17 18:02:10 sam Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
VLC_COMMON_MEMBERS
QApplication* p_qte_application;
- QWidget* p_qte_widget;
+ QWidget* p_qte_widget;
} qte_thread_t;
* Module descriptor
*****************************************************************************/
vlc_module_begin();
- set_description( _("Qt Embedded helper module") );
- set_capability( "qte_main", 90 );
+ set_description( _("Qt Embedded GUI helper module") );
+ set_capability( "gui-helper", 90 );
add_shortcut( "qte" );
set_callbacks( Open, Close );
vlc_module_end();
p_qte_main = (qte_thread_t *) vlc_object_create( p_this, sizeof(qte_thread_t) );
- /* Launch the gtk_main() thread. It will not return until it has
- * called gdk_threads_enter(), which ensures us thread safety. */
+ /* Launch the QApplication::exec() thread. It will not return until the
+ * application is properly initialized, which ensures us thread safety. */
if( vlc_thread_create( p_qte_main, "qte_main", QteMain,
VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
{
* qte.cpp : QT Embedded plugin for vlc
*****************************************************************************
* Copyright (C) 1998-2003 VideoLAN
- * $Id: qte.cpp,v 1.15 2003/03/06 10:11:33 jpsaman Exp $
+ * $Id: qte.cpp,v 1.16 2003/03/17 18:02:10 sam Exp $
*
* Authors: Gerald Hansink <gerald.hansink@ordain.nl>
* Jean-Paul Saman <jpsaman@wxs.nl>
p_vout->pf_display = Display;
#ifdef NEED_QTE_MAIN
- p_vout->p_sys->p_qte_main = module_Need( p_this, "qte_main", "qte" );
+ p_vout->p_sys->p_qte_main = module_Need( p_this, "gui-helper", "qte" );
if( p_vout->p_sys->p_qte_main == NULL )
{
free( p_vout->p_sys );
}
#ifdef NEED_QTE_MAIN
- msg_Dbg( p_vout, "Releasing qte_main" );
+ msg_Dbg( p_vout, "Releasing gui-helper" );
module_Unneed( p_vout, p_vout->p_sys->p_qte_main );
#endif