static void impl_deactivate (PeasActivatable *plugin) { TotemMoviePropertiesPlugin *pi; TotemObject *totem; pi = TOTEM_MOVIE_PROPERTIES_PLUGIN (plugin); totem = g_object_get_data (G_OBJECT (plugin), "object"); g_signal_handler_disconnect (G_OBJECT (totem), pi->priv->handler_id_stream_length); g_signal_handlers_disconnect_by_func (G_OBJECT (totem), totem_movie_properties_plugin_metadata_updated, plugin); g_signal_handlers_disconnect_by_func (G_OBJECT (totem), totem_movie_properties_plugin_file_opened, plugin); g_signal_handlers_disconnect_by_func (G_OBJECT (totem), totem_movie_properties_plugin_file_closed, plugin); pi->priv->handler_id_stream_length = 0; gtk_application_remove_accelerator (GTK_APPLICATION (totem), "app.properties", NULL); totem_object_empty_menu_section (totem, "properties-placeholder"); }
void gw_application_remove_accelerators (GwApplication *application, GMenuModel *menumodel) { //Sanity checks g_return_if_fail (application != NULL); g_return_if_fail (menumodel != NULL); //Declarations gint total_items; gint index; gchar *accel = NULL; gchar *action = NULL; gchar *detail = NULL; GMenuModel *sublink = NULL; //Initializations total_items = g_menu_model_get_n_items (menumodel); for (index = 0; index < total_items; index++) { g_menu_model_get_item_attribute (menumodel, index, "accel", "s", &accel, NULL); g_menu_model_get_item_attribute (menumodel, index, G_MENU_ATTRIBUTE_ACTION, "s", &action, NULL); g_menu_model_get_item_attribute (menumodel, index, G_MENU_ATTRIBUTE_TARGET, "s", &detail, NULL); if (accel != NULL && action != NULL) { if (detail != NULL) gtk_application_remove_accelerator (GTK_APPLICATION (application), action, g_variant_new_string (detail)); else gtk_application_remove_accelerator (GTK_APPLICATION (application), action, NULL); } if (accel != NULL) g_free (accel); accel = NULL; if (action != NULL) g_free (action); action = NULL; if (detail != NULL) g_free (detail); detail = NULL; //Recursive work sublink = g_menu_model_get_item_link (menumodel, index, G_MENU_LINK_SUBMENU); if (sublink != NULL) gw_application_remove_accelerators (application, sublink); sublink = g_menu_model_get_item_link (menumodel, index, G_MENU_LINK_SECTION); if (sublink != NULL) gw_application_remove_accelerators (application, sublink); } }
static void rotation_plugin_real_deactivate (PeasActivatable* base) { RotationPlugin * self; TotemObject* t = NULL; GObject* _tmp0_ = NULL; GObject* _tmp1_ = NULL; guint _tmp2_ = 0U; guint _tmp3_ = 0U; BaconVideoWidget* _tmp4_ = NULL; self = (RotationPlugin*) base; g_object_get ((PeasActivatable*) self, "object", &_tmp0_, NULL); _tmp1_ = _tmp0_; t = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, totem_object_get_type (), TotemObject); g_signal_parse_name ("file-closed", totem_object_get_type (), &_tmp2_, NULL, FALSE); g_signal_handlers_disconnect_matched (t, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _rotation_plugin_cb_file_closed_totem_object_file_closed, self); g_signal_parse_name ("file-opened", totem_object_get_type (), &_tmp3_, NULL, FALSE); g_signal_handlers_disconnect_matched (t, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _rotation_plugin_cb_file_opened_totem_object_file_opened, self); totem_object_empty_menu_section (t, "rotation-placeholder"); gtk_application_remove_accelerator ((GtkApplication*) t, "app.rotate-right", NULL); gtk_application_remove_accelerator ((GtkApplication*) t, "app.rotate-left", NULL); _tmp4_ = self->priv->bvw; bacon_video_widget_set_rotation (_tmp4_, BVW_ROTATION_R_ZERO); _g_object_unref0 (t); }