Commit 8b1907e3 authored by Bastien Nocera's avatar Bastien Nocera Committed by Bastien Nocera

Loads of changes for the start of the GTK+ only build, Glade files are

2004-04-10  Bastien Nocera  <hadess@hadess.net>

	* configure.in:
	* data/totem.glade:
	* src/Makefile.am:
	* src/bacon-cd-selection.c: (bacon_cd_selection_new),
	(bacon_cd_selection_set_device), (bacon_cd_selection_get_device):
	* src/bacon-cd-selection.h:
	* src/bacon-v4l-selection.c: (bacon_v4l_selection_new),
	(bacon_v4l_selection_set_device), (bacon_v4l_selection_get_device):
	* src/bacon-video-widget-properties.c:
	* src/egg-recent-item.c: (egg_recent_item_new),
	(egg_recent_item_set_private), (egg_recent_item_get_private):
	* src/egg-recent-item.h:
	* src/egg-recent-util.c:
	* src/egg-recent-view.h:
	* src/totem-pl-parser.c:
	* src/totem-playlist.c: (button_press_cb), (button_release_cb),
	(drag_begin_cb), (drag_end_cb), (init_treeview):
	* src/totem-preferences.c:
	* src/totem-private.h:
	* src/totem-screenshot.c:
	* src/totem-statusbar.c:
	* src/totem-stock-icons.c:
	* src/totem-video-thumbnailer.c:
	* src/totem.c: (on_open_location1_activate),
	(totem_callback_connect), (main):
	* src/vanity.c: (on_about1_activate), (vanity_callback_connect),
	(main):
	* src/video-dev.c:
	Loads of changes for the start of the GTK+ only build,
	Glade files are still broken, and the Nautilus properties page
	is built unconditionally because of what I suspect is a make bug
	Also committed a patch by Sanjay Kumar .J <vjsanjay_signed@yahoo.com>
	to allow DND reordering in the playlist, doesn't work on my machine
	I think I found another libXi bug (Closes: #121275)
parent 43e5c4f8
2004-04-10 Bastien Nocera <hadess@hadess.net>
* configure.in:
* data/totem.glade:
* src/Makefile.am:
* src/bacon-cd-selection.c: (bacon_cd_selection_new),
(bacon_cd_selection_set_device), (bacon_cd_selection_get_device):
* src/bacon-cd-selection.h:
* src/bacon-v4l-selection.c: (bacon_v4l_selection_new),
(bacon_v4l_selection_set_device), (bacon_v4l_selection_get_device):
* src/bacon-video-widget-properties.c:
* src/egg-recent-item.c: (egg_recent_item_new),
(egg_recent_item_set_private), (egg_recent_item_get_private):
* src/egg-recent-item.h:
* src/egg-recent-util.c:
* src/egg-recent-view.h:
* src/totem-pl-parser.c:
* src/totem-playlist.c: (button_press_cb), (button_release_cb),
(drag_begin_cb), (drag_end_cb), (init_treeview):
* src/totem-preferences.c:
* src/totem-private.h:
* src/totem-screenshot.c:
* src/totem-statusbar.c:
* src/totem-stock-icons.c:
* src/totem-video-thumbnailer.c:
* src/totem.c: (on_open_location1_activate),
(totem_callback_connect), (main):
* src/vanity.c: (on_about1_activate), (vanity_callback_connect),
(main):
* src/video-dev.c:
Loads of changes for the start of the GTK+ only build,
Glade files are still broken, and the Nautilus properties page
is built unconditionally because of what I suspect is a make bug
Also committed a patch by Sanjay Kumar .J <vjsanjay_signed@yahoo.com>
to allow DND reordering in the playlist, doesn't work on my machine
I think I found another libXi bug (Closes: #121275)
2004-04-09 Bastien Nocera <hadess@hadess.net>
* data/totem.glade:
......
......@@ -114,13 +114,35 @@ AM_CONDITIONAL(TOTEM_VANITY, test x$COMPILE_VANITY = "xyes")
AC_MSG_CHECKING(whether to compile vanity)
AC_MSG_RESULT($COMPILE_VANITY);
dnl Check for GTK+ only build
AC_ARG_ENABLE(gtk,
AC_HELP_STRING([--enable-gtk],[compile a gtk+ only version]),
[case "${enableval}" in
yes) ENABLE_GTK=yes ;;
no) ENABLE_GTK=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-vanity) ;;
esac],
[ENABLE_GTK=no]) dnl Default value
dnl Seems that the order matters because libtool blows
PKG_CHECK_MODULES(EXTRA_GNOME, glib-2.0 >= 2.1.0 gtk+-2.0 >= 2.3.1 libgnomeui-2.0 >= 2.3.3 libglade-2.0 gnome-vfs-2.0 >= 2.1.6 gnome-vfs-module-2.0 >= 2.1.6 gnome-desktop-2.0 >= 2.1.5 $MM)
dnl Also check if we're going to be using GTK+ only
if test x$ENABLE_GTK = "xno" ; then
PKG_CHECK_MODULES(EXTRA_GNOME, glib-2.0 >= 2.1.0 gtk+-2.0 >= 2.3.1 libgnomeui-2.0 >= 2.3.3 libglade-2.0 gnome-vfs-2.0 >= 2.1.6 gnome-vfs-module-2.0 >= 2.1.6 gnome-desktop-2.0 >= 2.1.5 $MM)
AC_DEFINE(HAVE_LIBGNOME_DESKTOP, 1, [defined if you have gnome-desktop])
HAVE_GNOME=yes
else
PKG_CHECK_MODULES(EXTRA_GNOME, glib-2.0 >= 2.1.0 gtk+-2.0 >= 2.3.1 libglade-2.0 gnome-vfs-2.0 >= 2.1.6 gnome-vfs-module-2.0 >= 2.1.6 $MM)
AC_DEFINE(USE_STABLE_LIBGNOMEUI, 1, [defined if we don't have GNOME])
AC_DEFINE(HAVE_GTK_ONLY, 1, [defined if GNOME isn't used])
HAVE_GNOME=no
fi
AM_CONDITIONAL(HAVE_GNOME, test x$HAVE_GNOME = "xyes")
EXTRA_GNOME_CFLAGS="$EXTRA_GNOME_CFLAGS"
EXTRA_GNOME_LIBS="$EXTRA_GNOME_LIBS"
AC_SUBST(EXTRA_GNOME_CFLAGS)
AC_SUBST(EXTRA_GNOME_LIBS)
AC_DEFINE(HAVE_LIBGNOME_DESKTOP, 1, [defined if you have gnome-desktop])
PKG_CHECK_MODULES(GTK, gtk+-x11-2.0 $MM gthread-2.0)
AC_SUBST(GTK_CFLAGS)
......
This diff is collapsed.
......@@ -93,14 +93,16 @@ totem_LDADD = $(X_LIBS) $(EXTRA_GNOME_LIBS) $(XTEST_LIBS) $(REMOTE_LIBS) $(RANDR
totem_video_thumbnailer_SOURCES = $(VIDEOWIDGET) totem-video-thumbnailer.c
totem_video_thumbnailer_LDADD = $(X_LIBS) $(GTK_LIBS) $(XTEST_LIBS) $(RANDR_LIBS) $(NVTV_LIBS)
#FIXME for gtk+ only version
#if HAVE_GNOME
libexec_PROGRAMS = totem-properties-page
totem_properties_page_SOURCES = \
$(VIDEOWIDGET) \
bacon-video-widget-properties.c \
bacon-video-widget-properties.h \
totem-properties-page.c
totem_properties_page_LDADD = $(X_LIBS) $(EXTRA_GNOME_LIBS) $(XTEST_LIBS) $(RANDR_LIBS) $(NVTV_LIBS)
#endif
vanity_SOURCES = \
$(VIDEOWIDGET) \
......
......@@ -20,10 +20,33 @@
* Authors: Bastien Nocera <hadess@hadess.net>
*/
#include <config.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#ifndef HAVE_GTK_ONLY
#include <gnome.h>
#else
#include <gtk/gtkmenu.h>
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtkmenuitem.h>
#endif /* !HAVE_GTK_ONLY */
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#endif /* HAVE_GTK_ONLY */
#include "bacon-cd-selection.h"
#include "cd-drive.h"
......@@ -245,6 +268,7 @@ cdrom_option_menu (BaconCdSelection *bcs)
return option_menu;
}
#ifndef HAVE_GTK_ONLY
static void
on_combo_entry_changed (GnomeFileEntry *entry, gpointer user_data)
{
......@@ -259,6 +283,7 @@ on_combo_entry_changed (GnomeFileEntry *entry, gpointer user_data)
bcs_table_signals[DEVICE_CHANGED],
0, str);
}
#endif /* !HAVE_GTK_ONLY */
GtkWidget *
bacon_cd_selection_new (void)
......@@ -270,6 +295,7 @@ bacon_cd_selection_new (void)
(g_object_new (bacon_cd_selection_get_type (), NULL));
bcs = BACON_CD_SELECTION (widget);
#ifndef HAVE_GTK_ONLY
if (bcs->priv->is_entry)
{
bcs->priv->widget = gnome_file_entry_new (NULL,
......@@ -284,7 +310,9 @@ bacon_cd_selection_new (void)
TRUE, /* expand */
TRUE, /* fill */
0); /* padding */
} else {
} else
#endif /* !HAVE_GTK_ONLY */
{
bcs->priv->widget = cdrom_option_menu (bcs);
g_signal_connect (bcs->priv->widget, "changed",
......@@ -361,7 +389,6 @@ bacon_cd_selection_get_default_device (BaconCdSelection *bcs)
void
bacon_cd_selection_set_device (BaconCdSelection *bcs, const char *device)
{
GtkWidget *entry;
GList *l;
CDDrive *drive;
gboolean found;
......@@ -370,12 +397,17 @@ bacon_cd_selection_set_device (BaconCdSelection *bcs, const char *device)
g_return_if_fail (bcs != NULL);
g_return_if_fail (BACON_IS_CD_SELECTION (bcs));
#ifndef HAVE_GTK_ONLY
if (bcs->priv->is_entry != FALSE)
{
GtkWidget *entry;
entry = gnome_file_entry_gtk_entry
(GNOME_FILE_ENTRY (bcs->priv->widget));
gtk_entry_set_text (GTK_ENTRY (entry), device);
} else {
} else
#endif /* !HAVE_GTK_ONLY */
{
i = -1;
found = FALSE;
......@@ -416,19 +448,23 @@ bacon_cd_selection_set_device (BaconCdSelection *bcs, const char *device)
const char *
bacon_cd_selection_get_device (BaconCdSelection *bcs)
{
GtkWidget *entry;
CDDrive *drive;
int i;
g_return_val_if_fail (bcs != NULL, NULL);
g_return_val_if_fail (BACON_IS_CD_SELECTION (bcs), NULL);
#ifndef HAVE_GTK_ONLY
if (bcs->priv->is_entry != FALSE)
{
GtkWidget *entry;
entry = gnome_file_entry_gtk_entry
(GNOME_FILE_ENTRY (bcs->priv->widget));
return gtk_entry_get_text (GTK_ENTRY (entry));
} else {
} else
#endif /* !HAVE_GTK_ONLY */
{
i = gtk_option_menu_get_history (GTK_OPTION_MENU
(bcs->priv->widget));
drive = get_drive (bcs, i);
......
......@@ -21,7 +21,7 @@
#ifndef HAVE_BACON_CD_SELECTION_H
#define HAVE_BACON_CD_SELECTION_H
#include <gtk/gtkwidget.h>
#include <gtk/gtkvbox.h>
#include <cd-drive.h>
G_BEGIN_DECLS
......
......@@ -23,7 +23,28 @@
#include <config.h>
#include <string.h>
#ifndef HAVE_GTK_ONLY
#include <gnome.h>
#else
#include <gtk/gtk.h>
#endif /* !HAVE_GTK_ONLY */
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#else
#include <libgnome/gnome-i18n.h>
#endif /* HAVE_GTK_ONLY */
#include "bacon-v4l-selection.h"
......@@ -244,6 +265,7 @@ video_dev_option_menu (BaconV4lSelection *bvs)
return option_menu;
}
#ifndef HAVE_GTK_ONLY
static void
on_combo_entry_changed (GnomeFileEntry *entry, gpointer user_data)
{
......@@ -258,6 +280,7 @@ on_combo_entry_changed (GnomeFileEntry *entry, gpointer user_data)
bvs_table_signals[DEVICE_CHANGED],
0, str);
}
#endif /* !HAVE_GTK_ONLY */
GtkWidget *
bacon_v4l_selection_new (void)
......@@ -269,6 +292,7 @@ bacon_v4l_selection_new (void)
(g_object_new (bacon_v4l_selection_get_type (), NULL));
bvs = BACON_V4L_SELECTION (widget);
#ifndef HAVE_GTK_ONLY
if (bvs->priv->is_entry)
{
bvs->priv->widget = gnome_file_entry_new (NULL,
......@@ -281,7 +305,9 @@ bacon_v4l_selection_new (void)
TRUE, /* expand */
TRUE, /* fill */
0); /* padding */
} else {
} else
#endif /* !HAVE_GTK_ONLY */
{
bvs->priv->widget = video_dev_option_menu (bvs);
g_signal_connect (bvs->priv->widget, "changed",
......@@ -358,7 +384,6 @@ bacon_v4l_selection_get_default_device (BaconV4lSelection *bvs)
void
bacon_v4l_selection_set_device (BaconV4lSelection *bvs, const char *device)
{
GtkWidget *entry;
GList *l;
VideoDev *drive;
gboolean found;
......@@ -367,12 +392,17 @@ bacon_v4l_selection_set_device (BaconV4lSelection *bvs, const char *device)
g_return_if_fail (bvs != NULL);
g_return_if_fail (BACON_IS_CD_SELECTION (bvs));
#ifndef HAVE_GTK_ONLY
if (bvs->priv->is_entry != FALSE)
{
GtkWidget *entry;
entry = gnome_file_entry_gtk_entry
(GNOME_FILE_ENTRY (bvs->priv->widget));
gtk_entry_set_text (GTK_ENTRY (entry), device);
} else {
} else
#endif /* !HAVE_GTK_ONLY */
{
i = -1;
found = FALSE;
......@@ -413,19 +443,23 @@ bacon_v4l_selection_set_device (BaconV4lSelection *bvs, const char *device)
const char *
bacon_v4l_selection_get_device (BaconV4lSelection *bvs)
{
GtkWidget *entry;
VideoDev *drive;
int i;
g_return_val_if_fail (bvs != NULL, NULL);
g_return_val_if_fail (BACON_IS_CD_SELECTION (bvs), NULL);
#ifndef HAVE_GTK_ONLY
if (bvs->priv->is_entry != FALSE)
{
GtkWidget *entry;
entry = gnome_file_entry_gtk_entry
(GNOME_FILE_ENTRY (bvs->priv->widget));
return gtk_entry_get_text (GTK_ENTRY (entry));
} else {
} else
#endif /* !HAVE_GTK_ONLY */
{
i = gtk_option_menu_get_history (GTK_OPTION_MENU
(bvs->priv->widget));
drive = get_drive (bvs, i);
......
......@@ -25,11 +25,27 @@
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <libgnome/gnome-i18n.h>
#include <string.h>
#include "debug.h"
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#else
#include <libgnome/gnome-i18n.h>
#endif /* HAVE_GTK_ONLY */
struct BaconVideoWidgetPropertiesPrivate
{
GladeXML *xml;
......
......@@ -36,7 +36,7 @@ egg_recent_item_new (void)
item = g_new (EggRecentItem, 1);
item->groups = NULL;
item->private = FALSE;
item->private_data = FALSE;
item->uri = NULL;
item->mime_type = NULL;
......@@ -133,7 +133,7 @@ egg_recent_item_copy (const EggRecentItem *item)
if (item->mime_type)
newitem->mime_type = g_strdup (item->mime_type);
newitem->timestamp = item->timestamp;
newitem->private = item->private;
newitem->private_data = item->private_data;
newitem->groups = egg_recent_item_copy_groups (item->groups);
return newitem;
......@@ -323,13 +323,13 @@ egg_recent_item_remove_group (EggRecentItem *item, const gchar *group_name)
void
egg_recent_item_set_private (EggRecentItem *item, gboolean priv)
{
item->private = priv;
item->private_data = priv;
}
gboolean
egg_recent_item_get_private (const EggRecentItem *item)
{
return item->private;
return item->private_data;
}
GType
......
......@@ -22,7 +22,7 @@ struct _EggRecentItem {
gchar *mime_type;
time_t timestamp;
gboolean private;
gboolean private_data;
GList *groups;
......
......@@ -53,6 +53,7 @@ egg_recent_util_escape_underlines (const gchar* text)
return g_string_free (str, FALSE);
}
#ifndef USE_STABLE_LIBGNOMEUI
static GdkPixbuf *
scale_icon (GdkPixbuf *pixbuf,
double *scale)
......@@ -105,7 +106,6 @@ load_icon_file (char *filename,
return pixbuf;
}
#ifndef USE_STABLE_LIBGNOMEUI
GdkPixbuf *
egg_recent_util_get_icon (GnomeIconTheme *theme, const gchar *uri,
const gchar *mime_type, int size)
......
......@@ -7,6 +7,8 @@
#include "egg-recent-model.h"
#include "egg-recent-item.h"
G_BEGIN_DECLS
#define EGG_TYPE_RECENT_VIEW (egg_recent_view_get_type ())
#define EGG_RECENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_RECENT_VIEW, EggRecentView))
#define EGG_RECENT_VIEW_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), EGG_TYPE_RECENT_VIEW, EggRecentViewClass))
......@@ -36,5 +38,6 @@ EggRecentModel *egg_recent_view_get_model (EggRecentView *view);
void egg_recent_view_set_model (EggRecentView *view,
EggRecentModel *model);
G_END_DECLS
#endif /* __EGG_RECENT_VIEW_H__ */
......@@ -40,7 +40,23 @@
#include <libgnomevfs/gnome-vfs-mime.h>
#include <libgnomevfs/gnome-vfs-mime-utils.h>
#include <string.h>
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#else
#include <libgnome/gnome-i18n.h>
#endif /* HAVE_GTK_ONLY */
#define READ_CHUNK_SIZE 8192
#define MIME_READ_CHUNK_SIZE 1024
......
......@@ -40,7 +40,23 @@
#include <libgnomevfs/gnome-vfs-mime.h>
#include <libgnomevfs/gnome-vfs-mime-utils.h>
#include <string.h>
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#else
#include <libgnome/gnome-i18n.h>
#endif /* HAVE_GTK_ONLY */
#define READ_CHUNK_SIZE 8192
#define MIME_READ_CHUNK_SIZE 1024
......
......@@ -27,15 +27,30 @@
#include <gdk/gdkkeysyms.h>
#include <glade/glade.h>
#include <gconf/gconf-client.h>
#include <libgnome/gnome-desktop-item.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libgnomevfs/gnome-vfs-mime-utils.h>
#include <string.h>
#include <libgnome/gnome-i18n.h>
#include "totem-pl-parser.h"
#include "debug.h"
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#else
#include <libgnome/gnome-i18n.h>
#endif /* HAVE_GTK_ONLY */
#define PL_LEN (gtk_tree_model_iter_n_children (playlist->_priv->model, NULL))
static void ensure_shuffled (TotemPlaylist *playlist, gboolean shuffle);
......@@ -72,6 +87,9 @@ struct TotemPlaylistPrivate
/* Repeat mode */
gboolean repeat;
/* Reorder Flag */
gboolean drag_started;
/* Shuffle mode */
gboolean shuffle;
int *shuffled;
......@@ -477,6 +495,62 @@ treeview_button_pressed (GtkTreeView *treeview, GdkEventButton *event,
return TRUE;
}
static gboolean
button_press_cb (GtkWidget *treeview, GdkEventButton *event, gpointer data)
{
gtk_drag_dest_unset (treeview);
g_signal_handlers_block_by_func (treeview,&drop_cb, data);
gtk_tree_view_set_reorderable (GTK_TREE_VIEW (treeview), TRUE);
return FALSE;
}
static gboolean
button_release_cb (GtkWidget *treeview, GdkEventButton *event, gpointer data)
{
TotemPlaylist *playlist = (TotemPlaylist *)data;
if (!playlist->_priv->drag_started)
{
gtk_tree_view_set_reorderable (GTK_TREE_VIEW (treeview), FALSE);
gtk_drag_dest_set (treeview, GTK_DEST_DEFAULT_ALL, target_table,
G_N_ELEMENTS (target_table), GDK_ACTION_COPY);
g_signal_handlers_unblock_by_func (treeview,&drop_cb, data );
}
return FALSE;
}
static void
drag_begin_cb (GtkWidget *treeview, GdkDragContext *context, gpointer data)
{
TotemPlaylist *playlist = (TotemPlaylist *)data;
playlist->_priv->drag_started= TRUE;
return;
}
static void
drag_end_cb (GtkWidget *treeview, GdkDragContext *context, gpointer data)
{
TotemPlaylist *playlist = (TotemPlaylist *)data;
playlist->_priv->drag_started = FALSE;
gtk_tree_view_set_reorderable (GTK_TREE_VIEW (treeview), FALSE);
gtk_drag_dest_set (treeview, GTK_DEST_DEFAULT_ALL, target_table,
G_N_ELEMENTS (target_table), GDK_ACTION_COPY);
g_signal_handlers_unblock_by_func(treeview, &drop_cb, data);
return;
}
static void
selection_changed (GtkTreeSelection *treeselection, TotemPlaylist *playlist)
{
......@@ -1025,6 +1099,14 @@ init_treeview (GtkWidget *treeview, TotemPlaylist *playlist)
/* Drag'n'Drop */
g_signal_connect (G_OBJECT (treeview), "drag_data_received",
G_CALLBACK (drop_cb), playlist);
g_signal_connect (G_OBJECT (treeview), "button_press_event",
G_CALLBACK (button_press_cb), playlist);
g_signal_connect (G_OBJECT (treeview), "button_release_event",
G_CALLBACK (button_release_cb), playlist);
g_signal_connect (G_OBJECT (treeview), "drag_begin",
G_CALLBACK (drag_begin_cb), playlist);
g_signal_connect (G_OBJECT (treeview), "drag_end",
G_CALLBACK (drag_end_cb), playlist);
gtk_drag_dest_set (treeview, GTK_DEST_DEFAULT_ALL,
target_table, 1, GDK_ACTION_COPY);
......
......@@ -18,7 +18,6 @@
*/
#include <config.h>
#include <libgnome/gnome-i18n.h>
#include <gtk/gtkmessagedialog.h>
#include <string.h>
#include <stdio.h>
......
......@@ -29,6 +29,23 @@
#include "bacon-message-connection.h"
#include "bacon-video-widget.h"
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#else
#include <libgnome/gnome-i18n.h>
#endif /* HAVE_GTK_ONLY */
typedef enum {
TOTEM_CONTROLS_VISIBLE,
TOTEM_CONTROLS_HIDDEN,
......
......@@ -27,10 +27,26 @@
#include <glade/glade.h>
#include <gconf/gconf-client.h>
#include <string.h>
#include <libgnome/gnome-i18n.h>
#include "debug.h"
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#else
#include <libgnome/gnome-i18n.h>
#endif /* HAVE_GTK_ONLY */
struct TotemScreenshotPrivate
{
GladeXML *xml;
......
......@@ -31,7 +31,23 @@
#include <gtk/gtklabel.h>
#include <gtk/gtkvseparator.h>
#include <gtk/gtkwindow.h>
#ifdef HAVE_GTK_ONLY
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif /* gettext_noop */
#else
#define _(String) (String)
#define N_(String) (String)
#endif /* ENABLE_NLS */
#else
#include <libgnome/gnome-i18n.h>
#endif /* HAVE_GTK_ONLY */
#include "totem-statusbar.h"
......
......@@ -20,6 +20,8 @@
*
*/
#include "config.h"
#include <gtk/gtk.h>
#include <glib.h>
#include <stdio.h>
......
#include "config.h"
#ifndef HAVE_GTK_ONLY
#include <gnome.h>
#else
#include <gtk/gtk.h>
#endif
#include <string.h>
#include <unistd.h>
#include "bacon-video-widget.h"
......
......@@ -17,8 +17,16 @@
*
*/
#include <config.h>
#include "config.h"
#ifndef HAVE_GTK_ONLY
#include <gnome.h>
#else
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <stdlib.h>
#endif /* !HAVE_GTK_ONLY */
#include <libgnomevfs/gnome-vfs.h>
#include <gconf/gconf-client.h>
#include <string.h>
......@@ -1621,11 +1629,11 @@ on_open_location1_activate (GtkButton *button, Totem *totem)
int response;
const char *filenames[2];
filename = gnome_program_locate_file (NULL,
GNOME_FILE_DOMAIN_APP_DATADIR,
"totem/uri.glade", TRUE, NULL);
if (filename == NULL)
filename = g_build_filename (DATADIR,
"totem", "uri.glade", NULL);
if (g_file_test (filename, G_FILE_TEST_EXISTS) == FALSE)
{
g_free (filename);
totem_action_error (_("Couldn't load the 'Open Location...' interface."), _("Make sure that Totem is properly installed."), totem);
return;
}
......@@ -1882,6 +1890,7 @@ on_show_controls2_activate (GtkMenuItem *menuitem, Totem *totem)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
}
#ifndef HAVE_GTK_ONLY
static void