index d642805c18f5a132bd001676b146b3c04bc8b83c..d26e05f0795b00f1938c467250fc8bc84b9072b2 100644 (file)
a new extension is selected, the notebooks are changed appropriately.
*/
ExtensionEditor::ExtensionEditor()
- : Dialog ("dialogs.extensioneditor", SP_VERB_DIALOG_EXTENSIONEDITOR)
+ : UI::Widget::Panel ("", "dialogs.extensioneditor", SP_VERB_DIALOG_EXTENSIONEDITOR)
{
_notebook_info.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
_notebook_help.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
Gtk::HBox* hbox_list_page = Gtk::manage(new Gtk::HBox());
hbox_list_page->set_border_width(12);
hbox_list_page->set_spacing(12);
- this->get_vbox()->add(*hbox_list_page);
+ _getContents()->add(*hbox_list_page);
//Pagelist
gchar title[500];
sp_ui_dialog_title_string (Inkscape::Verb::get(SP_VERB_DIALOG_EXTENSIONEDITOR), title);
Glib::ustring utitle(title);
- set_title(utitle + ": " + name);
+ // set_title(utitle + ": " + name);
/* Clear the notbook pages */
_notebook_info.remove();
_notebook_help.remove();
_notebook_params.remove();
- /* Make sure we have all the widges */
- Gtk::Widget * info;
- info = row[_page_list_columns._col_info];
- if (info == NULL) {
- info = Inkscape::Extension::db.get(id.c_str())->get_info_widget();
- row[_page_list_columns._col_info] = info;
- info->reference();
- } else {
- info->unparent();
- }
+ Inkscape::Extension::Extension * ext = Inkscape::Extension::db.get(id.c_str());
- Gtk::Widget * help;
- help = row[_page_list_columns._col_help];
- if (help == NULL) {
- help = Inkscape::Extension::db.get(id.c_str())->get_help_widget();
- row[_page_list_columns._col_help] = help;
- help->reference();
- } else {
- help->unparent();
- }
-
- Gtk::Widget * params;
- params = row[_page_list_columns._col_params];
- if (params == NULL) {
- params = Inkscape::Extension::db.get(id.c_str())->get_params_widget();
- row[_page_list_columns._col_params] = params;
- params->reference();
- } else {
- params->unparent();
+ /* Make sure we have all the widges */
+ Gtk::Widget * info = NULL;
+ Gtk::Widget * help = NULL;
+ Gtk::Widget * params = NULL;
+
+ if (ext != NULL) {
+ info = ext->get_info_widget();
+ help = ext->get_help_widget();
+ params = ext->get_params_widget();
}
/* Place them in the pages */
void
ExtensionEditor::dbfunc (Inkscape::Extension::Extension * in_plug, gpointer in_data)
{
- ExtensionEditor * ee = reinterpret_cast<ExtensionEditor *>(in_data);
+ ExtensionEditor * ee = static_cast<ExtensionEditor *>(in_data);
ee->add_extension(in_plug);
return;
}
Gtk::TreeModel::Row row = *iter;
row[_page_list_columns._col_name] = ext->get_name();
row[_page_list_columns._col_id] = ext->get_id();
- row[_page_list_columns._col_info] = NULL;
- row[_page_list_columns._col_help] = NULL;
- row[_page_list_columns._col_params] = NULL;
return iter;
}