diff -Naur glom-1.6.17.old/glom/layout_item_dialogs/dialog_buttonscript.cc glom-1.6.17/glom/layout_item_dialogs/dialog_buttonscript.cc --- glom-1.6.17.old/glom/layout_item_dialogs/dialog_buttonscript.cc 2007-11-13 10:22:23.000000000 +0000 +++ glom-1.6.17/glom/layout_item_dialogs/dialog_buttonscript.cc 2008-09-25 20:30:03.000000000 +0100 @@ -22,7 +22,7 @@ #include "dialog_buttonscript.h" #include "../python_embed/glom_python.h" #include -#include +#include //#include @@ -42,22 +42,23 @@ //Dialog_Properties::set_modified(false); - //Set the SourceView to do syntax highlighting for Python: - //TODO: Shouldn't this be a singleton? - Glib::RefPtr languages_manager = gtksourceview::SourceLanguagesManager::create(); +//Set the SourceView to do syntax highlighting for Python: + Glib::RefPtr languages_manager = gtksourceview::SourceLanguageManager::get_default(); + + Glib::RefPtr language = languages_manager->get_language("python"); //This is the GtkSourceView language ID. - Glib::RefPtr language = languages_manager->get_language_from_mime_type("application/x-python"); if(language) { - //Createa a new buffer and set it, instead of getting the default buffer, in case libglade has tried to set it, using the wrong buffer type: + //Create a new buffer and set it, instead of getting the default buffer, in case libglade has tried to set it, using the wrong buffer type: Glib::RefPtr buffer = gtksourceview::SourceBuffer::create(language); - buffer->set_highlight(); + buffer->set_highlight_syntax(); m_text_view->set_buffer(buffer); } show_all_children(); } + Dialog_ButtonScript::~Dialog_ButtonScript() { } diff -Naur glom-1.6.17.old/glom/mode_design/fields/dialog_fieldcalculation.cc glom-1.6.17/glom/mode_design/fields/dialog_fieldcalculation.cc --- glom-1.6.17.old/glom/mode_design/fields/dialog_fieldcalculation.cc 2007-11-27 12:50:30.000000000 +0000 +++ glom-1.6.17/glom/mode_design/fields/dialog_fieldcalculation.cc 2008-09-25 20:30:41.000000000 +0100 @@ -24,7 +24,7 @@ #include "../../frame_glom.h" #include "../../python_embed/glom_python.h" #include -#include +#include //#include #include @@ -46,15 +46,14 @@ { m_text_view->set_highlight_current_line(true); - //TODO: Shouldn't this be a singleton? - Glib::RefPtr languages_manager = gtksourceview::SourceLanguagesManager::create(); + Glib::RefPtr languages_manager = gtksourceview::SourceLanguageManager::get_default(); - Glib::RefPtr language = languages_manager->get_language_from_mime_type("application/x-python"); + Glib::RefPtr language = languages_manager->get_language("python"); //This is the GtkSourceView language ID. if(language) { //Createa a new buffer and set it, instead of getting the default buffer, in case libglade has tried to set it, using the wrong buffer type: Glib::RefPtr buffer = gtksourceview::SourceBuffer::create(language); - buffer->set_highlight(); + buffer->set_highlight_syntax(); m_text_view->set_buffer(buffer); } } diff -Naur glom-1.6.17.old/glom/mode_design/script_library/dialog_script_library.cc glom-1.6.17/glom/mode_design/script_library/dialog_script_library.cc --- glom-1.6.17.old/glom/mode_design/script_library/dialog_script_library.cc 2007-11-13 10:22:26.000000000 +0000 +++ glom-1.6.17/glom/mode_design/script_library/dialog_script_library.cc 2008-09-25 20:30:54.000000000 +0100 @@ -23,7 +23,7 @@ #include "../../python_embed/glom_python.h" #include #include -#include +#include #include @@ -53,15 +53,14 @@ //Dialog_Properties::set_modified(false); //Set the SourceView to do syntax highlighting for Python: - //TODO: Shouldn't this be a singleton? - Glib::RefPtr languages_manager = gtksourceview::SourceLanguagesManager::create(); + Glib::RefPtr languages_manager = gtksourceview::SourceLanguageManager::get_default(); - Glib::RefPtr language = languages_manager->get_language_from_mime_type("application/x-python"); + Glib::RefPtr language = languages_manager->get_language("python"); //This is the GtkSourceView language ID. if(language) { //Create a new buffer and set it, instead of getting the default buffer, in case libglade has tried to set it, using the wrong buffer type: Glib::RefPtr buffer = gtksourceview::SourceBuffer::create(language); - buffer->set_highlight(); + buffer->set_highlight_syntax(); m_text_view->set_buffer(buffer); }