[latexila] Fix ambiguous references between GLib.ListStore and Gtk.ListStore



commit 9d90ddfabdcb2184b804e2e3a8a43b49a87308be
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Tue Feb 24 22:32:31 2015 +0100

    Fix ambiguous references between GLib.ListStore and Gtk.ListStore
    
    GLib.ListStore is a new class in GIO and creates a conflict in Vala…

 src/build_tool_dialog.vala       |   10 +++++-----
 src/build_tools_preferences.vala |   12 ++++++------
 src/clean_build_files.vala       |    2 +-
 src/dialogs.vala                 |    2 +-
 src/file_browser.vala            |    8 ++++----
 src/most_used_symbols.vala       |    4 ++--
 src/preferences_dialog.vala      |    2 +-
 src/project_dialogs.vala         |    4 ++--
 src/side_panel.vala              |    4 ++--
 src/structure.vala               |    4 ++--
 src/structure_model.vala         |    2 +-
 src/symbols.vala                 |    8 ++++----
 src/symbols_view.vala            |    2 +-
 src/templates.vala               |   16 ++++++++--------
 14 files changed, 40 insertions(+), 40 deletions(-)
---
diff --git a/src/build_tool_dialog.vala b/src/build_tool_dialog.vala
index 4a9d81b..379ac5b 100644
--- a/src/build_tool_dialog.vala
+++ b/src/build_tool_dialog.vala
@@ -52,10 +52,10 @@ public class BuildToolDialog : GLib.Object
     private Entry _entry_extensions;
     private Entry _entry_files_to_open;
 
-    private ListStore _icons_store;
+    private Gtk.ListStore _icons_store;
     private ComboBox _icons_combobox;
 
-    private ListStore _jobs_store;
+    private Gtk.ListStore _jobs_store;
     private TreeView _jobs_view;
 
     public BuildToolDialog (Gtk.Window parent)
@@ -153,7 +153,7 @@ public class BuildToolDialog : GLib.Object
 
     private void init_icons_store ()
     {
-        _icons_store = new ListStore (IconColumn.N_COLUMNS,
+        _icons_store = new Gtk.ListStore (IconColumn.N_COLUMNS,
             typeof (string), // icon-name
             typeof (string)  // label
         );
@@ -196,7 +196,7 @@ public class BuildToolDialog : GLib.Object
 
     private void init_jobs ()
     {
-        _jobs_store = new ListStore (JobColumn.N_COLUMNS,
+        _jobs_store = new Gtk.ListStore (JobColumn.N_COLUMNS,
             typeof (string), // command
             typeof (string)  // post processor
         );
@@ -205,7 +205,7 @@ public class BuildToolDialog : GLib.Object
 
         /* Post processors list store */
 
-        ListStore post_processor_store = new ListStore (PostProcessorColumn.N_COLUMNS,
+        Gtk.ListStore post_processor_store = new Gtk.ListStore (PostProcessorColumn.N_COLUMNS,
             typeof (string) // the name of the post processor
         );
 
diff --git a/src/build_tools_preferences.vala b/src/build_tools_preferences.vala
index 3d7cfed..4cc58f0 100644
--- a/src/build_tools_preferences.vala
+++ b/src/build_tools_preferences.vala
@@ -36,8 +36,8 @@ public class BuildToolsPreferences : GLib.Object
     }
 
     private Dialog _dialog;
-    private ListStore _default_store;
-    private ListStore _personal_store;
+    private Gtk.ListStore _default_store;
+    private Gtk.ListStore _personal_store;
     private TreeView _default_view;
     private TreeView _personal_view;
 
@@ -156,9 +156,9 @@ public class BuildToolsPreferences : GLib.Object
         return box;
     }
 
-    private ListStore get_new_store ()
+    private Gtk.ListStore get_new_store ()
     {
-        return new ListStore (BuildToolColumn.N_COLUMNS,
+        return new Gtk.ListStore (BuildToolColumn.N_COLUMNS,
             typeof (bool),   // enabled
             typeof (string), // pixbuf (icon-name)
             typeof (string), // label
@@ -166,7 +166,7 @@ public class BuildToolsPreferences : GLib.Object
         );
     }
 
-    private TreeView get_new_view (ListStore store, Latexila.BuildTools build_tools)
+    private TreeView get_new_view (Gtk.ListStore store, Latexila.BuildTools build_tools)
     {
         TreeView view = new TreeView.with_model (store);
 
@@ -461,7 +461,7 @@ public class BuildToolsPreferences : GLib.Object
         update_store (_personal_store, Latexila.BuildToolsPersonal.get_instance ());
     }
 
-    private void update_store (ListStore store, Latexila.BuildTools build_tools)
+    private void update_store (Gtk.ListStore store, Latexila.BuildTools build_tools)
     {
         store.clear ();
 
diff --git a/src/clean_build_files.vala b/src/clean_build_files.vala
index e2bc2ab..b2c9462 100644
--- a/src/clean_build_files.vala
+++ b/src/clean_build_files.vala
@@ -188,7 +188,7 @@ public class CleanBuildFiles : GLib.Object
         treeview.headers_visible = false;
         treeview.enable_search = false;
 
-        ListStore store = new ListStore (CleanFileColumn.N_COLUMNS,
+        Gtk.ListStore store = new Gtk.ListStore (CleanFileColumn.N_COLUMNS,
             typeof (bool), typeof (string), typeof (File));
 
         store.set_sort_func (0, on_sort_list_files);
diff --git a/src/dialogs.vala b/src/dialogs.vala
index c7a22ee..60befaf 100644
--- a/src/dialogs.vala
+++ b/src/dialogs.vala
@@ -80,7 +80,7 @@ namespace Dialogs
         treeview.headers_visible = false;
         treeview.enable_search = false;
 
-        ListStore store = new ListStore (UnsavedDocColumn.N_COLUMNS, typeof (bool),
+        Gtk.ListStore store = new Gtk.ListStore (UnsavedDocColumn.N_COLUMNS, typeof (bool),
             typeof (string), typeof (Document));
 
         // fill the list
diff --git a/src/file_browser.vala b/src/file_browser.vala
index 31b16c7..b366ace 100644
--- a/src/file_browser.vala
+++ b/src/file_browser.vala
@@ -39,10 +39,10 @@ public class FileBrowser : Grid
 
     private unowned MainWindow _main_window;
 
-    private ListStore _parent_dir_store;
+    private Gtk.ListStore _parent_dir_store;
     private ComboBox _combo_box;
 
-    private ListStore _list_store;
+    private Gtk.ListStore _list_store;
     private TreeView _list_view;
 
     private File _current_directory;
@@ -84,7 +84,7 @@ public class FileBrowser : Grid
     // list of parent directories
     private void init_combo_box ()
     {
-        _parent_dir_store = new ListStore (ParentDirColumn.N_COLUMNS,
+        _parent_dir_store = new Gtk.ListStore (ParentDirColumn.N_COLUMNS,
             typeof (string),    // pixbuf (icon-name)
             typeof (string),    // directory name
             typeof (File)
@@ -124,7 +124,7 @@ public class FileBrowser : Grid
     // list of files and directories
     private void init_list ()
     {
-        _list_store = new ListStore (FileColumn.N_COLUMNS,
+        _list_store = new Gtk.ListStore (FileColumn.N_COLUMNS,
             typeof (string),    // pixbuf (icon-name)
             typeof (string),    // filename
             typeof (bool)       // is directory
diff --git a/src/most_used_symbols.vala b/src/most_used_symbols.vala
index c8badd6..3dcceed 100644
--- a/src/most_used_symbols.vala
+++ b/src/most_used_symbols.vala
@@ -25,7 +25,7 @@ public class MostUsedSymbols : GLib.Object
 {
     private static MostUsedSymbols _instance = null;
     private bool _modified = false;
-    private ListStore _store;
+    private Gtk.ListStore _store;
 
     // The column containing the number of times a symbol has been used.
     private static const int SYMBOL_COLUMN_NUM = SymbolColumn.N_COLUMNS;
@@ -47,7 +47,7 @@ public class MostUsedSymbols : GLib.Object
 
     private void init_models ()
     {
-        _store = new ListStore (SymbolColumn.N_COLUMNS + 1,
+        _store = new Gtk.ListStore (SymbolColumn.N_COLUMNS + 1,
             typeof (Gdk.Pixbuf),
             typeof (string), // command
             typeof (string), // tooltip
diff --git a/src/preferences_dialog.vala b/src/preferences_dialog.vala
index 5a69c10..bc2d246 100644
--- a/src/preferences_dialog.vala
+++ b/src/preferences_dialog.vala
@@ -382,7 +382,7 @@ public class PreferencesDialog : Dialog
 
     private void init_schemes_treeview (TreeView treeview, string current_id)
     {
-        ListStore list_store = new ListStore (StyleSchemes.N_COLUMNS, typeof (string),
+        Gtk.ListStore list_store = new Gtk.ListStore (StyleSchemes.N_COLUMNS, typeof (string),
             typeof (string));
         list_store.set_sort_column_id (StyleSchemes.ID, SortType.ASCENDING);
         treeview.set_model (list_store);
diff --git a/src/project_dialogs.vala b/src/project_dialogs.vala
index 9fd806d..d6df47b 100644
--- a/src/project_dialogs.vala
+++ b/src/project_dialogs.vala
@@ -190,7 +190,7 @@ namespace ProjectDialogs
         content_area.set_size_request (400, 250);
 
         /* treeview */
-        ListStore store = new ListStore (ProjectColumn.N_COLUMNS, typeof (string),
+        Gtk.ListStore store = new Gtk.ListStore (ProjectColumn.N_COLUMNS, typeof (string),
             typeof (string));
         update_model (store);
 
@@ -323,7 +323,7 @@ namespace ProjectDialogs
         return false;
     }
 
-    private void update_model (ListStore model)
+    private void update_model (Gtk.ListStore model)
     {
         model.clear ();
 
diff --git a/src/side_panel.vala b/src/side_panel.vala
index 498dffe..4be4212 100644
--- a/src/side_panel.vala
+++ b/src/side_panel.vala
@@ -31,7 +31,7 @@ public class SidePanel : Grid
     private GLib.Settings _settings;
     private Gee.ArrayList<Grid?> _components;
     private ComboBox _combo_box;
-    private ListStore _list_store;
+    private Gtk.ListStore _list_store;
     private int _current_component = -1;
 
     public SidePanel ()
@@ -54,7 +54,7 @@ public class SidePanel : Grid
 
     private void init_combo_box ()
     {
-        _list_store = new ListStore (SidePanelColumn.N_COLUMNS,
+        _list_store = new Gtk.ListStore (SidePanelColumn.N_COLUMNS,
             typeof (string), // pixbuf (icon-name)
             typeof (string)  // name
         );
diff --git a/src/structure.vala b/src/structure.vala
index a95256e..47ce718 100644
--- a/src/structure.vala
+++ b/src/structure.vala
@@ -102,7 +102,7 @@ public class Structure : Grid
 
     private TreeView _list_view;
     private ScrolledWindow _list_view_sw;
-    private ListStore _list_store;
+    private Gtk.ListStore _list_store;
     // A simple list can contain several types (e.g. TODOs and FIXMEs), but it's easier
     // to store only one type. See get_simple_list_types().
     private StructType _current_list_type;
@@ -283,7 +283,7 @@ public class Structure : Grid
         _list_view = get_new_tree_view (StructListColumn.PIXBUF, StructListColumn.TEXT,
             StructListColumn.TOOLTIP);
 
-        _list_store = new ListStore (StructListColumn.N_COLUMNS,
+        _list_store = new Gtk.ListStore (StructListColumn.N_COLUMNS,
             typeof (string),    // pixbuf
             typeof (string),    // text
             typeof (string)     // tooltip
diff --git a/src/structure_model.vala b/src/structure_model.vala
index c2f0618..0879a60 100644
--- a/src/structure_model.vala
+++ b/src/structure_model.vala
@@ -742,7 +742,7 @@ public class StructureModel : TreeModel, GLib.Object
     /*************************************************************************/
     // Simple lists
 
-    public void populate_list (ListStore store, StructType type)
+    public void populate_list (Gtk.ListStore store, StructType type)
     {
         var list = get_list (type);
         return_if_fail (list != null);
diff --git a/src/symbols.vala b/src/symbols.vala
index a2b949c..131bec4 100644
--- a/src/symbols.vala
+++ b/src/symbols.vala
@@ -66,7 +66,7 @@ public class Symbols : GLib.Object
     };
 
     private static Symbols _instance = null;
-    private ListStore _categories_store;
+    private Gtk.ListStore _categories_store;
 
     // category id -> NormalSymbols
     private Gee.Map<string, NormalSymbols?> _normal_symbols_map;
@@ -74,7 +74,7 @@ public class Symbols : GLib.Object
     // singleton
     private Symbols ()
     {
-        _categories_store = new ListStore (SymbolsCategoryColumn.N_COLUMNS,
+        _categories_store = new Gtk.ListStore (SymbolsCategoryColumn.N_COLUMNS,
             typeof (SymbolsCategoryType),
             typeof (string), // the icon
             typeof (string), // the name
@@ -133,7 +133,7 @@ public class Symbols : GLib.Object
 
     private void add_normal_category (CategoryInfo info)
     {
-        ListStore store = new NormalSymbols (info.id);
+        Gtk.ListStore store = new NormalSymbols (info.id);
 
         _normal_symbols_map[info.id] = store as NormalSymbols;
 
@@ -188,7 +188,7 @@ public class Symbols : GLib.Object
     }
 }
 
-private class NormalSymbols : ListStore
+private class NormalSymbols : Gtk.ListStore
 {
     private struct SymbolInfo
     {
diff --git a/src/symbols_view.vala b/src/symbols_view.vala
index 4427fff..eff90ac 100644
--- a/src/symbols_view.vala
+++ b/src/symbols_view.vala
@@ -83,7 +83,7 @@ public class SymbolsView : Grid
             if (! _combo_box.get_active_iter (out iter))
                 return;
 
-            ListStore store;
+            Gtk.ListStore store;
             SymbolsCategoryType type;
 
             categories_model.get (iter,
diff --git a/src/templates.vala b/src/templates.vala
index 805cf23..6468e23 100644
--- a/src/templates.vala
+++ b/src/templates.vala
@@ -24,10 +24,10 @@ public class Templates : GLib.Object
     private static Templates _instance = null;
 
     // Contains the default templates (empty, article, report, ...)
-    private ListStore _default_store;
+    private Gtk.ListStore _default_store;
 
     // Contains the personal templates (created by the user)
-    private ListStore _personal_store;
+    private Gtk.ListStore _personal_store;
 
     private int _nb_personal_templates;
 
@@ -127,9 +127,9 @@ public class Templates : GLib.Object
         }
     }
 
-    private ListStore create_new_store ()
+    private Gtk.ListStore create_new_store ()
     {
-        return new ListStore (TemplateColumn.N_COLUMNS,
+        return new Gtk.ListStore (TemplateColumn.N_COLUMNS,
             typeof (string), // pixbuf
             typeof (string), // icon id
             typeof (string), // name
@@ -223,7 +223,7 @@ public class Templates : GLib.Object
     /*************************************************************************/
     // Add and delete templates, save rc file.
 
-    private void add_template_from_string (ListStore store, string name,
+    private void add_template_from_string (Gtk.ListStore store, string name,
         string icon_id, string contents)
     {
         TreeIter iter;
@@ -236,7 +236,7 @@ public class Templates : GLib.Object
     }
 
     // Returns true on success.
-    private bool add_template_from_file (ListStore store, string name,
+    private bool add_template_from_file (Gtk.ListStore store, string name,
         string icon_id, File file)
     {
         string? contents = Utils.load_file (file);
@@ -390,7 +390,7 @@ public class Templates : GLib.Object
         return get_template_contents (_personal_store, path);
     }
 
-    private string get_template_contents (ListStore store, TreePath path)
+    private string get_template_contents (Gtk.ListStore store, TreePath path)
     {
         TreeIter iter;
         TreeModel model = store as TreeModel;
@@ -420,7 +420,7 @@ public class Templates : GLib.Object
         return get_templates_list (_personal_store);
     }
 
-    private TreeView get_templates_list (ListStore store)
+    private TreeView get_templates_list (Gtk.ListStore store)
     {
         TreeView view = new TreeView.with_model (store);
         view.headers_visible = false;


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