summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-11-28 17:55:02 +0100
committerBastien Nocera <hadess@hadess.net>2022-11-29 09:19:23 +0000
commite8efc3285d0665b18ac00850fb34bf5b5f19d107 (patch)
tree60fdad9e5a31c05f59b539e684940ed22fab41f0
parent3ca40a33d595c19e52826d7e1fe13471e42bddac (diff)
downloadtotem-e8efc3285d0665b18ac00850fb34bf5b5f19d107.tar.gz
skipto: Remove skipto plugin
The skip to dialogue is not easy to use, and the menu item doesn't really fit in with the rest of the functionality. Instead, we'll rely on digit 1 to 9 skipping 10% to 90% into the video. Closes: #554
-rw-r--r--data/shortcuts.ui7
-rw-r--r--data/totem.ui3
-rw-r--r--docs/reference/meson.build2
-rw-r--r--po/POTFILES.in5
-rw-r--r--src/plugins/meson.build2
-rw-r--r--src/plugins/skipto/meson.build38
-rw-r--r--src/plugins/skipto/skipto.gresource.xml6
-rw-r--r--src/plugins/skipto/skipto.plugin.desktop.in9
-rw-r--r--src/plugins/skipto/skipto.ui106
-rw-r--r--src/plugins/skipto/totem-skipto-plugin.c232
-rw-r--r--src/plugins/skipto/totem-skipto.c231
-rw-r--r--src/plugins/skipto/totem-skipto.h44
-rw-r--r--src/plugins/skipto/totem-time-entry.c173
-rw-r--r--src/plugins/skipto/totem-time-entry.h40
14 files changed, 0 insertions, 898 deletions
diff --git a/data/shortcuts.ui b/data/shortcuts.ui
index 809ef1f49..2ce36729c 100644
--- a/data/shortcuts.ui
+++ b/data/shortcuts.ui
@@ -293,13 +293,6 @@
<property name="title" translatable="yes" context="shortcut window">Go forward 10 minutes</property>
</object>
</child>
- <child>
- <object class="GtkShortcutsShortcut" id="skipto">
- <property name="visible">1</property>
- <property name="accelerator">&lt;ctrl&gt;K</property>
- <property name="title" translatable="yes" context="shortcut window">Skip to…</property>
- </object>
- </child>
</object>
</child>
<child>
diff --git a/data/totem.ui b/data/totem.ui
index a67f2a46d..79d568d8e 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -169,9 +169,6 @@
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
- <section>
- <section id="skipto-placeholder"/>
- </section>
<section id="variable-rate-placeholder">
<attribute name="label" translatable="yes">Speed</attribute>
</section>
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index f04e2e475..904e3675e 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -25,9 +25,7 @@ private_headers = [
'totem-search-entry.h',
'totem-selection-toolbar.h',
'totem-session.h',
- 'totem-skipto.h',
'totem-subtitle-encoding.h',
- 'totem-time-entry.h',
'totem-time-helpers.h',
'totem-uri.h',
]
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3ff402228..915273d7b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -61,11 +61,6 @@ src/plugins/screenshot/screenshot.plugin.desktop.in
src/plugins/screenshot/totem-gallery.c
src/plugins/screenshot/totem-gallery-progress.c
src/plugins/screenshot/totem-screenshot-plugin.c
-src/plugins/skipto/skipto.plugin.desktop.in
-src/plugins/skipto/skipto.ui
-src/plugins/skipto/totem-skipto.c
-src/plugins/skipto/totem-skipto-plugin.c
-src/plugins/skipto/totem-time-entry.c
src/plugins/totem-plugins-engine.c
src/plugins/variable-rate/totem-variable-rate-plugin.c
src/plugins/variable-rate/variable-rate.plugin.desktop.in
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 5009c9cc3..b62055227 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -27,7 +27,6 @@ allowed_plugins = [
'save-file',
'screensaver',
'screenshot',
- 'skipto',
'variable-rate',
'vimeo',
]
@@ -47,7 +46,6 @@ if plugins_option != 'none'
'save-file',
'screensaver',
'screenshot',
- 'skipto',
'variable-rate',
'vimeo'
]
diff --git a/src/plugins/skipto/meson.build b/src/plugins/skipto/meson.build
deleted file mode 100644
index a1751a3ec..000000000
--- a/src/plugins/skipto/meson.build
+++ /dev/null
@@ -1,38 +0,0 @@
-plugin_name = 'skipto'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
-plugin_files = files(
- 'totem-' + plugin_name + '-plugin.c',
- 'totem-time-entry.c',
- 'totem-' + plugin_name + '.c'
-)
-
-plugin_files += gnome.compile_resources(
- 'skiptoresources',
- 'skipto.gresource.xml',
- export: true,
- source_dir: '.',
- c_name: 'skipto'
-)
-
-shared_module(
- plugin_name,
- sources: plugin_files,
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-i18n.merge_file(
- input: plugin_data + '.desktop.in',
- output: plugin_data,
- type: 'desktop',
- po_dir: po_dir,
- install_dir: plugin_dir,
- install: true
-)
diff --git a/src/plugins/skipto/skipto.gresource.xml b/src/plugins/skipto/skipto.gresource.xml
deleted file mode 100644
index ee5f3df86..000000000
--- a/src/plugins/skipto/skipto.gresource.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gresources>
- <gresource prefix="/org/gnome/totem/plugins/skipto">
- <file compressed="true">skipto.ui</file>
- </gresource>
-</gresources>
diff --git a/src/plugins/skipto/skipto.plugin.desktop.in b/src/plugins/skipto/skipto.plugin.desktop.in
deleted file mode 100644
index 8ac9403b1..000000000
--- a/src/plugins/skipto/skipto.plugin.desktop.in
+++ /dev/null
@@ -1,9 +0,0 @@
-[Plugin]
-Module=skipto
-IAge=1
-Builtin=true
-Name=Skip To
-Description=Provides the “Skip to” dialog
-Authors=Philip Withnall, Bastien Nocera
-Copyright=Copyright © 2007 Philip Withnall
-Website=https://wiki.gnome.org/Apps/Videos
diff --git a/src/plugins/skipto/skipto.ui b/src/plugins/skipto/skipto.ui
deleted file mode 100644
index 19633615d..000000000
--- a/src/plugins/skipto/skipto.ui
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" ?>
-<!--*- mode: xml -*--><!DOCTYPE glade-interface
- SYSTEM 'http://glade.gnome.org/glade-2.0.dtd'>
-<interface>
-
-<object class="GtkVBox" id="tstw_skip_vbox">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <object class="GtkHBox" id="tstw_skip_hbox">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <object class="GtkLabel" id="tstw_skip_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Skip to:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="mnemonic_widget">tstw_skip_time_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <object class="GtkHBox" id="hbox13">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <object class="GtkAdjustment" id="tstw_skip_adjustment">
- <property name="lower">0</property>
- <property name="upper">0</property>
- <property name="step-increment">1</property>
- <property name="page-increment">10</property>
- <property name="page-size">0</property>
- <property name="value">0</property>
- </object>
- <object class="TotemTimeEntry" id="tstw_skip_time_entry">
- <property name="climb_rate">1</property>
- <property name="adjustment">tstw_skip_adjustment</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <object class="GtkLabel" id="tstw_seconds_label">
- <property name="visible">True</property>
- <property name="label"></property><!-- This is set in code -->
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-</object>
-
-</interface>
diff --git a/src/plugins/skipto/totem-skipto-plugin.c b/src/plugins/skipto/totem-skipto-plugin.c
deleted file mode 100644
index 582a88583..000000000
--- a/src/plugins/skipto/totem-skipto-plugin.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2007 Philip Withnall <philip@tecnocode.co.uk>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * The Totem project hereby grant permission for non-gpl compatible GStreamer
- * plugins to be used and distributed together with GStreamer and Totem. This
- * permission are above and beyond the permissions granted by the GPL license
- * Totem is covered by.
- *
- * Monday 7th February 2005: Christian Schaller: Add excemption clause.
- * See license_change file for details.
- *
- * Author: Bastien Nocera <hadess@hadess.net>, Philip Withnall <philip@tecnocode.co.uk>
- */
-
-#include "config.h"
-
-#include <glib/gi18n-lib.h>
-#include <gmodule.h>
-#include <string.h>
-#include <gdk/gdkkeysyms.h>
-#include <libpeas/peas-activatable.h>
-
-#include "totem-plugin.h"
-#include "totem-skipto.h"
-
-#define TOTEM_TYPE_SKIPTO_PLUGIN (totem_skipto_plugin_get_type ())
-#define TOTEM_SKIPTO_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPlugin))
-
-typedef struct {
- PeasExtensionBase parent;
-
- TotemObject *totem;
- TotemSkipto *st;
- guint handler_id_stream_length;
- guint handler_id_seekable;
- guint handler_id_key_press;
- GSimpleAction *action;
-} TotemSkiptoPlugin;
-
-TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPlugin, totem_skipto_plugin)
-
-static void
-destroy_dialog (TotemSkiptoPlugin *pi)
-{
- if (pi->st != NULL) {
- g_object_remove_weak_pointer (G_OBJECT (pi->st),
- (gpointer *)&(pi->st));
- gtk_widget_destroy (GTK_WIDGET (pi->st));
- pi->st = NULL;
- }
-}
-
-static void
-totem_skipto_update_from_state (TotemObject *totem,
- TotemSkiptoPlugin *pi)
-{
- gint64 _time;
- gboolean seekable;
-
- g_object_get (G_OBJECT (pi->totem),
- "stream-length", &_time,
- "seekable", &seekable,
- NULL);
-
- if (pi->st != NULL) {
- totem_skipto_update_range (pi->st, _time);
- totem_skipto_set_seekable (pi->st, seekable);
- }
-
- /* Update the action's sensitivity */
- g_simple_action_set_enabled (G_SIMPLE_ACTION (pi->action), seekable);
-}
-
-static void
-property_notify_cb (TotemObject *totem,
- GParamSpec *spec,
- TotemSkiptoPlugin *pi)
-{
- totem_skipto_update_from_state (totem, pi);
-}
-
-static void
-skip_to_response_callback (GtkDialog *dialog, gint response, TotemSkiptoPlugin *pi)
-{
- if (response != GTK_RESPONSE_OK) {
- destroy_dialog (pi);
- return;
- }
-
- gtk_widget_hide (GTK_WIDGET (dialog));
-
- totem_object_seek_time (pi->totem,
- totem_skipto_get_range (pi->st),
- TRUE);
- destroy_dialog (pi);
-}
-
-static void
-run_skip_to_dialog (TotemSkiptoPlugin *pi)
-{
- if (totem_object_is_seekable (pi->totem) == FALSE)
- return;
-
- if (pi->st != NULL) {
- gtk_window_present (GTK_WINDOW (pi->st));
- totem_skipto_set_current (pi->st, totem_object_get_current_time
- (pi->totem));
- return;
- }
-
- pi->st = TOTEM_SKIPTO (totem_skipto_new (pi->totem));
- g_signal_connect (G_OBJECT (pi->st), "delete-event",
- G_CALLBACK (gtk_widget_destroy), NULL);
- g_signal_connect (G_OBJECT (pi->st), "response",
- G_CALLBACK (skip_to_response_callback), pi);
- g_object_add_weak_pointer (G_OBJECT (pi->st),
- (gpointer *)&(pi->st));
- totem_skipto_update_from_state (pi->totem, pi);
- totem_skipto_set_current (pi->st,
- totem_object_get_current_time (pi->totem));
-}
-
-static void
-skip_to_action_callback (GSimpleAction *action,
- GVariant *parameter,
- TotemSkiptoPlugin *pi)
-{
- run_skip_to_dialog (pi);
-}
-
-static gboolean
-on_window_key_press_event (GtkWidget *window, GdkEventKey *event, TotemSkiptoPlugin *pi)
-{
-
- if (event->state == 0 || !(event->state & GDK_CONTROL_MASK))
- return FALSE;
-
- switch (event->keyval) {
- case GDK_KEY_k:
- case GDK_KEY_K:
- run_skip_to_dialog (pi);
- break;
- default:
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void
-impl_activate (PeasActivatable *plugin)
-{
- GtkWindow *window;
- TotemSkiptoPlugin *pi = TOTEM_SKIPTO_PLUGIN (plugin);
- GMenu *menu;
- GMenuItem *item;
-
- pi->totem = g_object_get_data (G_OBJECT (plugin), "object");
- pi->handler_id_stream_length = g_signal_connect (G_OBJECT (pi->totem),
- "notify::stream-length",
- G_CALLBACK (property_notify_cb),
- pi);
- pi->handler_id_seekable = g_signal_connect (G_OBJECT (pi->totem),
- "notify::seekable",
- G_CALLBACK (property_notify_cb),
- pi);
-
- /* Key press handler */
- window = totem_object_get_main_window (pi->totem);
- pi->handler_id_key_press = g_signal_connect (G_OBJECT(window),
- "key-press-event",
- G_CALLBACK (on_window_key_press_event),
- pi);
- g_object_unref (window);
-
- /* Install the menu */
- pi->action = g_simple_action_new ("skip-to", NULL);
- g_signal_connect (G_OBJECT (pi->action), "activate",
- G_CALLBACK (skip_to_action_callback), plugin);
- g_action_map_add_action (G_ACTION_MAP (pi->totem), G_ACTION (pi->action));
-
- menu = totem_object_get_menu_section (pi->totem, "skipto-placeholder");
- item = g_menu_item_new (_("_Skip To…"), "app.skip-to");
- g_menu_item_set_attribute (item, "accel", "s", "<Primary>k");
- g_menu_append_item (G_MENU (menu), item);
-
- totem_skipto_update_from_state (pi->totem, pi);
-}
-
-static void
-impl_deactivate (PeasActivatable *plugin)
-{
- TotemSkiptoPlugin *pi = TOTEM_SKIPTO_PLUGIN (plugin);
- GtkWindow *window;
- TotemObject *totem;
-
- totem = g_object_get_data (G_OBJECT (plugin), "object");
-
- g_signal_handler_disconnect (G_OBJECT (totem),
- pi->handler_id_stream_length);
- g_signal_handler_disconnect (G_OBJECT (totem),
- pi->handler_id_seekable);
-
- if (pi->handler_id_key_press != 0) {
- window = totem_object_get_main_window (totem);
- g_signal_handler_disconnect (G_OBJECT(window),
- pi->handler_id_key_press);
- pi->handler_id_key_press = 0;
- g_object_unref (window);
- }
-
- /* Remove the menu */
- totem_object_empty_menu_section (totem, "skipto-placeholder");
-
- destroy_dialog (TOTEM_SKIPTO_PLUGIN (plugin));
-}
-
diff --git a/src/plugins/skipto/totem-skipto.c b/src/plugins/skipto/totem-skipto.c
deleted file mode 100644
index de1155994..000000000
--- a/src/plugins/skipto/totem-skipto.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2007 Bastien Nocera <hadess@hadess.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * The Totem project hereby grant permission for non-gpl compatible GStreamer
- * plugins to be used and distributed together with GStreamer and Totem. This
- * permission are above and beyond the permissions granted by the GPL license
- * Totem is covered by.
- *
- * Monday 7th February 2005: Christian Schaller: Add excemption clause.
- * See license_change file for details.
- *
- * Author: Bastien Nocera <hadess@hadess.net>, Philip Withnall <philip@tecnocode.co.uk>
- */
-
-#include "config.h"
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-
-#include "totem-dirs.h"
-#include "totem-skipto.h"
-#include "totem-uri.h"
-#include "totem-time-entry.h"
-#include "backend/bacon-video-widget.h"
-
-static void totem_skipto_dispose (GObject *object);
-
-struct _TotemSkipto {
- GtkDialog parent;
- GtkBuilder *xml;
- GtkWidget *time_entry;
- GtkLabel *seconds_label;
- GtkAdjustment *adj;
- gint64 time;
- Totem *totem;
- gpointer class_ref;
-};
-
-G_DEFINE_TYPE (TotemSkipto, totem_skipto, GTK_TYPE_DIALOG)
-
-#define WID(x) (gtk_builder_get_object (skipto->xml, x))
-
-static void
-totem_skipto_class_init (TotemSkiptoClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->dispose = totem_skipto_dispose;
-}
-
-static void
-totem_skipto_response_cb (GtkDialog *dialog, gint response_id, gpointer data)
-{
- TotemSkipto *skipto;
-
- skipto = TOTEM_SKIPTO (dialog);
- gtk_spin_button_update (GTK_SPIN_BUTTON (skipto->time_entry));
-}
-
-static void
-totem_skipto_init (TotemSkipto *skipto)
-{
- gtk_dialog_set_default_response (GTK_DIALOG (skipto), GTK_RESPONSE_OK);
- g_signal_connect (skipto, "response",
- G_CALLBACK (totem_skipto_response_cb), NULL);
-}
-
-static void
-totem_skipto_dispose (GObject *object)
-{
- TotemSkipto *skipto;
-
- skipto = TOTEM_SKIPTO (object);
- g_clear_object (&skipto->xml);
- skipto->adj = NULL;
- skipto->time_entry = NULL;
- skipto->seconds_label = NULL;
-
- if (skipto->class_ref != NULL) {
- g_type_class_unref (skipto->class_ref);
- skipto->class_ref = NULL;
- }
-
- G_OBJECT_CLASS (totem_skipto_parent_class)->dispose (object);
-}
-
-void
-totem_skipto_update_range (TotemSkipto *skipto, gint64 _time)
-{
- g_return_if_fail (TOTEM_IS_SKIPTO (skipto));
-
- if (_time == skipto->time)
- return;
-
- gtk_spin_button_set_range (GTK_SPIN_BUTTON (skipto->time_entry),
- 0, (gdouble) _time / 1000);
- skipto->time = _time;
-}
-
-gint64
-totem_skipto_get_range (TotemSkipto *skipto)
-{
- gint64 _time;
-
- g_return_val_if_fail (TOTEM_IS_SKIPTO (skipto), 0);
-
- _time = gtk_spin_button_get_value (GTK_SPIN_BUTTON (skipto->time_entry)) * 1000;
-
- return _time;
-}
-
-void
-totem_skipto_set_seekable (TotemSkipto *skipto, gboolean seekable)
-{
- g_return_if_fail (TOTEM_IS_SKIPTO (skipto));
-
- gtk_dialog_set_response_sensitive (GTK_DIALOG (skipto),
- GTK_RESPONSE_OK, seekable);
-}
-
-void
-totem_skipto_set_current (TotemSkipto *skipto, gint64 _time)
-{
- g_return_if_fail (TOTEM_IS_SKIPTO (skipto));
-
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (skipto->time_entry),
- (gdouble) (_time / 1000));
-}
-
-static void
-time_entry_activate_cb (GtkEntry *entry, TotemSkipto *skipto)
-{
- gtk_dialog_response (GTK_DIALOG (skipto), GTK_RESPONSE_OK);
-}
-
-static void
-tstw_adjustment_value_changed_cb (GtkAdjustment *adjustment, TotemSkipto *skipto)
-{
- int value;
-
- g_return_if_fail (TOTEM_IS_SKIPTO (skipto));
-
- if (skipto->seconds_label == NULL)
- return;
-
- value = (int) gtk_adjustment_get_value (adjustment);
-
- /* Update the "seconds" label so that it always has the correct singular/plural form */
- /* Translators: label for the seconds selector in the "Skip to" dialogue */
- gtk_label_set_label (skipto->seconds_label, ngettext ("second", "seconds", value));
-}
-
-GtkWidget *
-totem_skipto_new (TotemObject *totem)
-{
- TotemSkipto *skipto;
- GtkWidget *container;
- guint label_length;
-
- skipto = TOTEM_SKIPTO (g_object_new (TOTEM_TYPE_SKIPTO, NULL));
- skipto->class_ref = g_type_class_ref (TOTEM_TYPE_TIME_ENTRY);
-
- skipto->totem = totem;
- skipto->xml = gtk_builder_new_from_resource ("/org/gnome/totem/plugins/skipto/skipto.ui");
-
- skipto->adj = GTK_ADJUSTMENT (WID("tstw_skip_adjustment"));
- g_signal_connect (skipto->adj, "value-changed",
- G_CALLBACK (tstw_adjustment_value_changed_cb), skipto);
-
- skipto->time_entry = GTK_WIDGET (WID ("tstw_skip_time_entry"));
- g_signal_connect (G_OBJECT (skipto->time_entry), "activate",
- G_CALLBACK (time_entry_activate_cb), skipto);
-
- skipto->seconds_label = GTK_LABEL (WID ("tstw_seconds_label"));
-
- /* Fix the label width at the maximum necessary for the plural labels, to prevent it changing size when we change the spinner value */
- /* Translators: you should translate this string to a number (written in digits) which corresponds to the longer character length of the
- * translations for "second" and "seconds", as translated elsewhere in this file. For example, in English, "second" is 6 characters long and
- * "seconds" is 7 characters long, so this string should be translated to "7". See: bgo#639398 */
- label_length = strtoul (C_("Skip To label length", "7"), NULL, 10);
- gtk_label_set_width_chars (skipto->seconds_label, label_length);
-
- /* Set the initial "seconds" label */
- tstw_adjustment_value_changed_cb (skipto->adj, skipto);
-
- gtk_window_set_title (GTK_WINDOW (skipto), _("Skip To"));
- gtk_dialog_add_buttons (GTK_DIALOG (skipto),
- _("_Cancel"), GTK_RESPONSE_CANCEL,
- _("_Skip To"), GTK_RESPONSE_OK,
- NULL);
-
- /* Skipto dialog */
- g_signal_connect (G_OBJECT (skipto), "delete-event",
- G_CALLBACK (gtk_widget_destroy), skipto);
-
- container = GTK_WIDGET (gtk_builder_get_object (skipto->xml,
- "tstw_skip_vbox"));
- gtk_container_set_border_width (GTK_CONTAINER (skipto), 5);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (skipto))),
- container,
- TRUE, /* expand */
- TRUE, /* fill */
- 0); /* padding */
-
- gtk_window_set_transient_for (GTK_WINDOW (skipto),
- totem_object_get_main_window (totem));
-
- gtk_widget_show_all (GTK_WIDGET (skipto));
-
- return GTK_WIDGET (skipto);
-}
diff --git a/src/plugins/skipto/totem-skipto.h b/src/plugins/skipto/totem-skipto.h
deleted file mode 100644
index db315fc12..000000000
--- a/src/plugins/skipto/totem-skipto.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2007 Bastien Nocera <hadess@hadess.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * The Totem project hereby grant permission for non-gpl compatible GStreamer
- * plugins to be used and distributed together with GStreamer and Totem. This
- * permission are above and beyond the permissions granted by the GPL license
- * Totem is covered by.
- *
- * Monday 7th February 2005: Christian Schaller: Add excemption clause.
- * See license_change file for details.
- *
- * Author: Bastien Nocera <hadess@hadess.net>, Philip Withnall <philip@tecnocode.co.uk>
- */
-
-#pragma once
-
-#include <gtk/gtk.h>
-
-#include "totem.h"
-
-#define TOTEM_TYPE_SKIPTO (totem_skipto_get_type ())
-G_DECLARE_FINAL_TYPE(TotemSkipto, totem_skipto, TOTEM, SKIPTO, GtkDialog)
-
-GType totem_skipto_get_type (void);
-GtkWidget *totem_skipto_new (TotemObject *totem);
-gint64 totem_skipto_get_range (TotemSkipto *skipto);
-void totem_skipto_update_range (TotemSkipto *skipto, gint64 _time);
-void totem_skipto_set_seekable (TotemSkipto *skipto, gboolean seekable);
-void totem_skipto_set_current (TotemSkipto *skipto, gint64 _time);
diff --git a/src/plugins/skipto/totem-time-entry.c b/src/plugins/skipto/totem-time-entry.c
deleted file mode 100644
index bd632b4fc..000000000
--- a/src/plugins/skipto/totem-time-entry.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2008 Philip Withnall <philip@tecnocode.co.uk>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * The Totem project hereby grant permission for non-gpl compatible GStreamer
- * plugins to be used and distributed together with GStreamer and Totem. This
- * permission are above and beyond the permissions granted by the GPL license
- * Totem is covered by.
- *
- * Monday 7th February 2005: Christian Schaller: Add excemption clause.
- * See license_change file for details.
- *
- * Author: Philip Withnall <philip@tecnocode.co.uk>
- */
-
-#include "config.h"
-#include <string.h>
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-#include <gtk/gtk.h>
-
-#include "totem-time-helpers.h"
-#include "totem-time-entry.h"
-
-static void dispose (GObject *object);
-static gboolean output_cb (GtkSpinButton *self, gpointer user_data);
-static gint input_cb (GtkSpinButton *self, gdouble *new_value, gpointer user_data);
-static void notify_adjustment_cb (TotemTimeEntry *self, GParamSpec *pspec, gpointer user_data);
-static void changed_cb (GtkAdjustment *adjustment, TotemTimeEntry *self);
-
-struct _TotemTimeEntry {
- GtkSpinButton parent;
- GtkAdjustment *adjustment;
- gulong adjustment_changed_signal;
-};
-
-G_DEFINE_TYPE (TotemTimeEntry, totem_time_entry, GTK_TYPE_SPIN_BUTTON)
-
-static gint64
-totem_string_to_time (const char *time_string)
-{
- int sec, min, hour, args;
-
- args = sscanf (time_string, C_("long time format", "%d:%02d:%02d"), &hour, &min, &sec);
-
- if (args == 3) {
- /* Parsed all three arguments successfully */
- return (hour * (60 * 60) + min * 60 + sec) * 1000;
- } else if (args == 2) {
- /* Only parsed the first two arguments; treat hour and min as min and sec, respectively */
- return (hour * 60 + min) * 1000;
- } else if (args == 1) {
- /* Only parsed the first argument; treat hour as sec */
- return hour * 1000;
- } else {
- /* Error! */
- return -1;
- }
-}
-
-static void
-totem_time_entry_class_init (TotemTimeEntryClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->dispose = dispose;
-}
-
-static void
-totem_time_entry_init (TotemTimeEntry *self)
-{
- /* Connect to signals */
- g_signal_connect (self, "output", G_CALLBACK (output_cb), NULL);
- g_signal_connect (self, "input", G_CALLBACK (input_cb), NULL);
- g_signal_connect (self, "notify::adjustment", G_CALLBACK (notify_adjustment_cb), NULL);
-}
-
-static void
-dispose (GObject *object)
-{
- TotemTimeEntry *entry = TOTEM_TIME_ENTRY (object);
-
- if (entry->adjustment != NULL) {
- g_signal_handler_disconnect (entry->adjustment, entry->adjustment_changed_signal);
- g_object_unref (entry->adjustment);
- }
- entry->adjustment = NULL;
-
- G_OBJECT_CLASS (totem_time_entry_parent_class)->dispose (object);
-}
-
-GtkWidget *
-totem_time_entry_new (GtkAdjustment *adjustment, gdouble climb_rate)
-{
- return g_object_new (TOTEM_TYPE_TIME_ENTRY,
- "adjustment", adjustment,
- "climb-rate", climb_rate,
- "digits", 0,
- "numeric", FALSE,
- NULL);
-}
-
-static gboolean
-output_cb (GtkSpinButton *self, gpointer user_data)
-{
- gchar *text;
-
- text = totem_time_to_string ((gint64) gtk_spin_button_get_value (self) * 1000, TOTEM_TIME_FLAG_NONE);
- gtk_entry_set_text (GTK_ENTRY (self), text);
- g_free (text);
-
- return TRUE;
-}
-
-static gint
-input_cb (GtkSpinButton *self, gdouble *new_value, gpointer user_data)
-{
- gint64 val;
-
- val = totem_string_to_time (gtk_entry_get_text (GTK_ENTRY (self)));
- if (val == -1)
- return GTK_INPUT_ERROR;
-
- *new_value = val / 1000;
- return TRUE;
-}
-
-static void
-notify_adjustment_cb (TotemTimeEntry *self, GParamSpec *pspec, gpointer user_data)
-{
- if (self->adjustment != NULL) {
- g_signal_handler_disconnect (self->adjustment, self->adjustment_changed_signal);
- g_object_unref (self->adjustment);
- }
-
- self->adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (self));
- self->adjustment_changed_signal = 0;
-
- if (self->adjustment != NULL) {
- g_object_ref (self->adjustment);
- self->adjustment_changed_signal = g_signal_connect (self->adjustment, "changed", G_CALLBACK (changed_cb), self);
- }
-}
-
-static void
-changed_cb (GtkAdjustment *adjustment, TotemTimeEntry *self)
-{
- gchar *time_string;
- guint upper, width;
-
- /* Set the width of the entry according to the length of the longest string it'll now accept */
- upper = (guint) gtk_adjustment_get_upper (adjustment); /* in seconds */
-
- time_string = totem_time_to_string (((gint64) upper) * 1000, TOTEM_TIME_FLAG_NONE);
- width = strlen (time_string);
- g_free (time_string);
-
- gtk_entry_set_width_chars (GTK_ENTRY (self), width);
-}
diff --git a/src/plugins/skipto/totem-time-entry.h b/src/plugins/skipto/totem-time-entry.h
deleted file mode 100644
index cfc4cbe36..000000000
--- a/src/plugins/skipto/totem-time-entry.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2008 Philip Withnall <philip@tecnocode.co.uk>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * The Totem project hereby grant permission for non-gpl compatible GStreamer
- * plugins to be used and distributed together with GStreamer and Totem. This
- * permission are above and beyond the permissions granted by the GPL license
- * Totem is covered by.
- *
- * Monday 7th February 2005: Christian Schaller: Add excemption clause.
- * See license_change file for details.
- *
- * Author: Philip Withnall <philip@tecnocode.co.uk>
- */
-
-#pragma once
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gtk/gtk.h>
-
-#define TOTEM_TYPE_TIME_ENTRY (totem_time_entry_get_type ())
-G_DECLARE_FINAL_TYPE(TotemTimeEntry, totem_time_entry, TOTEM, TIME_ENTRY, GtkSpinButton)
-
-GType totem_time_entry_get_type (void);
-GtkWidget *totem_time_entry_new (GtkAdjustment *adjustment, gdouble climb_rate);