static void impl_deactivate (RBPlugin *plugin, RBShell *shell) { RBDiscRecorderPlugin *pi = RB_DISC_RECORDER_PLUGIN (plugin); GtkUIManager *uimanager = NULL; pi->enabled = FALSE; rb_debug ("RBDiscRecorderPlugin deactivating"); update_source (pi, shell); if (pi->selected_source) { g_object_unref (pi->selected_source); pi->selected_source = NULL; } g_signal_handlers_disconnect_by_func (shell, shell_selected_source_notify_cb, pi); g_object_get (shell, "ui-manager", &uimanager, NULL); gtk_ui_manager_remove_ui (uimanager, pi->ui_merge_id); gtk_ui_manager_remove_action_group (uimanager, pi->action_group); g_object_unref (uimanager); /* NOTE: don't deactivate libbrasero-media as it could be in use somewhere else */ }
static void mex_grilo_feed_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { MexGriloFeed *self = (MexGriloFeed *) object; MexGriloFeedPrivate *priv = self->priv; switch (prop_id) { case PROP_SOURCE: update_source (self, g_value_get_object (value)); break; case PROP_QUERY_KEYS: priv->query_keys = g_list_copy (g_value_get_pointer (value)); break; case PROP_METADATA_KEYS: priv->metadata_keys = g_list_copy (g_value_get_pointer (value)); break; case PROP_ROOT: priv->root = g_value_dup_object (value); break; default: break; } }
static void impl_deactivate (RBPlugin *plugin, RBShell *shell) { RBCdRecorderPlugin *pi = RB_CD_RECORDER_PLUGIN (plugin); GtkUIManager *uimanager = NULL; pi->enabled = FALSE; rb_debug ("RBCdRecorderPlugin deactivating"); update_source (pi, shell); if (pi->selected_source) { pi->selected_source = NULL; } g_signal_handlers_disconnect_by_func (shell, shell_selected_source_notify_cb, pi); g_object_get (G_OBJECT (shell), "ui-manager", &uimanager, NULL); gtk_ui_manager_remove_ui (uimanager, pi->ui_merge_id); gtk_ui_manager_remove_action_group (uimanager, pi->action_group); g_object_unref (G_OBJECT (uimanager)); }
static void shell_selected_source_notify_cb (RBShell *shell, GParamSpec *param, RBDiscRecorderPlugin *pi) { rb_debug ("RBDiscRecorderPlugin selected source changed"); update_source (pi, shell); }
StressPBCAA::StressPBCAA(ParticleSet& ref, bool active) : AA(0), myGrid(0), rVs(0), FirstTime(true), myConst(0.0), ForceBase(ref,ref), Ps(ref), is_active(active) { ReportEngine PRE("StressPBCAA","StressPBCAA"); //save source tag SourceID=ref.tag(); //create a distance table: just to get the table name DistanceTableData *d_aa = DistanceTable::add(ref); PtclRefName=d_aa->Name; initBreakup(ref); prefix="S_"+PtclRefName; app_log() << " Maximum K shell " << AA->MaxKshell << endl; app_log() << " Number of k vectors " << AA->Fk.size() << endl; if(!is_active) { d_aa->evaluate(ref); update_source(ref); app_log()<<"Evaluating Stress SymTensor::Long Range\n"; sLR=evalLR(ref); app_log()<<"Short Range...\n"; sSR=evalSR(ref); stress=sLR+sSR+myConst; //RealType eL(0.0), eS(0.0); //if (computeForces) //{ // forces = 0.0; // eS=evalSRwithForces(ref); // // 1.3978248322 // eL=evalLRwithForces(ref); // // 2.130267378 //} //else //{ // eL=evalLR(ref); // eS=evalSR(ref); //} //NewValue=Value = eL+eS+myConst; //app_log() << " Fixed Coulomb potential for " << ref.getName(); //app_log() << "\n e-e Madelung Const. =" << MC0 // << "\n Vtot =" << Value << endl; } app_log() << " Stress SymTensor components for " << ref.getName(); app_log() << "\n e-e Madelung Const. =\n" << MC0 << "\n Stot =\n" << stress << "\n S_SR =\n" << sSR << "\n S_LR =\n" << sLR << "\n S_Const =\n" << myConst<<endl; }
static void mex_grilo_feed_dispose (GObject *object) { MexGriloFeed *self = (MexGriloFeed *) object; MexGriloFeedPrivate *priv = self->priv; mex_grilo_feed_free_op (self); if (priv->source) { update_source (self, NULL); } if (priv->root) { g_object_unref (priv->root); priv->root = NULL; } G_OBJECT_CLASS (mex_grilo_feed_parent_class)->dispose (object); }
static void impl_activate (RBPlugin *plugin, RBShell *shell) { RBDiscRecorderPlugin *pi = RB_DISC_RECORDER_PLUGIN (plugin); GtkUIManager *uimanager = NULL; GtkAction *action; int i; pi->enabled = TRUE; rb_debug ("RBDiscRecorderPlugin activating"); brasero_media_library_start (); pi->shell = shell; g_object_get (shell, "ui-manager", &uimanager, NULL); g_signal_connect_object (G_OBJECT (shell), "notify::selected-source", G_CALLBACK (shell_selected_source_notify_cb), pi, 0); /* add UI */ pi->action_group = gtk_action_group_new ("DiscRecorderActions"); gtk_action_group_set_translation_domain (pi->action_group, GETTEXT_PACKAGE); gtk_action_group_add_actions (pi->action_group, rb_disc_recorder_plugin_actions, G_N_ELEMENTS (rb_disc_recorder_plugin_actions), pi); gtk_ui_manager_insert_action_group (uimanager, pi->action_group, 0); pi->ui_merge_id = gtk_ui_manager_new_merge_id (uimanager); for (i = 0; i < G_N_ELEMENTS (ui_paths); i++) { if (ui_paths[i].for_burn) gtk_ui_manager_add_ui (uimanager, pi->ui_merge_id, ui_paths[i].path, "MusicPlaylistBurnToDiscPlaylistMenu", "MusicPlaylistBurnToDiscPlaylist", GTK_UI_MANAGER_AUTO, FALSE); if (ui_paths[i].for_copy) gtk_ui_manager_add_ui (uimanager, pi->ui_merge_id, ui_paths[i].path, "MusicAudioCDDuplicateMenu", "MusicAudioCDDuplicate", GTK_UI_MANAGER_AUTO, FALSE); } g_object_unref (uimanager); action = gtk_action_group_get_action (pi->action_group, "MusicPlaylistBurnToDiscPlaylist"); /* Translators: this is the toolbar button label for */ /* Create Audio CD action */ g_object_set (action, "short-label", _("Burn"), NULL); action = gtk_action_group_get_action (pi->action_group, "MusicAudioCDDuplicate"); /* Translators: this is the toolbar button label for */ /* Duplicate Audio CD action */ g_object_set (action, "short-label", _("Copy CD"), NULL); update_source (pi, shell); }