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,
84 if(plugin_type == PLUGIN_SHAREDPLUGIN)
89 track = edl->tracks->get_item_number(module);
90 if(track && this->plugin >= 0)
92 plugin = track->get_current_plugin(position,
98 char track_title[BCTEXTLEN];
99 char plugin_title[BCTEXTLEN];
102 strcpy(track_title, track->title);
104 sprintf(track_title, _("None"));
107 strcpy(plugin_title, plugin->title);
109 sprintf(plugin_title, _("None"));
111 sprintf(string, "%s: %s", track_title, plugin_title);
114 if(plugin_type == PLUGIN_SHAREDMODULE)
117 track = edl->tracks->get_item_number(module);
120 strcpy(string, track->title);
122 sprintf(string, _("None"));
123 //printf("SharedLocation::calculate_title %p %s\n", string);