index 1ded9e255f7064e487a7503381e1906ac63c0776..d577a6cc427b787a64b8d24b114adf255f99f6d9 100644 (file)
public:
ComboWithTooltip<T>(T default_value, const Util::EnumDataConverter<T>& c, const SPAttributeEnum a = SP_ATTR_INVALID, char* tip_text = NULL)
{
- if (tip_text) _tt.set_tip(*this, tip_text);
+ if (tip_text) {
+ _tt.set_tip(*this, tip_text);
+ }
combo = new ComboBoxEnum<T>(default_value, c, a);
add(*combo);
show_all();
}
-
+
~ComboWithTooltip()
{
delete combo;
}
-
+
ComboBoxEnum<T>* get_attrwidget()
{
return combo;
}
_s1.set_value(n.getNumber());
_s2.set_value(n.getOptNumber());
-
+
}
private:
Gtk::SpinButton _s1, _s2;
std::vector<double> default_values;
default_values.push_back(def1);
default_values.push_back(def2);
-
+
std::vector<char*> tips;
tips.push_back(tip1);
tips.push_back(tip2);
_vertical_layout = Pango::Layout::create(context);
int maxfont = 0;
- for(int i = 0; i < FPInputConverter.end; ++i) {
+ for(unsigned int i = 0; i < FPInputConverter._length; ++i) {
_vertical_layout->set_text(_(FPInputConverter.get_label((FilterPrimitiveInput)i).c_str()));
int fontw, fonth;
_vertical_layout->get_pixel_size(fontw, fonth);
int vis_x, vis_y;
tree_to_widget_coords(vis.get_x(), vis.get_y(), vis_x, vis_y);
- text_start_x = rct.get_x() + rct.get_width() - _connection_cell.get_text_width() * (FPInputConverter.end + 1) + 1;
- for(int i = 0; i < FPInputConverter.end; ++i) {
+ text_start_x = rct.get_x() + rct.get_width() - _connection_cell.get_text_width() * (FPInputConverter._length + 1) + 1;
+ for(unsigned int i = 0; i < FPInputConverter._length; ++i) {
_vertical_layout->set_text(_(FPInputConverter.get_label((FilterPrimitiveInput)i).c_str()));
const int x = text_start_x + _connection_cell.get_text_width() * (i + 1);
get_bin_window()->draw_rectangle(get_style()->get_bg_gc(Gtk::STATE_NORMAL), true, x, vis_y, _connection_cell.get_text_width(), vis.get_height());
@@ -1898,13 +1900,14 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton*
Gdk::Rectangle rct;
get_cell_area(path, *col, rct);
const int twidth = _connection_cell.get_text_width();
- const int sources_x = rct.get_width() - twidth * FPInputConverter.end;
+ const int sources_x = rct.get_width() - twidth * FPInputConverter._length;
if(cx > sources_x) {
int src = (cx - sources_x) / twidth;
- if(src < 0)
+ if (src < 0) {
src = 0;
- else if(src >= FPInputConverter.end)
- src = FPInputConverter.end - 1;
+ } else if(src >= static_cast<int>(FPInputConverter._length)) {
+ src = FPInputConverter._length - 1;
+ }
result = FPInputConverter.get_key((FilterPrimitiveInput)src);
in_val = result.c_str();
}
FilterEffectsDialog::FilterEffectsDialog()
: UI::Widget::Panel("", "dialogs.filtereffects", SP_VERB_DIALOG_FILTER_EFFECTS),
- _filter_modifier(*this),
- _primitive_list(*this),
_add_primitive_type(FPConverter),
_add_primitive(_("Add Effect:")),
_empty_settings(_("No effect selected"), Gtk::ALIGN_LEFT),
_no_filter_selected(_("No filter selected"), Gtk::ALIGN_LEFT),
_settings_initialized(false),
_locked(false),
- _attr_lock(false)
+ _attr_lock(false),
+ _filter_modifier(*this),
+ _primitive_list(*this)
{
_settings = new Settings(*this, _settings_tab1, sigc::mem_fun(*this, &FilterEffectsDialog::set_attr_direct),
NR_FILTER_ENDPRIMITIVETYPE);
_empty_settings.set_sensitive(false);
_settings_tab1.pack_start(_empty_settings);
-
+
_no_filter_selected.set_sensitive(false);
_settings_tab2.pack_start(_no_filter_selected);
_settings_initialized = true;
_infobox_icon.hide();
_infobox_desc.hide();
}
-
+
SPFilterPrimitive* prim = _primitive_list.get_selected();
if(prim) {