[totem] skipto: Fix dialogue not showing up
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] skipto: Fix dialogue not showing up
- Date: Tue, 25 Aug 2015 12:51:44 +0000 (UTC)
commit 3367d1fd8f163e2416535623bc4daf935a595cba
Author: Bastien Nocera <hadess hadess net>
Date: Tue Aug 25 14:43:02 2015 +0200
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
src/plugins/skipto/totem-skipto.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/skipto/totem-skipto.c b/src/plugins/skipto/totem-skipto.c
index 1821b76..faeccbd 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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]