Commit c594f79b authored by Jens Georg's avatar Jens Georg

Make constructors of abstract classes protected

parent abb068db
Pipeline #68208 passed with stages
in 15 minutes and 18 seconds
......@@ -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;
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -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();
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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;
}
......
......@@ -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);
}
......
......@@ -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(),
",");
}
......
......@@ -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();
......
......@@ -51,9 +51,6 @@
public abstract class TransactionController {
private int count = 0;
public TransactionController() {
}
~TransactionController() {
lock (count) {
assert(count == 0);
......
......@@ -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();
......
......@@ -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;
......
......@@ -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());
......
......@@ -69,9 +69,6 @@ public abstract class PhotoTransformationState : Object {
is_broke = true;
}
protected PhotoTransformationState() {
}
public bool is_broken() {
return is_broke;
}
......
......@@ -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;
......
......@@ -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());
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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();
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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);
......
......@@ -121,9 +121,6 @@ public abstract class Library.HideablePageEntry : Sidebar.SimplePageEntry {
visibility_changed(value);
}
}
public HideablePageEntry() {
}
}
public class Library.MainPage : CollectionPage {
......
......@@ -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);
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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() {
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment