mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-12 09:15:29 +00:00
playback/player: Fix indention
This commit is contained in:
parent
b69cbd6b70
commit
999365f0d2
1 changed files with 38 additions and 45 deletions
|
@ -573,8 +573,9 @@ toolbar_hide_func (GtkPlay * play)
|
||||||
gtk_widget_hide (play->toolbar);
|
gtk_widget_hide (play->toolbar);
|
||||||
|
|
||||||
/* hide the mouse pointer */
|
/* hide the mouse pointer */
|
||||||
cursor = gdk_cursor_new_for_display (
|
cursor =
|
||||||
gtk_widget_get_display (play->window), GDK_BLANK_CURSOR);
|
gdk_cursor_new_for_display (gtk_widget_get_display (play->window),
|
||||||
|
GDK_BLANK_CURSOR);
|
||||||
gdk_window_set_cursor (gtk_widget_get_window (play->window), cursor);
|
gdk_window_set_cursor (gtk_widget_get_window (play->window), cursor);
|
||||||
g_object_unref (cursor);
|
g_object_unref (cursor);
|
||||||
|
|
||||||
|
@ -588,8 +589,7 @@ fullscreen_toggle_cb (GtkToggleButton * widget, GtkPlay * play)
|
||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
|
|
||||||
if (gtk_toggle_button_get_active (widget)) {
|
if (gtk_toggle_button_get_active (widget)) {
|
||||||
image = gtk_image_new_from_icon_name ("view-restore",
|
image = gtk_image_new_from_icon_name ("view-restore", GTK_ICON_SIZE_BUTTON);
|
||||||
GTK_ICON_SIZE_BUTTON);
|
|
||||||
gtk_window_fullscreen (GTK_WINDOW (play->window));
|
gtk_window_fullscreen (GTK_WINDOW (play->window));
|
||||||
gtk_button_set_image (GTK_BUTTON (play->fullscreen_button), image);
|
gtk_button_set_image (GTK_BUTTON (play->fullscreen_button), image);
|
||||||
|
|
||||||
|
@ -598,8 +598,7 @@ fullscreen_toggle_cb (GtkToggleButton * widget, GtkPlay * play)
|
||||||
g_source_remove (play->toolbar_hide_timeout);
|
g_source_remove (play->toolbar_hide_timeout);
|
||||||
play->toolbar_hide_timeout = g_timeout_add_seconds (5,
|
play->toolbar_hide_timeout = g_timeout_add_seconds (5,
|
||||||
(GSourceFunc) toolbar_hide_func, play);
|
(GSourceFunc) toolbar_hide_func, play);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
/* if toolbar hide timer is running then kill it */
|
/* if toolbar hide timer is running then kill it */
|
||||||
if (play->toolbar_hide_timeout) {
|
if (play->toolbar_hide_timeout) {
|
||||||
g_source_remove (play->toolbar_hide_timeout);
|
g_source_remove (play->toolbar_hide_timeout);
|
||||||
|
@ -707,8 +706,7 @@ disable_track (GtkPlay * play, GType type)
|
||||||
if (type == GST_TYPE_PLAYER_VIDEO_INFO) {
|
if (type == GST_TYPE_PLAYER_VIDEO_INFO) {
|
||||||
gst_player_set_video_track_enabled (play->player, FALSE);
|
gst_player_set_video_track_enabled (play->player, FALSE);
|
||||||
display_cover_art (play, NULL); /* display cover art */
|
display_cover_art (play, NULL); /* display cover art */
|
||||||
}
|
} else if (type == GST_TYPE_PLAYER_AUDIO_INFO)
|
||||||
else if (type == GST_TYPE_PLAYER_AUDIO_INFO)
|
|
||||||
gst_player_set_audio_track_enabled (play->player, FALSE);
|
gst_player_set_audio_track_enabled (play->player, FALSE);
|
||||||
else
|
else
|
||||||
gst_player_set_subtitle_track_enabled (play->player, FALSE);
|
gst_player_set_subtitle_track_enabled (play->player, FALSE);
|
||||||
|
@ -771,8 +769,7 @@ visualization_changed_cb (GtkWidget * widget, GtkPlay * play)
|
||||||
gst_player_set_visualization_enabled (play->player, FALSE);
|
gst_player_set_visualization_enabled (play->player, FALSE);
|
||||||
gtk_widget_hide (play->video_area);
|
gtk_widget_hide (play->video_area);
|
||||||
gtk_widget_show (play->image_area);
|
gtk_widget_show (play->image_area);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
const gchar *vis_name;
|
const gchar *vis_name;
|
||||||
|
|
||||||
gst_player_set_visualization (play->player, name);
|
gst_player_set_visualization (play->player, name);
|
||||||
|
@ -1123,8 +1120,7 @@ create_ui (GtkPlay * play)
|
||||||
| GDK_LEAVE_NOTIFY_MASK
|
| GDK_LEAVE_NOTIFY_MASK
|
||||||
| GDK_BUTTON_PRESS_MASK
|
| GDK_BUTTON_PRESS_MASK
|
||||||
| GDK_POINTER_MOTION_MASK
|
| GDK_POINTER_MOTION_MASK
|
||||||
| GDK_POINTER_MOTION_HINT_MASK
|
| GDK_POINTER_MOTION_HINT_MASK | GDK_ENTER_NOTIFY_MASK);
|
||||||
| GDK_ENTER_NOTIFY_MASK);
|
|
||||||
|
|
||||||
play->image_area = gtk_drawing_area_new ();
|
play->image_area = gtk_drawing_area_new ();
|
||||||
g_signal_connect (play->image_area, "button-press-event",
|
g_signal_connect (play->image_area, "button-press-event",
|
||||||
|
@ -1139,8 +1135,7 @@ create_ui (GtkPlay * play)
|
||||||
| GDK_LEAVE_NOTIFY_MASK
|
| GDK_LEAVE_NOTIFY_MASK
|
||||||
| GDK_BUTTON_PRESS_MASK
|
| GDK_BUTTON_PRESS_MASK
|
||||||
| GDK_POINTER_MOTION_MASK
|
| GDK_POINTER_MOTION_MASK
|
||||||
| GDK_POINTER_MOTION_HINT_MASK
|
| GDK_POINTER_MOTION_HINT_MASK | GDK_ENTER_NOTIFY_MASK);
|
||||||
| GDK_ENTER_NOTIFY_MASK);
|
|
||||||
|
|
||||||
/* Unified play/pause button */
|
/* Unified play/pause button */
|
||||||
play->play_pause_button =
|
play->play_pause_button =
|
||||||
|
@ -1212,8 +1207,7 @@ create_ui (GtkPlay * play)
|
||||||
gtk_box_pack_start (GTK_BOX (controls), play->play_pause_button, FALSE,
|
gtk_box_pack_start (GTK_BOX (controls), play->play_pause_button, FALSE,
|
||||||
FALSE, 2);
|
FALSE, 2);
|
||||||
gtk_box_pack_start (GTK_BOX (controls), play->next_button, FALSE, FALSE, 2);
|
gtk_box_pack_start (GTK_BOX (controls), play->next_button, FALSE, FALSE, 2);
|
||||||
gtk_box_pack_start (GTK_BOX (controls), play->repeat_button,
|
gtk_box_pack_start (GTK_BOX (controls), play->repeat_button, FALSE, FALSE, 2);
|
||||||
FALSE, FALSE, 2);
|
|
||||||
gtk_box_pack_start (GTK_BOX (controls), play->seekbar, TRUE, TRUE, 2);
|
gtk_box_pack_start (GTK_BOX (controls), play->seekbar, TRUE, TRUE, 2);
|
||||||
gtk_box_pack_start (GTK_BOX (controls), play->volume_button, FALSE, FALSE, 2);
|
gtk_box_pack_start (GTK_BOX (controls), play->volume_button, FALSE, FALSE, 2);
|
||||||
gtk_box_pack_start (GTK_BOX (controls), play->media_info_button,
|
gtk_box_pack_start (GTK_BOX (controls), play->media_info_button,
|
||||||
|
@ -1344,8 +1338,7 @@ gst_sample_to_pixbuf (GtkPlay * play, GstSample * sample)
|
||||||
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
|
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
|
||||||
if (pixbuf) {
|
if (pixbuf) {
|
||||||
g_object_ref (pixbuf);
|
g_object_ref (pixbuf);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
g_print ("failed to convert gst buffer to pixbuf %s \n", err->message);
|
g_print ("failed to convert gst buffer to pixbuf %s \n", err->message);
|
||||||
g_error_free (err);
|
g_error_free (err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue