[shotwell] Make constructors of abstract classes protected



commit 1de1e124c4662b0ad4b77556df030530f3ff9d82
Author: Jens Georg <mail jensge org>
Date:   Thu Mar 14 15:55:59 2019 +0000

    Make constructors of abstract classes protected
    
    
    (cherry picked from commit c594f79b0713606b9f10b9f0ab56b568401d7580)

 .../authenticator/shotwell/OAuth1Authenticator.vala    |  2 +-
 plugins/common/RESTSupport.vala                        |  4 ++--
 plugins/shotwell-transitions/shotwell-transitions.vala |  2 +-
 src/AppWindow.vala                                     |  4 ++--
 src/CheckerboardItem.vala                              |  2 +-
 src/CheckerboardPage.vala                              |  2 +-
 src/CollectionPage.vala                                |  2 +-
 src/ColorTransformation.vala                           |  6 +++---
 src/CommandManager.vala                                |  2 +-
 src/Commands.vala                                      | 18 +++++++++---------
 src/Dialogs.vala                                       |  6 +++---
 src/MediaDataRepresentation.vala                       |  4 ++--
 src/MediaInterfaces.vala                               |  3 ---
 src/MediaMetadata.vala                                 |  3 ---
 src/MediaMonitor.vala                                  |  2 +-
 src/MediaPage.vala                                     |  2 +-
 src/Photo.vala                                         |  3 ---
 src/PhotoPage.vala                                     |  2 +-
 src/PixbufCache.vala                                   |  2 +-
 src/Properties.vala                                    |  2 +-
 src/SinglePhotoPage.vala                               |  2 +-
 src/camera/ImportPage.vala                             |  2 +-
 src/core/ContainerSourceCollection.vala                |  2 +-
 src/core/DataObject.vala                               |  2 +-
 src/core/DataSource.vala                               |  4 ++--
 src/core/DataSourceTypes.vala                          |  6 +++---
 src/core/DatabaseSourceCollection.vala                 |  2 +-
 src/core/SourceCollection.vala                         |  2 +-
 src/editing_tools/EditingTools.vala                    |  8 ++++----
 src/events/EventsBranch.vala                           |  3 ---
 src/events/EventsDirectoryPage.vala                    |  2 +-
 src/faces/FaceShape.vala                               |  2 +-
 src/library/LibraryBranch.vala                         |  3 ---
 src/photos/GdkSupport.vala                             |  4 ++--
 src/photos/PhotoFileAdapter.vala                       |  2 +-
 src/photos/PhotoFileSniffer.vala                       |  2 +-
 src/photos/PhotoMetadata.vala                          |  2 +-
 src/sidebar/common.vala                                |  3 ---
 src/threads/BackgroundJob.vala                         |  2 +-
 src/threads/Semaphore.vala                             |  2 +-
 40 files changed, 56 insertions(+), 74 deletions(-)
---
diff --git a/plugins/authenticator/shotwell/OAuth1Authenticator.vala 
b/plugins/authenticator/shotwell/OAuth1Authenticator.vala
index 399b66f4..39752ece 100644
--- a/plugins/authenticator/shotwell/OAuth1Authenticator.vala
+++ b/plugins/authenticator/shotwell/OAuth1Authenticator.vala
@@ -12,7 +12,7 @@ namespace Publishing.Authenticator.Shotwell.OAuth1 {
         protected Publishing.RESTSupport.OAuth1.Session session;
         protected Spit.Publishing.PluginHost host;
 
-        public Authenticator(string api_key, string api_secret, Spit.Publishing.PluginHost host) {
+        protected Authenticator(string api_key, string api_secret, Spit.Publishing.PluginHost host) {
             base();
             this.host = host;
 
diff --git a/plugins/common/RESTSupport.vala b/plugins/common/RESTSupport.vala
index 5cd3768b..0d0a3fbd 100644
--- a/plugins/common/RESTSupport.vala
+++ b/plugins/common/RESTSupport.vala
@@ -31,7 +31,7 @@ public abstract class Session {
     public signal void authenticated();
     public signal void authentication_failed(Spit.Publishing.PublishingError err);
 
-    public Session(string? endpoint_url = null) {
+    protected Session(string? endpoint_url = null) {
         this.endpoint_url = endpoint_url;
         soup_session = new Soup.Session ();
         this.soup_session.ssl_use_system_ca_file = true;
@@ -685,7 +685,7 @@ public abstract class BatchUploader {
     public signal void upload_complete(int num_photos_published);
     public signal void upload_error(Spit.Publishing.PublishingError err);
 
-    public BatchUploader(Session session, Spit.Publishing.Publishable[] publishables) {
+    protected BatchUploader(Session session, Spit.Publishing.Publishable[] publishables) {
         this.publishables = publishables;
         this.session = session;
     }
diff --git a/plugins/shotwell-transitions/shotwell-transitions.vala 
b/plugins/shotwell-transitions/shotwell-transitions.vala
index 7673414c..1d2344ff 100644
--- a/plugins/shotwell-transitions/shotwell-transitions.vala
+++ b/plugins/shotwell-transitions/shotwell-transitions.vala
@@ -56,7 +56,7 @@ public abstract class ShotwellTransitionDescriptor : Object, Spit.Pluggable, Spi
 
     private static Gdk.Pixbuf[] icon_pixbuf_set = null;
     
-    public ShotwellTransitionDescriptor(GLib.File resource_directory) {
+    protected ShotwellTransitionDescriptor(GLib.File resource_directory) {
         if (icon_pixbuf_set == null)
             icon_pixbuf_set =
                 Resources.load_from_resource(Resources.RESOURCE_PATH + "/" + ICON_FILENAME);
diff --git a/src/AppWindow.vala b/src/AppWindow.vala
index 0c39dbae..608d1807 100644
--- a/src/AppWindow.vala
+++ b/src/AppWindow.vala
@@ -283,7 +283,7 @@ public abstract class PageWindow : Gtk.ApplicationWindow {
     protected virtual void switched_pages(Page? old_page, Page? new_page) {
     }
     
-    public PageWindow() {
+    protected PageWindow() {
         Object (application: Application.get_instance().get_system_app ());
 
         // the current page needs to know when modifier keys are pressed
@@ -405,7 +405,7 @@ public abstract class AppWindow : PageWindow {
     protected int pos_x = 0;
     protected int pos_y = 0;
     
-    public AppWindow() {
+    protected AppWindow() {
         base();
 
         // although there are multiple AppWindow types, only one may exist per-process
diff --git a/src/CheckerboardItem.vala b/src/CheckerboardItem.vala
index c423cad4..a8a5e633 100644
--- a/src/CheckerboardItem.vala
+++ b/src/CheckerboardItem.vala
@@ -47,7 +47,7 @@ public abstract class CheckerboardItem : ThumbnailView {
     private int row = -1;
     private int horizontal_trinket_offset = 0;
     
-    public CheckerboardItem(ThumbnailSource source, Dimensions initial_pixbuf_dim, string title, string? 
comment,
+    protected CheckerboardItem(ThumbnailSource source, Dimensions initial_pixbuf_dim, string title, string? 
comment,
         bool marked_up = false, Pango.Alignment alignment = Pango.Alignment.LEFT) {
         base(source);
         
diff --git a/src/CheckerboardPage.vala b/src/CheckerboardPage.vala
index b8ef3332..6d170680 100644
--- a/src/CheckerboardPage.vala
+++ b/src/CheckerboardPage.vala
@@ -41,7 +41,7 @@ public abstract class CheckerboardPage : Page {
         public bool super_pressed;
     }
 
-    public CheckerboardPage(string page_name) {
+    protected CheckerboardPage(string page_name) {
         base (page_name);
 
         stack = new Gtk.Stack();
diff --git a/src/CollectionPage.vala b/src/CollectionPage.vala
index 4206ec86..ac05f8b8 100644
--- a/src/CollectionPage.vala
+++ b/src/CollectionPage.vala
@@ -29,7 +29,7 @@ public abstract class CollectionPage : MediaPage {
     private ExporterUI exporter = null;
     private CollectionSearchViewFilter search_filter = new CollectionSearchViewFilter();
     
-    public CollectionPage(string page_name) {
+    protected CollectionPage(string page_name) {
         base (page_name);
         
         get_view().items_altered.connect(on_photos_altered);
diff --git a/src/ColorTransformation.vala b/src/ColorTransformation.vala
index 8595e964..6a1f8223 100644
--- a/src/ColorTransformation.vala
+++ b/src/ColorTransformation.vala
@@ -268,8 +268,8 @@ public abstract class PixelTransformation {
     private PixelTransformationType type;
     private PixelFormat preferred_format;
     
-    public PixelTransformation(PixelTransformationType type,
-                               PixelFormat preferred_format) {
+    protected PixelTransformation(PixelTransformationType type,
+                                  PixelFormat preferred_format) {
         this.type = type;
         this.preferred_format = preferred_format;
     }
@@ -476,7 +476,7 @@ public class RGBTransformation : PixelTransformation {
 public abstract class HSVTransformation : PixelTransformation {
     protected float remap_table[256];
 
-    public HSVTransformation(PixelTransformationType type) {
+    protected HSVTransformation(PixelTransformationType type) {
         base(type, PixelFormat.HSV);
     }
 
diff --git a/src/CommandManager.vala b/src/CommandManager.vala
index c7e40ab5..398dc463 100644
--- a/src/CommandManager.vala
+++ b/src/CommandManager.vala
@@ -29,7 +29,7 @@ public abstract class Command : Object, CommandDescription {
     private string explanation;
     private weak CommandManager manager = null;
     
-    public Command(string name, string explanation) {
+    protected Command(string name, string explanation) {
         this.name = name;
         this.explanation = explanation;
     }
diff --git a/src/Commands.vala b/src/Commands.vala
index 014f11dd..2c223256 100644
--- a/src/Commands.vala
+++ b/src/Commands.vala
@@ -12,7 +12,7 @@ public abstract class PageCommand : Command {
     private Photo library_photo = null;
     private CollectionPage collection_page = null;
     
-    public PageCommand(string name, string explanation) {
+    protected PageCommand(string name, string explanation) {
         base (name, explanation);
         
         page = AppWindow.get_instance().get_current_page();
@@ -103,7 +103,7 @@ public abstract class PageCommand : Command {
 public abstract class SingleDataSourceCommand : PageCommand {
     protected DataSource source;
     
-    public SingleDataSourceCommand(DataSource source, string name, string explanation) {
+    protected SingleDataSourceCommand(DataSource source, string name, string explanation) {
         base(name, explanation);
         
         this.source = source;
@@ -130,7 +130,7 @@ public abstract class SimpleProxyableCommand : PageCommand {
     private SourceProxy proxy;
     private Gee.HashSet<SourceProxy> proxies = new Gee.HashSet<SourceProxy>();
     
-    public SimpleProxyableCommand(Proxyable proxyable, string name, string explanation) {
+    protected SimpleProxyableCommand(Proxyable proxyable, string name, string explanation) {
         base (name, explanation);
         
         proxy = proxyable.get_proxy();
@@ -183,7 +183,7 @@ public abstract class SimpleProxyableCommand : PageCommand {
 public abstract class SinglePhotoTransformationCommand : SingleDataSourceCommand {
     private PhotoTransformationState state;
     
-    public SinglePhotoTransformationCommand(Photo photo, string name, string explanation) {
+    protected SinglePhotoTransformationCommand(Photo photo, string name, string explanation) {
         base(photo, name, explanation);
         
         state = photo.save_transformation_state();
@@ -207,7 +207,7 @@ public abstract class GenericPhotoTransformationCommand : SingleDataSourceComman
     private PhotoTransformationState original_state = null;
     private PhotoTransformationState transformed_state = null;
     
-    public GenericPhotoTransformationCommand(Photo photo, string name, string explanation) {
+    protected GenericPhotoTransformationCommand(Photo photo, string name, string explanation) {
         base(photo, name, explanation);
     }
     
@@ -282,7 +282,7 @@ public abstract class MultipleDataSourceCommand : PageCommand {
     private Gee.ArrayList<DataSource> acted_upon = new Gee.ArrayList<DataSource>();
     private Gee.HashSet<SourceCollection> hooked_collections = new Gee.HashSet<SourceCollection>();
     
-    public MultipleDataSourceCommand(Gee.Iterable<DataView> iter, string progress_text,
+    protected MultipleDataSourceCommand(Gee.Iterable<DataView> iter, string progress_text,
         string undo_progress_text, string name, string explanation) {
         base(name, explanation);
         
@@ -414,7 +414,7 @@ public abstract class MultipleDataSourceAtOnceCommand : PageCommand {
     private Gee.HashSet<DataSource> sources = new Gee.HashSet<DataSource>();
     private Gee.HashSet<SourceCollection> hooked_collections = new Gee.HashSet<SourceCollection>();
     
-    public MultipleDataSourceAtOnceCommand(Gee.Collection<DataSource> sources, string name,
+    protected MultipleDataSourceAtOnceCommand(Gee.Collection<DataSource> sources, string name,
         string explanation) {
         base (name, explanation);
         
@@ -490,7 +490,7 @@ public abstract class MultiplePhotoTransformationCommand : MultipleDataSourceCom
     private Gee.HashMap<Photo, PhotoTransformationState> map = new Gee.HashMap<
         Photo, PhotoTransformationState>();
     
-    public MultiplePhotoTransformationCommand(Gee.Iterable<DataView> iter, string progress_text,
+    protected MultiplePhotoTransformationCommand(Gee.Iterable<DataView> iter, string progress_text,
         string undo_progress_text, string name, string explanation) {
         base(iter, progress_text, undo_progress_text, name, explanation);
         
@@ -963,7 +963,7 @@ public abstract class MovePhotosCommand : Command {
 
     protected RealMovePhotosCommand real_command;
     
-    public MovePhotosCommand(string name, string explanation) {
+    protected MovePhotosCommand(string name, string explanation) {
         base(name, explanation);
     }
     
diff --git a/src/Dialogs.vala b/src/Dialogs.vala
index d5c8f80a..9b9fbcc6 100644
--- a/src/Dialogs.vala
+++ b/src/Dialogs.vala
@@ -610,7 +610,7 @@ internal void save_import_results(Gtk.Window? chooser_dialog_parent, string resu
 public abstract class TextEntryDialogMediator {
     private TextEntryDialog dialog;
     
-    public TextEntryDialogMediator(string title, string label, string? initial_text = null,
+    protected TextEntryDialogMediator(string title, string label, string? initial_text = null,
         Gee.Collection<string>? completion_list = null, string? completion_delimiter = null) {
         dialog = new TextEntryDialog();
         dialog.setup(on_modify_validate, title, label, initial_text, completion_list, completion_delimiter);
@@ -628,7 +628,7 @@ public abstract class TextEntryDialogMediator {
 public abstract class MultiTextEntryDialogMediator {
     private MultiTextEntryDialog dialog;
     
-    public MultiTextEntryDialogMediator(string title, string label, string? initial_text = null) {
+    protected MultiTextEntryDialogMediator(string title, string label, string? initial_text = null) {
         dialog = new MultiTextEntryDialog();
         dialog.setup(on_modify_validate, title, label, initial_text);
     }
@@ -820,7 +820,7 @@ public void multiple_object_error_dialog(Gee.ArrayList<DataObject> objects, stri
 }
 
 public abstract class TagsDialog : TextEntryDialogMediator {
-    public TagsDialog(string title, string label, string? initial_text = null) {
+    protected TagsDialog(string title, string label, string? initial_text = null) {
         base (title, label, initial_text, HierarchicalTagIndex.get_global_index().get_all_tags(),
             ",");
     }
diff --git a/src/MediaDataRepresentation.vala b/src/MediaDataRepresentation.vala
index f4b9f7d7..6e6af009 100644
--- a/src/MediaDataRepresentation.vala
+++ b/src/MediaDataRepresentation.vala
@@ -36,7 +36,7 @@ public abstract class MediaSource : ThumbnailSource, Indexable {
     private Event? event = null;
     private string? indexable_keywords = null;
     
-    public MediaSource(int64 object_id = INVALID_OBJECT_ID) {
+    protected MediaSource(int64 object_id = INVALID_OBJECT_ID) {
         base (object_id);
     }
     
@@ -381,7 +381,7 @@ public abstract class MediaSourceCollection : DatabaseSourceCollection {
     public virtual signal void flagged_contents_altered() {
     }
     
-    public MediaSourceCollection(string name, GetSourceDatabaseKey source_key_func) {
+    protected MediaSourceCollection(string name, GetSourceDatabaseKey source_key_func) {
         base(name, source_key_func);
         
         trashcan = create_trashcan();
diff --git a/src/MediaInterfaces.vala b/src/MediaInterfaces.vala
index 37209cfd..1a352a24 100644
--- a/src/MediaInterfaces.vala
+++ b/src/MediaInterfaces.vala
@@ -51,9 +51,6 @@
 public abstract class TransactionController {
     private int count = 0;
     
-    public TransactionController() {
-    }
-    
     ~TransactionController() {
         lock (count) {
             assert(count == 0);
diff --git a/src/MediaMetadata.vala b/src/MediaMetadata.vala
index 68f72513..b2ba1b77 100644
--- a/src/MediaMetadata.vala
+++ b/src/MediaMetadata.vala
@@ -5,9 +5,6 @@
  */
 
 public abstract class MediaMetadata {
-    public MediaMetadata() {
-    }
-    
     public abstract void read_from_file(File file) throws Error;
     
     public abstract MetadataDateTime? get_creation_date_time();
diff --git a/src/MediaMonitor.vala b/src/MediaMonitor.vala
index a36f6894..9c9d62d3 100644
--- a/src/MediaMonitor.vala
+++ b/src/MediaMonitor.vala
@@ -115,7 +115,7 @@ public abstract class MediaMonitor : Object {
         MonitorableUpdates>();
     private uint pending_updates_timer_id = 0;
     
-    public MediaMonitor(MediaSourceCollection sources, Cancellable cancellable) {
+    protected MediaMonitor(MediaSourceCollection sources, Cancellable cancellable) {
         this.sources = sources;
         this.cancellable = cancellable;
         
diff --git a/src/MediaPage.vala b/src/MediaPage.vala
index 83169064..f849ac3c 100644
--- a/src/MediaPage.vala
+++ b/src/MediaPage.vala
@@ -161,7 +161,7 @@ public abstract class MediaPage : CheckerboardPage {
     private DragAndDropHandler dnd_handler = null;
     private MediaViewTracker tracker;
     
-    public MediaPage(string page_name) {
+    protected MediaPage(string page_name) {
         base (page_name);
         
         tracker = new MediaViewTracker(get_view());
diff --git a/src/Photo.vala b/src/Photo.vala
index 9135eea5..51ca57e1 100644
--- a/src/Photo.vala
+++ b/src/Photo.vala
@@ -69,9 +69,6 @@ public abstract class PhotoTransformationState : Object {
         is_broke = true;
     }
     
-    protected PhotoTransformationState() {
-    }
-    
     public bool is_broken() {
         return is_broke;
     }
diff --git a/src/PhotoPage.vala b/src/PhotoPage.vala
index 537d65ca..197a9ca8 100644
--- a/src/PhotoPage.vala
+++ b/src/PhotoPage.vala
@@ -417,7 +417,7 @@ public abstract class EditingHostPage : SinglePhotoPage {
     private ZoomBuffer? zoom_buffer = null;
     private Gee.HashMap<string, int> last_locations = new Gee.HashMap<string, int>();
     
-    public EditingHostPage(SourceCollection sources, string name) {
+    protected EditingHostPage(SourceCollection sources, string name) {
         base(name, false);
         
         this.sources = sources;
diff --git a/src/PixbufCache.vala b/src/PixbufCache.vala
index 6ab44263..6ff740ed 100644
--- a/src/PixbufCache.vala
+++ b/src/PixbufCache.vala
@@ -25,7 +25,7 @@ public class PixbufCache : Object {
         public Gdk.Pixbuf pixbuf = null;
         public Error err = null;
         
-        public FetchJob(PixbufCache owner, BackgroundJob.JobPriority priority, Photo photo, 
+        protected FetchJob(PixbufCache owner, BackgroundJob.JobPriority priority, Photo photo, 
             Scaling scaling, CompletionCallback callback) {
             base(owner, callback, new Cancellable(), null, new Semaphore());
             
diff --git a/src/Properties.vala b/src/Properties.vala
index 4a01cc95..15b889af 100644
--- a/src/Properties.vala
+++ b/src/Properties.vala
@@ -8,7 +8,7 @@ private abstract class Properties : Gtk.Box {
     protected Gtk.Grid grid = new Gtk.Grid();
     protected uint line_count = 0;
 
-    public Properties() {
+    protected Properties() {
         Object(orientation: Gtk.Orientation.VERTICAL, homogeneous : false);
 
         grid.row_spacing = 6;
diff --git a/src/SinglePhotoPage.vala b/src/SinglePhotoPage.vala
index 0985eb1c..d87b891c 100644
--- a/src/SinglePhotoPage.vala
+++ b/src/SinglePhotoPage.vala
@@ -36,7 +36,7 @@ public abstract class SinglePhotoPage : Page {
     private bool has_saved_zoom_state = false;
     private uint32 last_nav_key = 0;
 
-    public SinglePhotoPage(string page_name, bool scale_up_to_viewport) {
+    protected SinglePhotoPage(string page_name, bool scale_up_to_viewport) {
         base(page_name);
 
         this.scale_up_to_viewport = scale_up_to_viewport;
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index a435f305..bb67a94f 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -25,7 +25,7 @@ abstract class ImportSource : ThumbnailSource, Indexable {
     private Gdk.Pixbuf? preview = null;
     private string? indexable_keywords = null;
     
-    public ImportSource(string camera_name, GPhoto.Camera camera, int fsid, string folder,
+    protected ImportSource(string camera_name, GPhoto.Camera camera, int fsid, string folder,
         string filename, ulong file_size, time_t modification_time) {
         this.camera_name = camera_name;
         this.camera = camera;
diff --git a/src/core/ContainerSourceCollection.vala b/src/core/ContainerSourceCollection.vala
index cf6218a1..0b231dc9 100644
--- a/src/core/ContainerSourceCollection.vala
+++ b/src/core/ContainerSourceCollection.vala
@@ -35,7 +35,7 @@ public abstract class ContainerSourceCollection : DatabaseSourceCollection {
         Gee.Collection<DataSource> sources) {
     }
     
-    public ContainerSourceCollection(string backlink_name, string name,
+    protected ContainerSourceCollection(string backlink_name, string name,
         GetSourceDatabaseKey source_key_func) {
         base (name, source_key_func);
         
diff --git a/src/core/DataObject.vala b/src/core/DataObject.vala
index 3c98e9ed..62241b56 100644
--- a/src/core/DataObject.vala
+++ b/src/core/DataObject.vala
@@ -35,7 +35,7 @@ public abstract class DataObject : Object {
     
     // NOTE: Supplying an object ID should *only* be used when reconstituting the object (generally
     // only done by DataSources).
-    public DataObject(int64 object_id = INVALID_OBJECT_ID) {
+    protected DataObject(int64 object_id = INVALID_OBJECT_ID) {
         this.object_id = (object_id == INVALID_OBJECT_ID) ? object_id_generator++ : object_id;
     }
     
diff --git a/src/core/DataSource.vala b/src/core/DataSource.vala
index 352ac54a..3f2eb221 100644
--- a/src/core/DataSource.vala
+++ b/src/core/DataSource.vala
@@ -60,7 +60,7 @@ public abstract class DataSource : DataObject {
     public virtual signal void destroyed() {
     }
     
-    public DataSource(int64 object_id = INVALID_OBJECT_ID) {
+    protected DataSource(int64 object_id = INVALID_OBJECT_ID) {
         base (object_id);
     }
     
@@ -568,7 +568,7 @@ public abstract class SourceProxy {
     public virtual signal void broken() {
     }
     
-    public SourceProxy(DataSource source) {
+    protected SourceProxy(DataSource source) {
         object_id = source.get_object_id();
         source_string = source.to_string();
         
diff --git a/src/core/DataSourceTypes.vala b/src/core/DataSourceTypes.vala
index 6d8479e2..a79264fd 100644
--- a/src/core/DataSourceTypes.vala
+++ b/src/core/DataSourceTypes.vala
@@ -12,7 +12,7 @@ public abstract class ThumbnailSource : DataSource {
     public virtual signal void thumbnail_altered() {
     }
     
-    public ThumbnailSource(int64 object_id = INVALID_OBJECT_ID) {
+    protected ThumbnailSource(int64 object_id = INVALID_OBJECT_ID) {
         base (object_id);
     }
     
@@ -51,7 +51,7 @@ public abstract class ThumbnailSource : DataSource {
 }
 
 public abstract class PhotoSource : MediaSource {
-    public PhotoSource(int64 object_id = INVALID_OBJECT_ID) {
+    protected PhotoSource(int64 object_id = INVALID_OBJECT_ID) {
         base (object_id);
     }
 
@@ -68,7 +68,7 @@ public abstract class VideoSource : MediaSource {
 //
 
 public abstract class EventSource : ThumbnailSource {
-    public EventSource(int64 object_id = INVALID_OBJECT_ID) {
+    protected EventSource(int64 object_id = INVALID_OBJECT_ID) {
         base (object_id);
     }
     
diff --git a/src/core/DatabaseSourceCollection.vala b/src/core/DatabaseSourceCollection.vala
index fec6825a..28083078 100644
--- a/src/core/DatabaseSourceCollection.vala
+++ b/src/core/DatabaseSourceCollection.vala
@@ -17,7 +17,7 @@ public abstract class DatabaseSourceCollection : SourceCollection {
     private Gee.HashMap<int64?, DataSource> map = new Gee.HashMap<int64?, DataSource>(int64_hash, 
         int64_equal);
         
-    public DatabaseSourceCollection(string name, GetSourceDatabaseKey source_key_func) {
+    protected DatabaseSourceCollection(string name, GetSourceDatabaseKey source_key_func) {
         base (name);
         
         this.source_key_func = source_key_func;
diff --git a/src/core/SourceCollection.vala b/src/core/SourceCollection.vala
index 066b813f..6eaf86c9 100644
--- a/src/core/SourceCollection.vala
+++ b/src/core/SourceCollection.vala
@@ -47,7 +47,7 @@ public abstract class SourceCollection : DataCollection {
     
     private Gee.MultiMap<SourceBacklink, DataSource>? backlinks = null;
     
-    public SourceCollection(string name) {
+    protected SourceCollection(string name) {
         base (name);
     }
     
diff --git a/src/editing_tools/EditingTools.vala b/src/editing_tools/EditingTools.vala
index ab2d2ffe..07e8e4e5 100644
--- a/src/editing_tools/EditingTools.vala
+++ b/src/editing_tools/EditingTools.vala
@@ -31,7 +31,7 @@ public abstract class EditingToolWindow : Gtk.Window {
     private Gtk.Frame layout_frame = new Gtk.Frame(null);
     private bool user_moved = false;
 
-    public EditingToolWindow(Gtk.Window container) {
+    protected EditingToolWindow(Gtk.Window container) {
         set_decorated(false);
         set_transient_for(container);
 
@@ -110,7 +110,7 @@ public abstract class PhotoCanvas {
     private Gdk.Pixbuf scaled_pixbuf;
     private Gdk.Rectangle scaled_position;
 
-    public PhotoCanvas(Gtk.Window container, Gdk.Window drawing_window, Photo photo,
+    protected PhotoCanvas(Gtk.Window container, Gdk.Window drawing_window, Photo photo,
         Cairo.Context default_ctx, Dimensions surface_dim, Gdk.Pixbuf scaled, Gdk.Rectangle scaled_position) 
{
         this.container = container;
         this.drawing_window = drawing_window;
@@ -471,7 +471,7 @@ public abstract class EditingTool {
 
     public signal void aborted();
 
-    public EditingTool(string name) {
+    protected EditingTool(string name) {
         this.name = name;
     }
 
@@ -2310,7 +2310,7 @@ public class AdjustTool : EditingTool {
     private abstract class AdjustToolCommand : Command {
         protected weak AdjustTool owner;
 
-        public AdjustToolCommand(AdjustTool owner, string name, string explanation) {
+        protected AdjustToolCommand(AdjustTool owner, string name, string explanation) {
             base (name, explanation);
 
             this.owner = owner;
diff --git a/src/events/EventsBranch.vala b/src/events/EventsBranch.vala
index 8980d603..097a6640 100644
--- a/src/events/EventsBranch.vala
+++ b/src/events/EventsBranch.vala
@@ -372,9 +372,6 @@ public class Events.Branch : Sidebar.Branch {
 }
 
 public abstract class Events.DirectoryEntry : Sidebar.SimplePageEntry, Sidebar.ExpandableEntry {
-    public DirectoryEntry() {
-    }
-    
     public override string? get_sidebar_icon() {
         return Events.Branch.icon;
     }
diff --git a/src/events/EventsDirectoryPage.vala b/src/events/EventsDirectoryPage.vala
index 2384a2b7..e88b1a70 100644
--- a/src/events/EventsDirectoryPage.vala
+++ b/src/events/EventsDirectoryPage.vala
@@ -42,7 +42,7 @@ public abstract class EventsDirectoryPage : CheckerboardPage {
     
     private EventsDirectorySearchViewFilter search_filter = new EventsDirectorySearchViewFilter();
 
-    public EventsDirectoryPage(string page_name, ViewManager view_manager,
+    protected EventsDirectoryPage(string page_name, ViewManager view_manager,
         Gee.Collection<Event>? initial_events) {
         base (page_name);
         
diff --git a/src/faces/FaceShape.vala b/src/faces/FaceShape.vala
index a5e76e86..b65a2398 100644
--- a/src/faces/FaceShape.vala
+++ b/src/faces/FaceShape.vala
@@ -29,7 +29,7 @@ public abstract class FaceShape : Object {
     
     private weak FacesTool.FaceWidget face_widget = null;
     
-    public FaceShape(EditingTools.PhotoCanvas canvas, double[] vec) {
+    protected FaceShape(EditingTools.PhotoCanvas canvas, double[] vec) {
         this.canvas = canvas;
         this.canvas.new_surface.connect(prepare_ctx);
         
diff --git a/src/library/LibraryBranch.vala b/src/library/LibraryBranch.vala
index f9113f5a..622162e3 100644
--- a/src/library/LibraryBranch.vala
+++ b/src/library/LibraryBranch.vala
@@ -121,9 +121,6 @@ public abstract class Library.HideablePageEntry : Sidebar.SimplePageEntry {
             visibility_changed(value);
         }
     }
-
-    public HideablePageEntry() {
-    }
 }
 
 public class Library.MainPage : CollectionPage {
diff --git a/src/photos/GdkSupport.vala b/src/photos/GdkSupport.vala
index 2fd19268..f7e18d5b 100644
--- a/src/photos/GdkSupport.vala
+++ b/src/photos/GdkSupport.vala
@@ -5,7 +5,7 @@
  */
 
 public abstract class GdkReader : PhotoFileReader {
-    public GdkReader(string filepath, PhotoFileFormat file_format) {
+    protected GdkReader(string filepath, PhotoFileFormat file_format) {
         base (filepath, file_format);
     }
     
@@ -30,7 +30,7 @@ public abstract class GdkSniffer : PhotoFileSniffer {
     private bool size_ready = false;
     private bool area_prepared = false;
     
-    public GdkSniffer(File file, PhotoFileSniffer.Options options) {
+    protected GdkSniffer(File file, PhotoFileSniffer.Options options) {
         base (file, options);
     }
     
diff --git a/src/photos/PhotoFileAdapter.vala b/src/photos/PhotoFileAdapter.vala
index df49edbc..ca7c6625 100644
--- a/src/photos/PhotoFileAdapter.vala
+++ b/src/photos/PhotoFileAdapter.vala
@@ -22,7 +22,7 @@ public abstract class PhotoFileAdapter {
     private PhotoFileFormat file_format;
     private File file = null;
     
-    public PhotoFileAdapter(string filepath, PhotoFileFormat file_format) {
+    protected PhotoFileAdapter(string filepath, PhotoFileFormat file_format) {
         this.filepath = filepath;
         this.file_format = file_format;
     }
diff --git a/src/photos/PhotoFileSniffer.vala b/src/photos/PhotoFileSniffer.vala
index 3ea1b9d3..7442fded 100644
--- a/src/photos/PhotoFileSniffer.vala
+++ b/src/photos/PhotoFileSniffer.vala
@@ -39,7 +39,7 @@ public abstract class PhotoFileSniffer {
     protected Options options;
     protected bool calc_md5;
     
-    public PhotoFileSniffer(File file, Options options) {
+    protected PhotoFileSniffer(File file, Options options) {
         this.file = file;
         this.options = options;
         
diff --git a/src/photos/PhotoMetadata.vala b/src/photos/PhotoMetadata.vala
index cd890c56..bc2fd842 100644
--- a/src/photos/PhotoMetadata.vala
+++ b/src/photos/PhotoMetadata.vala
@@ -164,7 +164,7 @@ public abstract class PhotoPreview {
     private string mime_type;
     private string extension;
     
-    public PhotoPreview(string name, Dimensions dimensions, uint32 size, string mime_type, string extension) 
{
+    protected PhotoPreview(string name, Dimensions dimensions, uint32 size, string mime_type, string 
extension) {
         this.name = name;
         this.dimensions = dimensions;
         this.size = size;
diff --git a/src/sidebar/common.vala b/src/sidebar/common.vala
index 0467ce33..ebdba518 100644
--- a/src/sidebar/common.vala
+++ b/src/sidebar/common.vala
@@ -55,9 +55,6 @@ public abstract class Sidebar.SimplePageEntry : Object, Sidebar.Entry, Sidebar.S
     Sidebar.PageRepresentative, Sidebar.Contextable {
     private Page? page = null;
     
-    public SimplePageEntry() {
-    }
-    
     public abstract string get_sidebar_name();
     
     public virtual string? get_sidebar_tooltip() {
diff --git a/src/threads/BackgroundJob.vala b/src/threads/BackgroundJob.vala
index 5d259e7d..1c83cedd 100644
--- a/src/threads/BackgroundJob.vala
+++ b/src/threads/BackgroundJob.vala
@@ -110,7 +110,7 @@ public abstract class BackgroundJob {
     private int completion_priority = Priority.HIGH;
     private int notification_priority = Priority.DEFAULT_IDLE;
     
-    public BackgroundJob(Object? owner = null, CompletionCallback? callback = null,
+    protected BackgroundJob(Object? owner = null, CompletionCallback? callback = null,
         Cancellable? cancellable = null, CancellationCallback? cancellation = null,
         AbstractSemaphore? completion_semaphore = null) {
         this.owner = owner;
diff --git a/src/threads/Semaphore.vala b/src/threads/Semaphore.vala
index 05b1f139..dcb9e6ea 100644
--- a/src/threads/Semaphore.vala
+++ b/src/threads/Semaphore.vala
@@ -27,7 +27,7 @@ public abstract class AbstractSemaphore {
     private Mutex mutex = Mutex();
     private Cond monitor = Cond();
     
-    public AbstractSemaphore(Type type) {
+    protected AbstractSemaphore(Type type) {
         assert(type == Type.SERIAL || type == Type.BROADCAST);
         
         this.type = type;


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