summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2015-08-25 14:43:02 +0200
committerBastien Nocera <hadess@hadess.net>2015-08-25 14:51:27 +0200
commit3367d1fd8f163e2416535623bc4daf935a595cba (patch)
tree9ccb24f2c6f1b04027e9dbf2a77e5c070fd7fd6f
parente95f536ad611c4bbc8e09a7348b25a6da453a0c3 (diff)
downloadtotem-3367d1fd8f163e2416535623bc4daf935a595cba.tar.gz
skipto: Fix dialogue not showing up
The dialogue wasn't showing up because GtkBuilder couldn't find the TotemTimeEntry class. Import it and reference it so it can be found by GtkBuilder. https://bugzilla.gnome.org/show_bug.cgi?id=753402
-rw-r--r--src/plugins/skipto/totem-skipto.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/skipto/totem-skipto.c b/src/plugins/skipto/totem-skipto.c
index 1821b7628..faeccbd09 100644
--- a/src/plugins/skipto/totem-skipto.c
+++ b/src/plugins/skipto/totem-skipto.c
@@ -40,6 +40,7 @@
#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);
@@ -54,6 +55,7 @@ struct TotemSkiptoPrivate {
GtkLabel *seconds_label;
gint64 time;
Totem *totem;
+ gpointer class_ref;
};
G_DEFINE_TYPE (TotemSkipto, totem_skipto, GTK_TYPE_DIALOG)
@@ -94,9 +96,13 @@ totem_skipto_dispose (GObject *object)
TotemSkipto *skipto;
skipto = TOTEM_SKIPTO (object);
- if (skipto->priv && skipto->priv->xml != NULL) {
- g_object_unref (skipto->priv->xml);
- skipto->priv->xml = NULL;
+ if (skipto->priv) {
+ g_clear_object (&skipto->priv->xml);
+
+ if (skipto->priv->class_ref != NULL) {
+ g_type_class_unref (skipto->priv->class_ref);
+ skipto->priv->class_ref = NULL;
+ }
}
G_OBJECT_CLASS (totem_skipto_parent_class)->dispose (object);
@@ -167,6 +173,7 @@ totem_skipto_new (TotemObject *totem)
guint label_length;
skipto = TOTEM_SKIPTO (g_object_new (TOTEM_TYPE_SKIPTO, NULL));
+ skipto->priv->class_ref = g_type_class_ref (TOTEM_TYPE_TIME_ENTRY);
skipto->priv->totem = totem;
skipto->priv->xml = totem_plugin_load_interface ("skipto",