From 94f3d0f50d008e8b11c1a4b35a46b602f43802a2 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 4 May 2012 17:10:35 +0200 Subject: some header-including cleanup --- lib/gtk-vlc-player/gtk-vlc-player.c | 3 +-- src/main.c | 18 ++++-------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/lib/gtk-vlc-player/gtk-vlc-player.c b/lib/gtk-vlc-player/gtk-vlc-player.c index 82c33ac..b2272a0 100644 --- a/lib/gtk-vlc-player/gtk-vlc-player.c +++ b/lib/gtk-vlc-player/gtk-vlc-player.c @@ -9,12 +9,11 @@ #include #else #include -#include #endif #include -#include +#include "gtk-vlc-player.h" static void gtk_vlc_player_class_init(GtkVlcPlayerClass *klass); static void gtk_vlc_player_init(GtkVlcPlayer *klass); diff --git a/src/main.c b/src/main.c index 8b3e8b1..df2f9ef 100644 --- a/src/main.c +++ b/src/main.c @@ -2,20 +2,11 @@ #include "config.h" #endif -#define _GNU_SOURCE -#include -#include -#include -#include - -#include -#ifdef __WIN32__ -#include -#else -#include +#ifdef HAVE_X11_XLIB_H #include #endif +#include #include int @@ -24,7 +15,7 @@ main(int argc, char *argv[]) GtkWidget *window, *player; /* init threads */ -#ifndef __WIN32__ +#ifdef HAVE_X11_XLIB_H XInitThreads(); /* FIXME: really required??? */ #endif g_thread_init(NULL); @@ -45,11 +36,10 @@ main(int argc, char *argv[]) gtk_container_add(GTK_CONTAINER(window), player); gtk_vlc_player_load(GTK_VLC_PLAYER(player), argv[1]); + gtk_vlc_player_play(GTK_VLC_PLAYER(player)); gtk_widget_show_all(window); - gtk_vlc_player_play(GTK_VLC_PLAYER(player)); - gdk_threads_enter(); gtk_main(); gdk_threads_leave(); -- cgit v1.2.3