[glom] Adapt to the recent gtksourceviewmm API change.



commit 846f23d8d4e8a79273212406ec80dfa9c189de18
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 30 22:22:54 2011 +0200

    Adapt to the recent gtksourceviewmm API change.
    
    * configure.ac: Require the latest gtksourceviewmm.
    * glom/mode_design/dialog_database_preferences.[h|cc]:
    * glom/mode_design/fields/dialog_fieldcalculation.[h|cc]:
    * glom/mode_design/fields/dialog_fielddefinition.h:
    * glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.[h|cc]:
    :
    * glom/mode_design/script_library/dialog_script_library.[h|cc]: Use
    Gsv::* instead of Gsv::Source*.

 ChangeLog                                          |   13 +++++++++++++
 configure.ac                                       |    2 +-
 glom/mode_design/dialog_database_preferences.cc    |   10 +++++-----
 glom/mode_design/dialog_database_preferences.h     |    4 ++--
 glom/mode_design/fields/dialog_fieldcalculation.cc |    8 ++++----
 glom/mode_design/fields/dialog_fieldcalculation.h  |    4 ++--
 glom/mode_design/fields/dialog_fielddefinition.h   |    4 ++--
 .../layout_item_dialogs/dialog_buttonscript.cc     |   10 +++++-----
 .../layout_item_dialogs/dialog_buttonscript.h      |    4 ++--
 .../script_library/dialog_script_library.cc        |    8 ++++----
 .../script_library/dialog_script_library.h         |    4 ++--
 11 files changed, 42 insertions(+), 29 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e79a440..4eaa093 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2011-03-30  Murray Cumming  <murrayc murrayc com>
 
+	Adapt to the recent gtksourceviewmm API change.
+
+	* configure.ac: Require the latest gtksourceviewmm.
+	* glom/mode_design/dialog_database_preferences.[h|cc]:
+	* glom/mode_design/fields/dialog_fieldcalculation.[h|cc]:
+	* glom/mode_design/fields/dialog_fielddefinition.h:
+	* glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.[h|cc]:
+	:
+	* glom/mode_design/script_library/dialog_script_library.[h|cc]: Use 
+	Gsv::* instead of Gsv::Source*.
+
+2011-03-30  Murray Cumming  <murrayc murrayc com>
+
 	Update the document DTD.
 
 	* glom/glom_document.dtd: Mention some the new attribute and element
diff --git a/configure.ac b/configure.ac
index 0a44dbc..45fa6ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,7 +169,7 @@ AS_IF([test "x$glom_enable_client_only" != xyes && test "x$glom_host_win32" != x
 
 # Do not require gtksourceviewmm in client only mode
 AS_IF([test "x$glom_enable_client_only" != xyes],
-      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS gtksourceviewmm-3.0 >= 2.91.5"])
+      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS gtksourceviewmm-3.0 >= 2.91.9"])
 
 AS_IF([test "x$glom_enable_sqlite" = xyes],
       [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS libgda-sqlite-5.0"])
diff --git a/glom/mode_design/dialog_database_preferences.cc b/glom/mode_design/dialog_database_preferences.cc
index f622c69..7d35f6c 100644
--- a/glom/mode_design/dialog_database_preferences.cc
+++ b/glom/mode_design/dialog_database_preferences.cc
@@ -24,7 +24,7 @@
 #include <libglom/data_structure/glomconversions.h>
 #include <libglom/db_utils.h>
 #include <glom/bakery/busy_cursor.h>
-#include <gtksourceviewmm/sourcelanguagemanager.h>
+#include <gtksourceviewmm/languagemanager.h>
 #include <glibmm/i18n.h>
 
 #include <iostream>
@@ -87,15 +87,15 @@ Dialog_Database_Preferences::Dialog_Database_Preferences(BaseObjectType* cobject
   //Dialog_Properties::set_modified(false);
 
   //Tell the SourceView to do syntax highlighting for Python:
-  Glib::RefPtr<Gsv::SourceLanguageManager> languages_manager = 
-    Gsv::SourceLanguageManager::get_default();
+  Glib::RefPtr<Gsv::LanguageManager> languages_manager = 
+    Gsv::LanguageManager::get_default();
 
-  Glib::RefPtr<Gsv::SourceLanguage> language = 
+  Glib::RefPtr<Gsv::Language> 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<Gsv::SourceBuffer> buffer = Gsv::SourceBuffer::create(language);
+     Glib::RefPtr<Gsv::Buffer> buffer = Gsv::Buffer::create(language);
      buffer->set_highlight_syntax();
      m_text_view_script->set_buffer(buffer);
   }
diff --git a/glom/mode_design/dialog_database_preferences.h b/glom/mode_design/dialog_database_preferences.h
index 485c3f3..95b3b2a 100644
--- a/glom/mode_design/dialog_database_preferences.h
+++ b/glom/mode_design/dialog_database_preferences.h
@@ -26,7 +26,7 @@
 #include <glom/variablesmap.h>
 #include <gtkmm/entry.h>
 #include <gtkmm/label.h>
-#include <gtksourceviewmm/sourceview.h>
+#include <gtksourceviewmm/view.h>
 #include <glom/base_db.h>
 #include <libglom/data_structure/system_prefs.h>
 #include <libglom/connectionpool.h>
@@ -83,7 +83,7 @@ private:
   ImageGlom* m_image;
   Gtk::Button* m_button_choose_image;
 
-  Gsv::SourceView* m_text_view_script;
+  Gsv::View* m_text_view_script;
   Gtk::Button* m_button_test_script;
 
   SystemPrefs m_system_prefs;
diff --git a/glom/mode_design/fields/dialog_fieldcalculation.cc b/glom/mode_design/fields/dialog_fieldcalculation.cc
index 8f73bc3..24cf4fc 100644
--- a/glom/mode_design/fields/dialog_fieldcalculation.cc
+++ b/glom/mode_design/fields/dialog_fieldcalculation.cc
@@ -25,7 +25,7 @@
 #include <glom/python_embed/glom_python.h>
 #include <glom/utils_ui.h>
 #include <libglom/data_structure/glomconversions.h>
-#include <gtksourceviewmm/sourcelanguagemanager.h>
+#include <gtksourceviewmm/languagemanager.h>
 
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
@@ -50,13 +50,13 @@ Dialog_FieldCalculation::Dialog_FieldCalculation(BaseObjectType* cobject, const
   {
     m_text_view->set_highlight_current_line(true);
 
-    Glib::RefPtr<Gsv::SourceLanguageManager> languages_manager = Gsv::SourceLanguageManager::get_default();
+    Glib::RefPtr<Gsv::LanguageManager> languages_manager = Gsv::LanguageManager::get_default();
 
-    Glib::RefPtr<Gsv::SourceLanguage> language = languages_manager->get_language("python"); //This is the GtkSourceView language ID.
+    Glib::RefPtr<Gsv::Language> 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<Gsv::SourceBuffer> buffer = Gsv::SourceBuffer::create(language);
+       Glib::RefPtr<Gsv::Buffer> buffer = Gsv::Buffer::create(language);
        buffer->set_highlight_syntax();
        m_text_view->set_buffer(buffer);
     }
diff --git a/glom/mode_design/fields/dialog_fieldcalculation.h b/glom/mode_design/fields/dialog_fieldcalculation.h
index a1b34fe..dbb55f9 100644
--- a/glom/mode_design/fields/dialog_fieldcalculation.h
+++ b/glom/mode_design/fields/dialog_fieldcalculation.h
@@ -25,7 +25,7 @@
 #include <gtkmm/builder.h>
 #include <libglom/data_structure/field.h>
 #include <glom/base_db.h>
-#include <gtksourceviewmm/sourceview.h>
+#include <gtksourceviewmm/view.h>
 
 namespace Glom
 {
@@ -49,7 +49,7 @@ private:
   void on_button_test();
   bool check_for_return_statement(const Glib::ustring& calculation);
 
-  Gsv::SourceView* m_text_view;
+  Gsv::View* m_text_view;
   Gtk::Button* m_button_test;
   Gtk::Label* m_label_triggered_by;
 
diff --git a/glom/mode_design/fields/dialog_fielddefinition.h b/glom/mode_design/fields/dialog_fielddefinition.h
index f4ddea7..ec246b3 100644
--- a/glom/mode_design/fields/dialog_fielddefinition.h
+++ b/glom/mode_design/fields/dialog_fielddefinition.h
@@ -31,7 +31,7 @@
 #include <libglom/data_structure/field.h>
 #include <glom/mode_design/layout/layout_item_dialogs/box_formatting.h>
 #include <glom/base_db.h>
-#include <gtksourceviewmm/sourceview.h>
+#include <gtksourceviewmm/view.h>
 
 namespace Glom
 {
@@ -84,7 +84,7 @@ private:
 
   Gtk::RadioButton* m_pRadio_Calculate;
   Gtk::Alignment* m_pAlignment_Calculate;
-  Gsv::SourceView* m_pTextView_Calculation;
+  Gsv::View* m_pTextView_Calculation;
   Gtk::Button* m_pButton_EditCalculation;
 
   Gtk::Entry* m_pEntry_Title;
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
index 0016da2..546afa6 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
@@ -23,7 +23,7 @@
 #include <glom/python_embed/glom_python.h>
 #include <glom/utils_ui.h>
 #include <libglom/data_structure/glomconversions.h>
-#include <gtksourceviewmm/sourcelanguagemanager.h>
+#include <gtksourceviewmm/languagemanager.h>
 
 
 //#include <libgnome/gnome-i18n.h>
@@ -51,15 +51,15 @@ Dialog_ButtonScript::Dialog_ButtonScript(BaseObjectType* cobject, const Glib::Re
   //Dialog_Properties::set_modified(false);
 
   //Tell the SourceView to do syntax highlighting for Python:
-  Glib::RefPtr<Gsv::SourceLanguageManager> languages_manager = 
-    Gsv::SourceLanguageManager::get_default();
+  Glib::RefPtr<Gsv::LanguageManager> languages_manager = 
+    Gsv::LanguageManager::get_default();
 
-  Glib::RefPtr<Gsv::SourceLanguage> language = 
+  Glib::RefPtr<Gsv::Language> 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<Gsv::SourceBuffer> buffer = Gsv::SourceBuffer::create(language);
+     Glib::RefPtr<Gsv::Buffer> buffer = Gsv::Buffer::create(language);
      buffer->set_highlight_syntax();
      m_text_view_script->set_buffer(buffer);
   }
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h
index 6fd3dbb..94bd2ca 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h
@@ -26,7 +26,7 @@
 #include <libglom/data_structure/layout/layoutitem_button.h>
 #include <glom/base_db.h>
 
-#include <gtksourceviewmm/sourceview.h>
+#include <gtksourceviewmm/view.h>
 
 namespace Glom
 {
@@ -51,7 +51,7 @@ private:
   void on_button_test_script();
 
   Gtk::Entry* m_entry_title;
-  Gsv::SourceView* m_text_view_script;
+  Gsv::View* m_text_view_script;
   Gtk::Button* m_button_test_script;
 
   sharedptr<LayoutItem_Button> m_script;
diff --git a/glom/mode_design/script_library/dialog_script_library.cc b/glom/mode_design/script_library/dialog_script_library.cc
index 23acca8..0afe584 100644
--- a/glom/mode_design/script_library/dialog_script_library.cc
+++ b/glom/mode_design/script_library/dialog_script_library.cc
@@ -25,7 +25,7 @@
 #include <glom/glade_utils.h>
 #include <glom/utils_ui.h>
 #include <glom/mode_design/script_library/dialog_new_script.h>
-#include <gtksourceviewmm/sourcelanguagemanager.h>
+#include <gtksourceviewmm/languagemanager.h>
 #include <glom/application.h>
 
 
@@ -58,13 +58,13 @@ Dialog_ScriptLibrary::Dialog_ScriptLibrary(BaseObjectType* cobject, const Glib::
   //Dialog_Properties::set_modified(false);
 
   //Set the SourceView to do syntax highlighting for Python:
-  Glib::RefPtr<Gsv::SourceLanguageManager> languages_manager = Gsv::SourceLanguageManager::get_default();
+  Glib::RefPtr<Gsv::LanguageManager> languages_manager = Gsv::LanguageManager::get_default();
 
-  Glib::RefPtr<Gsv::SourceLanguage> language = languages_manager->get_language("python"); //This is the GtkSourceView language ID.
+  Glib::RefPtr<Gsv::Language> 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<Gsv::SourceBuffer> buffer = Gsv::SourceBuffer::create(language);
+     Glib::RefPtr<Gsv::Buffer> buffer = Gsv::Buffer::create(language);
      buffer->set_highlight_syntax();
      m_text_view->set_buffer(buffer);
   }
diff --git a/glom/mode_design/script_library/dialog_script_library.h b/glom/mode_design/script_library/dialog_script_library.h
index 4e030e8..9b05283 100644
--- a/glom/mode_design/script_library/dialog_script_library.h
+++ b/glom/mode_design/script_library/dialog_script_library.h
@@ -25,7 +25,7 @@
 #include <gtkmm/builder.h>
 #include <libglom/data_structure/layout/layoutitem_button.h>
 #include <glom/base_db.h>
-#include <gtksourceviewmm/sourceview.h>
+#include <gtksourceviewmm/view.h>
 #include <glom/utility_widgets/combo_textglade.h>
 
 namespace Glom
@@ -59,7 +59,7 @@ private:
 
   Combo_TextGlade* m_combobox_name;
 
-  Gsv::SourceView* m_text_view;
+  Gsv::View* m_text_view;
   Gtk::Button* m_button_check;
   Gtk::Button* m_button_add;
   Gtk::Button* m_button_remove;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]