~wongchiachen/ubuntu/precise/totem/hey_about_dialog

« back to all changes in this revision

Viewing changes to src/plugins/sidebar-test/totem-sidebar-test.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-05-20 16:38:02 UTC
  • mfrom: (1.11.13 upstream) (2.1.17 experimental)
  • Revision ID: james.westby@ubuntu.com-20110520163802-p3lohdmfvws2jqeo
Tags: 3.0.1-0ubuntu1
* Resynchronize on Debian, remaining diffs:
* debian/control.in:
  - use suggests rather than recommends for universe gstreamer components
  - add totem-plugins-extra for the components which have depends in universe
  - add build-depends on gnome-common, dh-autoreconf, 
    liblaunchpad-intrgration-3.0-dev, hardening-wrapper
  - drop build-depends on libepc-ui-dev, python-feedparser, xulrunner-dev,
    libtracker-sparql-0.10-dev
  - add XB-Npp-Description and XB-Npp-Filename header to the 
    totem-mozilla package to improve ubufox/ubuntu plugin db integration 
  - change refences from Iceweasel to Firefox
  - recommends gnome-icon-theme-symbolic rather than depending on it
  - list firefox as a totem-mozilla recommends before epiphany-browser
  - libtotem replaces totem (<< 3.0.1-1) for ppa upgrades
* debian/totem-common.install:
  - Install apport hook
* debian/totem-plugins-extra.install:
  - Plugins split out ouf totem-plugins
* debian/totem-plugins.install:    
  - Move some plugins to totem-plugins-extra
* debian/totem.preinst:
  - No longer required as Lucid has been released
* debian/patches/01_fake_keypresses.patch:
  - dropped it's an old workaround and should not be required
* debian/patches/02_lpi.patch:
  - Launchpad integration
* debian/patches/03_default_options.patch: 
  - enable the youtube option by default
* debian/patches/70_bbc_plugin.patch:
  - bbc content viewer, needs to be fixed for the new version
* debian/source_totem.py:
  - ubuntu apport debugging
* debian/rules:
  - run autoreconf on build
* debian/watch:
  - Watch for unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#define TOTEM_IS_SIDEBAR_TEST_PLUGIN_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), TOTEM_TYPE_SIDEBAR_TEST_PLUGIN))
44
44
#define TOTEM_SIDEBAR_TEST_PLUGIN_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), TOTEM_TYPE_SIDEBAR_TEST_PLUGIN, TotemSidebarTestPluginClass))
45
45
 
46
 
typedef struct
47
 
{
48
 
        TotemPlugin   parent;
49
 
} TotemSidebarTestPlugin;
50
 
 
51
 
typedef struct
52
 
{
53
 
        TotemPluginClass parent_class;
54
 
} TotemSidebarTestPluginClass;
55
 
 
56
 
 
57
 
G_MODULE_EXPORT GType register_totem_plugin             (GTypeModule *module);
58
 
GType   totem_sidebar_test_plugin_get_type              (void) G_GNUC_CONST;
59
 
 
60
 
static void totem_sidebar_test_plugin_finalize          (GObject *object);
61
 
static gboolean impl_activate                           (TotemPlugin *plugin, TotemObject *totem, GError **error);
62
 
static void impl_deactivate                             (TotemPlugin *plugin, TotemObject *totem);
63
 
 
64
 
TOTEM_PLUGIN_REGISTER(TotemSidebarTestPlugin, totem_sidebar_test_plugin)
65
 
 
66
 
static void
67
 
totem_sidebar_test_plugin_class_init (TotemSidebarTestPluginClass *klass)
68
 
{
69
 
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
70
 
        TotemPluginClass *plugin_class = TOTEM_PLUGIN_CLASS (klass);
71
 
 
72
 
        object_class->finalize = totem_sidebar_test_plugin_finalize;
73
 
 
74
 
        plugin_class->activate = impl_activate;
75
 
        plugin_class->deactivate = impl_deactivate;
76
 
}
77
 
 
78
 
static void
79
 
totem_sidebar_test_plugin_init (TotemSidebarTestPlugin *plugin)
80
 
{
81
 
}
82
 
 
83
 
static void
84
 
totem_sidebar_test_plugin_finalize (GObject *object)
85
 
{
86
 
        G_OBJECT_CLASS (totem_sidebar_test_plugin_parent_class)->finalize (object);
87
 
}
88
 
 
89
 
static gboolean
90
 
impl_activate (TotemPlugin *plugin,
91
 
               TotemObject *totem,
92
 
               GError **error)
 
46
typedef struct {
 
47
        gpointer unused;
 
48
} TotemSidebarTestPluginPrivate;
 
49
 
 
50
TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_SIDEBAR_TEST_PLUGIN, TotemSidebarTestPlugin, totem_sidebar_test_plugin)
 
51
 
 
52
static void
 
53
impl_activate (PeasActivatable *plugin)
93
54
{
94
55
        GtkWidget *label;
95
56
 
96
57
        label = gtk_label_new ("This is a test sidebar main widget");
97
58
        gtk_widget_show (label);
98
 
        totem_add_sidebar_page (totem,
 
59
        totem_add_sidebar_page (g_object_get_data (G_OBJECT (plugin), "object"),
99
60
                                "sidebar-test",
100
61
                                "Sidebar Test",
101
62
                                label);
102
63
        g_message ("Just added a test sidebar");
103
 
 
104
 
        return TRUE;
105
64
}
106
65
 
107
66
static void
108
 
impl_deactivate (TotemPlugin *plugin,
109
 
                 TotemObject *totem)
 
67
impl_deactivate (PeasActivatable *plugin)
110
68
{
 
69
        TotemObject *totem;
 
70
 
 
71
        totem = g_object_get_data (G_OBJECT (plugin), "object");
111
72
        totem_remove_sidebar_page (totem, "sidebar-test");
112
73
        g_message ("Just removed a test sidebar");
113
74
}