Commit 372cf858 authored by Bastien Nocera's avatar Bastien Nocera Committed by Bastien Nocera

big huge patch by Julien Moutte <julien@moutte.net> to rename the widgets

2003-05-13  Bastien Nocera  <hadess@hadess.net>

	* README:
	* data/totem.glade:
	* src/bacon-video-widget-gst.c: (bacon_video_widget_class_init),
	(bacon_video_widget_set_fullscreen), (bacon_video_widget_new):
	* src/bacon-video-widget-xine.c: (bacon_video_widget_class_init),
	(dest_size_cb), (frame_output_cb), (bacon_video_widget_realize),
	(bacon_video_widget_unrealize), (bacon_video_widget_set_property),
	(bacon_video_widget_get_property),
	(bacon_video_widget_set_fullscreen),
	(bacon_video_widget_set_show_cursor),
	(bacon_video_widget_ratio_fits_screen):
	* src/bacon-video-widget.h:
	* src/totem-preferences.c: (on_checkbutton2_toggled),
	(deinterlace_changed_cb), (auto_resize_changed_cb),
	(show_vfx_changed_cb), (mediadev_changed_cb),
	(totem_setup_preferences), (totem_preferences_tvout_setup),
	(totem_preferences_visuals_setup):
	* src/totem-private.h:
	* src/totem.c: (play_pause_set_label), (volume_set_image),
	(totem_action_fullscreen_toggle), (totem_action_fullscreen),
	(update_mrl_label), (totem_action_set_mrl), (update_seekable),
	(on_show_playlist1_activate), (show_controls),
	(on_show_controls1_activate), (on_show_controls2_activate),
	(screenshot_make_filename), (on_radiobutton_shot_toggled),
	(hide_screenshot), (on_take_screenshot1_activate),
	(commit_hide_skip_to), (spin_button_value_changed_cb),
	(on_skip_to1_activate), (toggle_playlist_from_playlist),
	(playlist_repeat_toggle_cb), (totem_is_fullscreen),
	(on_video_motion_notify_event), (on_video_button_press_event),
	(totem_action_handle_key), (update_media_menu_items),
	(update_buttons), (update_dvd_menu_sub_lang),
	(totem_callback_connect), (video_widget_create),
	(totem_setup_recent), (main): big huge patch by Julien Moutte
	<julien@moutte.net> to rename the widgets to meaningful names,
	and move the fullscreen stuff to just use gtk_window_fullscreen(),
	xine fixes by myself, more work needed to avoid regressions
parent 3446225f
2003-05-13 Bastien Nocera <hadess@hadess.net>
* README:
* data/totem.glade:
* src/bacon-video-widget-gst.c: (bacon_video_widget_class_init),
(bacon_video_widget_set_fullscreen), (bacon_video_widget_new):
* src/bacon-video-widget-xine.c: (bacon_video_widget_class_init),
(dest_size_cb), (frame_output_cb), (bacon_video_widget_realize),
(bacon_video_widget_unrealize), (bacon_video_widget_set_property),
(bacon_video_widget_get_property),
(bacon_video_widget_set_fullscreen),
(bacon_video_widget_set_show_cursor),
(bacon_video_widget_ratio_fits_screen):
* src/bacon-video-widget.h:
* src/totem-preferences.c: (on_checkbutton2_toggled),
(deinterlace_changed_cb), (auto_resize_changed_cb),
(show_vfx_changed_cb), (mediadev_changed_cb),
(totem_setup_preferences), (totem_preferences_tvout_setup),
(totem_preferences_visuals_setup):
* src/totem-private.h:
* src/totem.c: (play_pause_set_label), (volume_set_image),
(totem_action_fullscreen_toggle), (totem_action_fullscreen),
(update_mrl_label), (totem_action_set_mrl), (update_seekable),
(on_show_playlist1_activate), (show_controls),
(on_show_controls1_activate), (on_show_controls2_activate),
(screenshot_make_filename), (on_radiobutton_shot_toggled),
(hide_screenshot), (on_take_screenshot1_activate),
(commit_hide_skip_to), (spin_button_value_changed_cb),
(on_skip_to1_activate), (toggle_playlist_from_playlist),
(playlist_repeat_toggle_cb), (totem_is_fullscreen),
(on_video_motion_notify_event), (on_video_button_press_event),
(totem_action_handle_key), (update_media_menu_items),
(update_buttons), (update_dvd_menu_sub_lang),
(totem_callback_connect), (video_widget_create),
(totem_setup_recent), (main): big huge patch by Julien Moutte
<julien@moutte.net> to rename the widgets to meaningful names,
and move the fullscreen stuff to just use gtk_window_fullscreen(),
xine fixes by myself, more work needed to avoid regressions
2003-05-12 Bastien Nocera <hadess@hadess.net>
* src/bacon-cd-selection.c: (bacon_cd_selection_get_type):
......
......@@ -9,6 +9,9 @@ a pretty complete keyboard navigation.
News
====
0.99.0:
* devfs support and misc. parsing fixes for the CD selection widget
0.98.0:
* Added the Vanity webcam utility
* Added a Nautilus properties page
......
This diff is collapsed.
......@@ -76,7 +76,6 @@ enum {
enum {
PROP_0,
PROP_LOGO_MODE,
PROP_FULLSCREEN,
PROP_SPEED,
PROP_POSITION,
PROP_CURRENT_TIME,
......@@ -121,12 +120,6 @@ struct BaconVideoWidgetPrivate {
gint video_width;
gint video_height;
/* fullscreen stuff */
GtkWidget *fs_window;
GtkWidget *fs_vbox;
gboolean fullscreen_mode;
ScreenSaver *scr;
/* Signal handlers we want to keep */
gulong vis_sig_handler;
......@@ -211,9 +204,6 @@ bacon_video_widget_class_init (BaconVideoWidgetClass *klass)
g_object_class_install_property (object_class, PROP_LOGO_MODE,
g_param_spec_boolean ("logo_mode", NULL, NULL,
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_FULLSCREEN,
g_param_spec_boolean ("fullscreen", NULL, NULL,
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_SPEED,
g_param_spec_int ("speed", NULL, NULL,
SPEED_PAUSE, SPEED_NORMAL,
......@@ -739,83 +729,6 @@ bacon_video_widget_set_proprietary_plugins_path (BaconVideoWidget *bvw,
{
}
void
bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw, gboolean fullscreen)
{
g_return_if_fail (bvw != NULL);
g_return_if_fail (BACON_IS_VIDEO_WIDGET(bvw));
g_return_if_fail (GST_IS_PLAY(bvw->priv->play));
if (fullscreen == bvw->priv->fullscreen_mode)
return;
bvw->priv->fullscreen_mode = fullscreen;
if (fullscreen) {
if ( (!bvw->priv->fs_window) && (!bvw->priv->fs_vbox) ) {
bvw->priv->fs_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
bvw->priv->fs_vbox = gtk_vbox_new ( TRUE, 0);
gtk_container_add ( GTK_CONTAINER(bvw->priv->fs_window),
bvw->priv->fs_vbox);
}
gtk_widget_ref (GTK_WIDGET(bvw->priv->vw));
gtk_container_remove (GTK_CONTAINER(bvw), GTK_WIDGET(bvw->priv->vw));
gtk_box_pack_end ( GTK_BOX(bvw->priv->fs_vbox),
GTK_WIDGET(bvw->priv->vw), TRUE, TRUE, 0);
gtk_widget_unref (GTK_WIDGET(bvw->priv->vw));
gtk_widget_show_all (bvw->priv->fs_window);
gdk_flush ();
gst_play_need_new_video_window (bvw->priv->play);
// gdk_window_set_user_data (GDK_WINDOW(bvw->priv->fs_window->window), bvw);
gtk_window_fullscreen (GTK_WINDOW(bvw->priv->fs_window));
/* switch off mouse cursor */
bacon_video_widget_set_show_cursor (bvw, FALSE);
scrsaver_disable (bvw->priv->scr);
gtk_window_set_title (GTK_WINDOW(bvw->priv->fs_window), DEFAULT_TITLE);
}
else {
if (bvw->priv->fs_window)
gtk_widget_hide_all (bvw->priv->fs_window);
gtk_widget_ref (GTK_WIDGET(bvw->priv->vw));
gtk_container_remove ( GTK_CONTAINER(bvw->priv->fs_vbox),
GTK_WIDGET(bvw->priv->vw));
gtk_box_pack_end ( GTK_BOX(bvw),
GTK_WIDGET(bvw->priv->vw), TRUE, TRUE, 0);
gtk_widget_unref (GTK_WIDGET(bvw->priv->vw));
gst_play_need_new_video_window (bvw->priv->play);
scrsaver_enable (bvw->priv->scr);
}
}
gboolean
bacon_video_widget_is_fullscreen (BaconVideoWidget *bvw)
{
g_return_val_if_fail (bvw != NULL, FALSE);
g_return_val_if_fail (BACON_IS_VIDEO_WIDGET(bvw), FALSE);
g_return_val_if_fail (GST_IS_PLAY(bvw->priv->play), FALSE);
return bvw->priv->fullscreen_mode;
}
gboolean
bacon_video_widget_can_set_volume (BaconVideoWidget *bvw)
{
......@@ -843,6 +756,11 @@ bacon_video_widget_get_volume (BaconVideoWidget *bvw)
return gst_play_get_volume (bvw->priv->play) * 100;
}
void
bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw, gboolean fullscreen)
{
}
void
bacon_video_widget_set_show_cursor (BaconVideoWidget *bvw, gboolean use_cursor)
{
......@@ -1399,10 +1317,6 @@ bacon_video_widget_new (int width, int height,
gtk_box_pack_end (GTK_BOX(bvw), GTK_WIDGET(bvw->priv->vw), TRUE, TRUE, 0);
gtk_widget_show (GTK_WIDGET(bvw->priv->vw));
bvw->priv->scr = scrsaver_new (GDK_DISPLAY ());
bvw->priv->fullscreen_mode = FALSE;
return GTK_WIDGET (bvw);
}
......@@ -86,7 +86,6 @@ typedef struct {
enum {
PROP_0,
PROP_LOGO_MODE,
PROP_FULLSCREEN,
PROP_SPEED,
PROP_POSITION,
PROP_CURRENT_TIME,
......@@ -144,11 +143,7 @@ struct BaconVideoWidgetPrivate {
/* fullscreen stuff */
gboolean fullscreen_mode;
GdkWindow *fullscreen_window;
GdkRectangle fullscreen_rect;
gboolean cursor_shown;
gboolean pml;
ScreenSaver *scr;
};
static const char *mms_bandwidth_strs[]={"14.4 Kbps (Modem)",
......@@ -194,7 +189,6 @@ static GtkWidgetClass *parent_class = NULL;
static void xine_event (void *user_data, const xine_event_t *event);
static gboolean bacon_video_widget_idle_signal (BaconVideoWidget *bvw);
static void size_changed_cb (GdkScreen *screen, BaconVideoWidget *bvw);
static int bvw_table_signals[LAST_SIGNAL] = { 0 };
......@@ -254,9 +248,6 @@ bacon_video_widget_class_init (BaconVideoWidgetClass *klass)
g_object_class_install_property (object_class, PROP_LOGO_MODE,
g_param_spec_boolean ("logo_mode", NULL, NULL,
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_FULLSCREEN,
g_param_spec_boolean ("fullscreen", NULL, NULL,
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_SPEED,
g_param_spec_int ("speed", NULL, NULL,
SPEED_PAUSE, SPEED_NORMAL,
......@@ -442,15 +433,8 @@ dest_size_cb (void *bvw_gen,
video_height = video_height * bvw->priv->display_ratio
/ video_pixel_aspect + .5;
if (bvw->priv->fullscreen_mode)
{
*dest_width = bvw->priv->fullscreen_rect.width;
*dest_height = bvw->priv->fullscreen_rect.height;
} else {
*dest_width = GTK_WIDGET(bvw)->allocation.width;
*dest_height = GTK_WIDGET(bvw)->allocation.height;
}
*dest_width = GTK_WIDGET(bvw)->allocation.width;
*dest_height = GTK_WIDGET(bvw)->allocation.height;
*dest_pixel_aspect = bvw->priv->display_ratio;
}
......@@ -481,33 +465,26 @@ frame_output_cb (void *bvw_gen,
*win_x = bvw->priv->xpos;
*win_y = bvw->priv->ypos;
if (bvw->priv->fullscreen_mode)
*dest_width = GTK_WIDGET(bvw)->allocation.width;
*dest_height = GTK_WIDGET(bvw)->allocation.height;
/* Size changed */
if (bvw->priv->video_width != video_width
|| bvw->priv->video_height != video_height)
{
*dest_width = bvw->priv->fullscreen_rect.width;
*dest_height = bvw->priv->fullscreen_rect.height;
} else {
*dest_width = GTK_WIDGET(bvw)->allocation.width;
*dest_height = GTK_WIDGET(bvw)->allocation.height;
bvw->priv->video_width = video_width;
bvw->priv->video_height = video_height;
/* Size changed */
if (bvw->priv->video_width != video_width
|| bvw->priv->video_height != video_height)
if (bvw->priv->auto_resize == TRUE
&& bvw->priv->logo_mode == FALSE)
{
bvw->priv->video_width = video_width;
bvw->priv->video_height = video_height;
if (bvw->priv->auto_resize == TRUE
&& bvw->priv->logo_mode == FALSE)
{
signal_data *data;
data = g_new0 (signal_data, 1);
data->signal = RATIO;
g_async_queue_push (bvw->priv->queue, data);
g_idle_add ((GSourceFunc)
bacon_video_widget_idle_signal,
bvw);
}
signal_data *data;
data = g_new0 (signal_data, 1);
data->signal = RATIO;
g_async_queue_push (bvw->priv->queue, data);
g_idle_add ((GSourceFunc)
bacon_video_widget_idle_signal, bvw);
}
}
......@@ -626,28 +603,6 @@ load_audio_out_driver (BaconVideoWidget *bvw, GError **err)
return ao_driver;
}
static void
update_fullscreen_size (BaconVideoWidget *bvw)
{
gdk_screen_get_monitor_geometry (gdk_screen_get_default (),
gdk_screen_get_monitor_at_window
(gdk_screen_get_default (),
bvw->priv->video_window),
&bvw->priv->fullscreen_rect);
}
static void
size_changed_cb (GdkScreen *screen, BaconVideoWidget *bvw)
{
update_fullscreen_size (bvw);
if (bvw->priv->fullscreen_mode)
{
gdk_window_resize (bvw->priv->fullscreen_window,
bvw->priv->fullscreen_rect.width,
bvw->priv->fullscreen_rect.height);
}
}
static void
setup_config (BaconVideoWidget *bvw)
{
......@@ -913,8 +868,6 @@ bacon_video_widget_realize (GtkWidget *widget)
"configure-event",
G_CALLBACK (configure_cb), bvw);
bvw->priv->scr = scrsaver_new (GDK_DISPLAY ());
/* Now onto the video out driver */
bvw->priv->display = XOpenDisplay (gdk_display_get_name
(gdk_display_get_default ()));
......@@ -938,11 +891,6 @@ bacon_video_widget_realize (GtkWidget *widget)
xine_event_create_listener_thread (bvw->priv->ev_queue,
xine_event, (void *) bvw);
/* Setup the default screen stuff */
update_fullscreen_size (bvw);
g_signal_connect (G_OBJECT (gdk_screen_get_default ()),
"size-changed", G_CALLBACK (size_changed_cb), bvw);
return;
}
......@@ -1086,9 +1034,6 @@ bacon_video_widget_unrealize (GtkWidget *widget)
bvw = BACON_VIDEO_WIDGET (widget);
/* Kill the Screesaver */
scrsaver_free (bvw->priv->scr);
/* Kill the TV out */
xine_tvmode_exit (bvw->priv->xine);
......@@ -1128,10 +1073,6 @@ bacon_video_widget_unrealize (GtkWidget *widget)
xine_exit (bvw->priv->xine);
bvw->priv->xine = NULL;
/* Finally, kill the left-over windows */
if (bvw->priv->fullscreen_window != NULL)
gdk_window_destroy (bvw->priv->fullscreen_window);
/* This destroys widget->window and unsets the realized flag */
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(*GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
......@@ -1517,10 +1458,6 @@ bacon_video_widget_set_property (GObject *object, guint property_id,
bacon_video_widget_set_logo_mode (bvw,
g_value_get_boolean (value));
break;
case PROP_FULLSCREEN:
bacon_video_widget_set_fullscreen (bvw,
g_value_get_boolean (value));
break;
case PROP_SPEED:
bacon_video_widget_set_speed (bvw, g_value_get_int (value));
break;
......@@ -1557,10 +1494,6 @@ bacon_video_widget_get_property (GObject *object, guint property_id,
g_value_set_boolean (value,
bacon_video_widget_get_logo_mode (bvw));
break;
case PROP_FULLSCREEN:
g_value_set_boolean (value,
bacon_video_widget_is_fullscreen (bvw));
break;
case PROP_SPEED:
g_value_set_int (value, bacon_video_widget_get_speed (bvw));
break;
......@@ -1674,93 +1607,6 @@ bacon_video_widget_get_position (BaconVideoWidget *bvw)
return pos_stream;
}
void
bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw, gboolean fullscreen)
{
g_return_if_fail (bvw != NULL);
g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
g_return_if_fail (bvw->priv->xine != NULL);
if (bvw->priv->pml == FALSE)
bvw->priv->pml = TRUE;
else
return;
if (fullscreen == bvw->priv->fullscreen_mode)
return;
bvw->priv->fullscreen_mode = fullscreen;
if (fullscreen)
{
GdkWindow *parent;
GdkWindowAttr attr;
parent = gdk_window_get_toplevel (GTK_WIDGET(bvw)->window);
update_fullscreen_size (bvw);
attr.x = bvw->priv->fullscreen_rect.x;
attr.y = bvw->priv->fullscreen_rect.y;
attr.width = bvw->priv->fullscreen_rect.width;
attr.height = bvw->priv->fullscreen_rect.height;
attr.window_type = GDK_WINDOW_TOPLEVEL;
attr.wclass = GDK_INPUT_OUTPUT;
attr.override_redirect = FALSE;
attr.event_mask = gtk_widget_get_events (GTK_WIDGET (bvw))
| GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK
| GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK;
bvw->priv->fullscreen_window = gdk_window_new
(NULL, &attr, GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR);
gdk_window_show (bvw->priv->fullscreen_window);
gdk_window_fullscreen (bvw->priv->fullscreen_window);
/* Flush, so that the window is really shown */
gdk_flush ();
gdk_window_set_user_data (bvw->priv->fullscreen_window, bvw);
xine_gui_send_vo_data (bvw->priv->stream,
XINE_GUI_SEND_DRAWABLE_CHANGED,
(void*) GDK_WINDOW_XID (bvw->priv->fullscreen_window));
/* switch off mouse cursor */
bacon_video_widget_set_show_cursor (bvw, FALSE);
scrsaver_disable (bvw->priv->scr);
/* Set the icon and the name */
if (bvw->priv->icon != NULL)
{
GList *list = NULL;
list = g_list_append (list, bvw->priv->icon);
gdk_window_set_icon_list (bvw->priv->fullscreen_window,
list);
g_list_free (list);
}
gdk_window_set_title (bvw->priv->fullscreen_window,
DEFAULT_TITLE);
} else {
gdk_window_set_user_data (GTK_WIDGET(bvw)->window, bvw);
xine_gui_send_vo_data (bvw->priv->stream,
XINE_GUI_SEND_DRAWABLE_CHANGED,
(void *) GDK_WINDOW_XID (bvw->priv->video_window));
/* Hide the window */
gdk_window_destroy (bvw->priv->fullscreen_window);
bvw->priv->fullscreen_window = NULL;
scrsaver_enable (bvw->priv->scr);
gdk_window_focus (gdk_window_get_toplevel
(gtk_widget_get_parent_window
(GTK_WIDGET (bvw))), GDK_CURRENT_TIME);
}
bvw->priv->pml = FALSE;
}
gboolean
bacon_video_widget_is_fullscreen (BaconVideoWidget *bvw)
{
......@@ -1828,6 +1674,11 @@ bacon_video_widget_get_volume (BaconVideoWidget *bvw)
return bvw->priv->volume;
}
void
bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw, gboolean fullscreen)
{
}
void
bacon_video_widget_set_show_cursor (BaconVideoWidget *bvw, gboolean show_cursor)
{
......@@ -1835,15 +1686,11 @@ bacon_video_widget_set_show_cursor (BaconVideoWidget *bvw, gboolean show_cursor)
g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
g_return_if_fail (bvw->priv->xine != NULL);
if (GDK_IS_WINDOW (bvw->priv->fullscreen_window) == FALSE)
return;
if (show_cursor == FALSE)
{
eel_gdk_window_set_invisible_cursor
(bvw->priv->fullscreen_window);
eel_gdk_window_set_invisible_cursor (bvw->priv->video_window);
} else {
gdk_window_set_cursor (bvw->priv->fullscreen_window, NULL);
gdk_window_set_cursor (bvw->priv->video_window, NULL);
}
bvw->priv->cursor_shown = show_cursor;
......@@ -2284,6 +2131,7 @@ bacon_video_widget_toggle_aspect_ratio (BaconVideoWidget *bvw)
static gboolean
bacon_video_widget_ratio_fits_screen (BaconVideoWidget *bvw, gfloat ratio)
{
GdkRectangle fullscreen_rect;
int new_w, new_h;
g_return_val_if_fail (bvw != NULL, FALSE);
......@@ -2293,10 +2141,14 @@ bacon_video_widget_ratio_fits_screen (BaconVideoWidget *bvw, gfloat ratio)
new_w = bvw->priv->video_width * ratio;
new_h = bvw->priv->video_height * ratio;
update_fullscreen_size (bvw);
gdk_screen_get_monitor_geometry (gdk_screen_get_default (),
gdk_screen_get_monitor_at_window
(gdk_screen_get_default (),
bvw->priv->video_window),
&fullscreen_rect);
if (new_w > (bvw->priv->fullscreen_rect.width - 128) ||
new_h > (bvw->priv->fullscreen_rect.height - 128))
if (new_w > (fullscreen_rect.width - 128) ||
new_h > (fullscreen_rect.height - 128))
{
return FALSE;
}
......
......@@ -124,15 +124,13 @@ void bacon_video_widget_set_proprietary_plugins_path
(BaconVideoWidget *bvw,
const char *path);
void bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw,
gboolean fullscreen);
gboolean bacon_video_widget_is_fullscreen (BaconVideoWidget *bvw);
gboolean bacon_video_widget_can_set_volume (BaconVideoWidget *bvw);
void bacon_video_widget_set_volume (BaconVideoWidget *bvw,
int volume);
int bacon_video_widget_get_volume (BaconVideoWidget *bvw);
void bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw,
gboolean fullscreen);
void bacon_video_widget_set_show_cursor (BaconVideoWidget *bvw,
gboolean use_cursor);
gboolean bacon_video_widget_get_show_cursor (BaconVideoWidget *bvw);
......
......@@ -76,7 +76,6 @@ enum {
enum {
PROP_0,
PROP_LOGO_MODE,
PROP_FULLSCREEN,
PROP_SPEED,
PROP_POSITION,
PROP_CURRENT_TIME,
......@@ -121,12 +120,6 @@ struct BaconVideoWidgetPrivate {
gint video_width;
gint video_height;
/* fullscreen stuff */
GtkWidget *fs_window;
GtkWidget *fs_vbox;
gboolean fullscreen_mode;
ScreenSaver *scr;
/* Signal handlers we want to keep */
gulong vis_sig_handler;
......@@ -211,9 +204,6 @@ bacon_video_widget_class_init (BaconVideoWidgetClass *klass)
g_object_class_install_property (object_class, PROP_LOGO_MODE,
g_param_spec_boolean ("logo_mode", NULL, NULL,
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_FULLSCREEN,
g_param_spec_boolean ("fullscreen", NULL, NULL,
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_SPEED,
g_param_spec_int ("speed", NULL, NULL,
SPEED_PAUSE, SPEED_NORMAL,
......@@ -739,83 +729,6 @@ bacon_video_widget_set_proprietary_plugins_path (BaconVideoWidget *bvw,
{
}
void
bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw, gboolean fullscreen)
{
g_return_if_fail (bvw != NULL);
g_return_if_fail (BACON_IS_VIDEO_WIDGET(bvw));
g_return_if_fail (GST_IS_PLAY(bvw->priv->play));
if (fullscreen == bvw->priv->fullscreen_mode)
return;
bvw->priv->fullscreen_mode = fullscreen;
if (fullscreen) {
if ( (!bvw->priv->fs_window) && (!bvw->priv->fs_vbox) ) {
bvw->priv->fs_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
bvw->priv->fs_vbox = gtk_vbox_new ( TRUE, 0);
gtk_container_add ( GTK_CONTAINER(bvw->priv->fs_window),
bvw->priv->fs_vbox);
}
gtk_widget_ref (GTK_WIDGET(bvw->priv->vw));
gtk_container_remove (GTK_CONTAINER(bvw), GTK_WIDGET(bvw->priv->vw));
gtk_box_pack_end ( GTK_BOX(bvw->priv->fs_vbox),
GTK_WIDGET(bvw->priv->vw), TRUE, TRUE, 0);
gtk_widget_unref (GTK_WIDGET(bvw->priv->vw));
gtk_widget_show_all (bvw->priv->fs_window);
gdk_flush ();
gst_play_need_new_video_window (bvw->priv->play);
// gdk_window_set_user_data (GDK_WINDOW(bvw->priv->fs_window->window), bvw);
gtk_window_fullscreen (GTK_WINDOW(bvw->priv->fs_window));
/* switch off mouse cursor */
bacon_video_widget_set_show_cursor (bvw, FALSE);
scrsaver_disable (bvw->priv->scr);
gtk_window_set_title (GTK_WINDOW(bvw->priv->fs_window), DEFAULT_TITLE);
}
else {
if (bvw->priv->fs_window)
gtk_widget_hide_all (bvw->priv->fs_window);
gtk_widget_ref (GTK_WIDGET(bvw->priv->vw));
gtk_container_remove ( GTK_CONTAINER(bvw->priv->fs_vbox),
GTK_WIDGET(bvw->priv->vw));
gtk_box_pack_end ( GTK_BOX(bvw),
GTK_WIDGET(bvw->priv->vw), TRUE, TRUE, 0);
gtk_widget_unref (GTK_WIDGET(bvw->priv->vw));
gst_play_need_new_video_window (bvw->priv->play);
scrsaver_enable (bvw->priv->scr);
}
}
gboolean
bacon_video_widget_is_fullscreen (BaconVideoWidget *bvw)
{
g_return_val_if_fail (bvw != NULL, FALSE);
g_return_val_if_fail (BACON_IS_VIDEO_WIDGET(bvw), FALSE);
g_return_val_if_fail (GST_IS_PLAY(bvw->priv->play), FALSE);
return bvw->priv->fullscreen_mode;
}
gboolean
bacon_video_widget_can_set_volume (BaconVideoWidget *bvw)
{
......@@ -843,6 +756,11 @@ bacon_video_widget_get_volume (BaconVideoWidget *bvw)
return gst_play_get_volume (bvw->priv->play) * 100;
}
void
bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw, gboolean fullscreen)
{
}
void
bacon_video_widget_set_show_cursor (BaconVideoWidget *bvw, gboolean use_cursor)
{
......@@ -1399,10 +1317,6 @@ bacon_video_widget_new (int width, int height,
gtk_box_pack_end (GTK_BOX(bvw), GTK_WIDGET(bvw->priv->vw), TRUE, TRUE, 0);
gtk_widget_show (GTK_WIDGET(bvw->priv->vw));
bvw->priv->scr = scrsaver_new (GDK_DISPLAY ());
bvw->priv->fullscreen_mode = FALSE;
return GTK_WIDGET (bvw);
}
......@@ -86,7 +86,6 @@ typedef struct {
enum {
PROP_0,
PROP_LOGO_MODE,
PROP_FULLSCREEN,
PROP_SPEED,
PROP_POSITION,
PROP_CURRENT_TIME,
......@@ -144,11 +143,7 @@ struct BaconVideoWidgetPrivate {
/* fullscreen stuff */
gboolean fullscreen_mode;
GdkWindow *fullscreen_window;
GdkRectangle fullscreen_rect;
gboolean cursor_shown;
gboolean pml;
ScreenSaver *scr;
};
static const char *mms_bandwidth_strs[]={"14.4 Kbps (Modem)",
......@@ -194,7 +189,6 @@ static GtkWidgetClass *parent_class = NULL;
static void xine_event (void *user_data, const xine_event_t *event);
static gboolean bacon_video_widget_idle_signal (BaconVideoWidget *bvw);
static void size_changed_cb (GdkScreen *screen, BaconVideoWidget *bvw);
static int bvw_table_signals[LAST_SIGNAL] = { 0 };
......@@ -254,9 +248,6 @@ bacon_video_widget_class_init (BaconVideoWidgetClass *klass)
g_object_class_install_property (object_class, PROP_LOGO_MODE,
g_param_spec_boolean ("logo_mode", NULL, NULL,
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_FULLSCREEN,
g_param_spec_boolean ("fullscreen", NULL, NULL,
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_SPEED,
g_param_spec_int ("speed", NULL, NULL,
SPEED_PAUSE, SPEED_NORMAL,
......@@ -442,15 +433,8 @@ dest_size_cb (void *bvw_gen,
video_height = video_height * bvw->priv->display_ratio
/ video_pixel_aspect + .5;
if (bvw->priv->fullscreen_mode)