4 #include "sharedlocation.h"
7 #include "transportque.h"
15 #define _(String) gettext(String)
16 #define gettext_noop(String) String
17 #define N_(String) gettext_noop (String)
20 SharedLocation::SharedLocation()
26 SharedLocation::SharedLocation(int module, int plugin)
28 this->module = module;
29 this->plugin = plugin;
32 void SharedLocation::save(FileXML *file)
34 file->tag.set_title("SHARED_LOCATION");
35 if(module >= 0) file->tag.set_property("SHARED_MODULE", (int64_t)module);
36 if(plugin >= 0) file->tag.set_property("SHARED_PLUGIN", (int64_t)plugin);
38 file->tag.set_title("/SHARED_LOCATION");
40 file->append_newline();
43 void SharedLocation::load(FileXML *file)
48 module = file->tag.get_property("SHARED_MODULE", (int64_t)module);
49 plugin = file->tag.get_property("SHARED_PLUGIN", (int64_t)plugin);
52 int SharedLocation::get_type()
55 return PLUGIN_SHAREDMODULE;
57 return PLUGIN_SHAREDPLUGIN;
61 int SharedLocation::operator==(const SharedLocation &that)
64 module == that.module &&
71 SharedLocation& SharedLocation::operator=(const SharedLocation &that)
73 this->plugin = that.plugin;
74 this->module = that.module;
78 void SharedLocation::calculate_title(char *string,
85 if(plugin_type == PLUGIN_SHAREDPLUGIN)
90 track = edl->tracks->get_item_number(module);
91 if(track && this->plugin >= 0)
93 plugin = track->get_current_plugin(position,
100 char track_title[BCTEXTLEN];
101 char plugin_title[BCTEXTLEN];
104 strcpy(track_title, track->title);
106 sprintf(track_title, _("None"));
109 strcpy(plugin_title, _(plugin->title));
111 sprintf(plugin_title, _("None"));
113 sprintf(string, "%s: %s", track_title, plugin_title);
116 if(plugin_type == PLUGIN_SHAREDMODULE)
119 track = edl->tracks->get_item_number(module);
122 strcpy(string, track->title);
124 sprintf(string, _("None"));
125 //printf("SharedLocation::calculate_title %p %s\n", string);