[gthumb] media viewer: removed hack on the progress bar
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] media viewer: removed hack on the progress bar
- Date: Sat, 16 Nov 2013 08:26:05 +0000 (UTC)
commit 4563236eeecab402e739d6c0c4607914299a59c6
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Nov 16 09:12:40 2013 +0100
media viewer: removed hack on the progress bar
The default progress bar behaviour in gtk+ 3.10 is already what we
want, this wasn't the case for previous versions of gtk+.
extensions/gstreamer_tools/gth-media-viewer-page.c | 74 --------------------
1 files changed, 0 insertions(+), 74 deletions(-)
---
diff --git a/extensions/gstreamer_tools/gth-media-viewer-page.c
b/extensions/gstreamer_tools/gth-media-viewer-page.c
index a356cfd..ef7601b 100644
--- a/extensions/gstreamer_tools/gth-media-viewer-page.c
+++ b/extensions/gstreamer_tools/gth-media-viewer-page.c
@@ -71,7 +71,6 @@ struct _GthMediaViewerPagePrivate {
gboolean xwin_assigned;
GdkPixbuf *icon;
PangoLayout *caption_layout;
- gboolean block_next_jump;
GdkCursor *cursor;
GdkCursor *cursor_void;
gboolean cursor_visible;
@@ -367,67 +366,6 @@ position_value_changed_cb (GtkAdjustment *adjustment,
}
-static gboolean
-position_scale_change_value_cb (GtkRange *range,
- GtkScrollType scroll,
- gdouble value,
- gpointer user_data)
-{
- GthMediaViewerPage *self = user_data;
-
- if (self->priv->block_next_jump && (scroll == GTK_SCROLL_JUMP)) {
- self->priv->block_next_jump = FALSE;
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-static gboolean
-position_scale_button_press_event_cb (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
-{
-#if ! GTK_CHECK_VERSION(3,6,0)
- /* In a video player when clicking on the progress bar the user expect
- * to jump to the specified position directly instead of scrolling one
- * page up or down as happens by default in Gtk+. The button 2
- * behavior is what we want by default for button 1. This is the
- * default behaviour in Gtk+ 3.6.0 or greater. */
-
- if (event->button == 1)
- event->button = 2;
- else if (event->button == 2)
- event->button = 1;
-#endif
-
- return FALSE;
-}
-
-
-static gboolean
-position_scale_button_release_event_cb (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
-{
- GthMediaViewerPage *self = user_data;
-
-#if ! GTK_CHECK_VERSION(3,6,0)
- /* Swap button 1 and 2 behaviors, see position_scale_button_press_event_cb */
- if (event->button == 1)
- event->button = 2;
- else if (event->button == 2)
- event->button = 1;
-#endif
-
- if (self->priv->playing)
- self->priv->block_next_jump = TRUE;
-
- return FALSE;
-}
-
-
static void
update_playback_info (GthMediaViewerPage *self)
{
@@ -763,18 +701,6 @@ gth_media_viewer_page_real_activate (GthViewerPage *base,
"value-changed",
G_CALLBACK (position_value_changed_cb),
self);
- g_signal_connect (GET_WIDGET ("position_scale"),
- "change-value",
- G_CALLBACK (position_scale_change_value_cb),
- self);
- g_signal_connect (GET_WIDGET ("position_scale"),
- "button-press-event",
- G_CALLBACK (position_scale_button_press_event_cb),
- self);
- g_signal_connect (GET_WIDGET ("position_scale"),
- "button-release-event",
- G_CALLBACK (position_scale_button_release_event_cb),
- self);
g_signal_connect (GET_WIDGET ("play_button"),
"clicked",
G_CALLBACK (play_button_clicked_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]