Commit f348dba7 authored by Jim Nelson's avatar Jim Nelson

#2061: Shotwell now compiles without error or warning with Vala 0.9.1.

parent 3ffabb12
......@@ -49,14 +49,14 @@ public class FullscreenWindow : PageWindow {
// TODO: Don't stock items supply their own tooltips?
close_button.set_tooltip_text("Leave fullscreen");
close_button.clicked += on_close;
close_button.clicked.connect(on_close);
Gtk.Toolbar toolbar = page.get_toolbar();
toolbar.set_show_arrow(false);
if (page is SlideshowPage) {
// slideshow page doesn't own toolbar to hide it, subscribe to signal instead
((SlideshowPage) page).hide_toolbar += hide_toolbar;
((SlideshowPage) page).hide_toolbar.connect(hide_toolbar);
} else {
// only non-slideshow pages should have pin button
toolbar.insert(pin_button, -1);
......@@ -69,7 +69,7 @@ public class FullscreenWindow : PageWindow {
toolbar_window.set_border_width(0);
toolbar_window.add(toolbar);
toolbar_window.realize += on_toolbar_realized;
toolbar_window.realize.connect(on_toolbar_realized);
add(page);
......
......@@ -177,14 +177,14 @@ public class BatchImport : Object {
this.cancellable = (cancellable != null) ? cancellable : new Cancellable();
// watch for user exit in the application
AppWindow.get_instance().user_quit += user_halt;
AppWindow.get_instance().user_quit.connect(user_halt);
}
~BatchImport() {
#if TRACE_DTORS
debug("DTOR: BatchImport (%s)", name);
#endif
AppWindow.get_instance().user_quit -= user_halt;
AppWindow.get_instance().user_quit.disconnect(user_halt);
}
public string get_name() {
......
......@@ -41,7 +41,7 @@ public class CameraTable {
on_update_cameras);
// listen for interesting events on the specified subsystems
client.uevent += on_udev_event;
client.uevent.connect(on_udev_event);
// because loading the camera abilities list takes a bit of time and slows down app
// startup, delay loading it (and notifying any observers) for a small period of time,
......
......@@ -590,20 +590,20 @@ public class CheckerboardLayout : Gtk.DrawingArea {
clear_drag_select();
// subscribe to the new collection
view.contents_altered += on_contents_altered;
view.items_altered += on_items_altered;
view.items_metadata_altered += on_items_metadata_altered;
view.items_state_changed += on_items_state_changed;
view.items_visibility_changed += on_items_visibility_changed;
view.ordering_changed += on_ordering_changed;
view.views_altered += on_views_altered;
view.geometries_altered += on_geometries_altered;
view.items_selected += on_items_selection_changed;
view.items_unselected += on_items_selection_changed;
view.contents_altered.connect(on_contents_altered);
view.items_altered.connect(on_items_altered);
view.items_metadata_altered.connect(on_items_metadata_altered);
view.items_state_changed.connect(on_items_state_changed);
view.items_visibility_changed.connect(on_items_visibility_changed);
view.ordering_changed.connect(on_ordering_changed);
view.views_altered.connect(on_views_altered);
view.geometries_altered.connect(on_geometries_altered);
view.items_selected.connect(on_items_selection_changed);
view.items_unselected.connect(on_items_selection_changed);
modify_bg(Gtk.StateType.NORMAL, Config.get_instance().get_bg_color());
Config.get_instance().colors_changed += on_colors_changed;
Config.get_instance().colors_changed.connect(on_colors_changed);
// CheckerboardItems offer tooltips
has_tooltip = true;
......@@ -614,27 +614,27 @@ public class CheckerboardLayout : Gtk.DrawingArea {
debug("DTOR: CheckerboardLayout for %s", view.to_string());
#endif
view.contents_altered -= on_contents_altered;
view.items_altered -= on_items_altered;
view.items_metadata_altered -= on_items_metadata_altered;
view.items_state_changed -= on_items_state_changed;
view.items_visibility_changed -= on_items_visibility_changed;
view.ordering_changed -= on_ordering_changed;
view.views_altered -= on_views_altered;
view.geometries_altered -= on_geometries_altered;
view.items_selected -= on_items_selection_changed;
view.items_unselected -= on_items_selection_changed;
view.contents_altered.disconnect(on_contents_altered);
view.items_altered.disconnect(on_items_altered);
view.items_metadata_altered.disconnect(on_items_metadata_altered);
view.items_state_changed.disconnect(on_items_state_changed);
view.items_visibility_changed.disconnect(on_items_visibility_changed);
view.ordering_changed.disconnect(on_ordering_changed);
view.views_altered.disconnect(on_views_altered);
view.geometries_altered.disconnect(on_geometries_altered);
view.items_selected.disconnect(on_items_selection_changed);
view.items_unselected.disconnect(on_items_selection_changed);
if (hadjustment != null)
hadjustment.value_changed -= on_viewport_shifted;
hadjustment.value_changed.disconnect(on_viewport_shifted);
if (vadjustment != null)
vadjustment.value_changed -= on_viewport_shifted;
vadjustment.value_changed.disconnect(on_viewport_shifted);
if (parent != null)
parent.size_allocate -= on_viewport_resized;
parent.size_allocate.disconnect(on_viewport_resized);
Config.get_instance().colors_changed -= on_colors_changed;
Config.get_instance().colors_changed.disconnect(on_colors_changed);
}
public void set_adjustments(Gtk.Adjustment hadjustment, Gtk.Adjustment vadjustment) {
......@@ -642,11 +642,11 @@ public class CheckerboardLayout : Gtk.DrawingArea {
this.vadjustment = vadjustment;
// monitor adjustment changes to report when the visible page shifts
hadjustment.value_changed += on_viewport_shifted;
vadjustment.value_changed += on_viewport_shifted;
hadjustment.value_changed.connect(on_viewport_shifted);
vadjustment.value_changed.connect(on_viewport_shifted);
// monitor parent's size changes for a similar reason
parent.size_allocate += on_viewport_resized;
parent.size_allocate.connect(on_viewport_resized);
}
// This method allows for some optimizations to occur in reflow() by using the known max.
......
......@@ -86,10 +86,10 @@ public abstract class CollectionPage : CheckerboardPage {
init_item_context_menu("/CollectionContextMenu");
get_view().set_comparator(get_sort_comparator());
get_view().contents_altered += on_contents_altered;
get_view().selection_group_altered += on_selection_changed;
get_view().items_visibility_changed += on_contents_altered;
get_view().items_altered += on_photos_altered;
get_view().contents_altered.connect(on_contents_altered);
get_view().selection_group_altered.connect(on_selection_changed);
get_view().items_visibility_changed.connect(on_contents_altered);
get_view().items_altered.connect(on_photos_altered);
get_view().freeze_notifications();
get_view().set_property(CheckerboardItem.PROP_SHOW_TITLES,
......@@ -115,7 +115,7 @@ public abstract class CollectionPage : CheckerboardPage {
rotate_button.set_tooltip_text(Resources.ROTATE_CW_TOOLTIP);
rotate_button.sensitive = false;
rotate_button.is_important = true;
rotate_button.clicked += on_rotate_clockwise;
rotate_button.clicked.connect(on_rotate_clockwise);
toolbar.insert(rotate_button, -1);
......@@ -125,7 +125,7 @@ public abstract class CollectionPage : CheckerboardPage {
enhance_button.set_tooltip_text(Resources.ENHANCE_TOOLTIP);
enhance_button.sensitive = false;
enhance_button.is_important = true;
enhance_button.clicked += on_enhance;
enhance_button.clicked.connect(on_enhance);
toolbar.insert(enhance_button, -1);
......@@ -138,7 +138,7 @@ public abstract class CollectionPage : CheckerboardPage {
slideshow_button.set_tooltip_text(_("Start a slideshow of these photos"));
slideshow_button.sensitive = false;
slideshow_button.is_important = true;
slideshow_button.clicked += on_slideshow;
slideshow_button.clicked.connect(on_slideshow);
toolbar.insert(slideshow_button, -1);
......@@ -149,7 +149,7 @@ public abstract class CollectionPage : CheckerboardPage {
publish_button.set_tooltip_text(Resources.PUBLISH_TOOLTIP);
publish_button.set_sensitive(false);
publish_button.is_important = true;
publish_button.clicked += on_publish;
publish_button.clicked.connect(on_publish);
toolbar.insert(publish_button, -1);
#endif
......@@ -163,7 +163,7 @@ public abstract class CollectionPage : CheckerboardPage {
// thumbnail size slider
slider = new Gtk.HScale(slider_adjustment);
slider.value_changed += on_slider_changed;
slider.value_changed.connect(on_slider_changed);
slider.set_draw_value(false);
Gtk.ToolItem toolitem = new Gtk.ToolItem();
......@@ -1207,8 +1207,8 @@ public abstract class CollectionPage : CheckerboardPage {
rotate_button.set_stock_id(Resources.COUNTERCLOCKWISE);
rotate_button.set_label(Resources.ROTATE_CCW_LABEL);
rotate_button.set_tooltip_text(Resources.ROTATE_CCW_TOOLTIP);
rotate_button.clicked -= on_rotate_clockwise;
rotate_button.clicked += on_rotate_counterclockwise;
rotate_button.clicked.disconnect(on_rotate_clockwise);
rotate_button.clicked.connect(on_rotate_counterclockwise);
return base.on_ctrl_pressed(event);
}
......@@ -1217,8 +1217,8 @@ public abstract class CollectionPage : CheckerboardPage {
rotate_button.set_stock_id(Resources.CLOCKWISE);
rotate_button.set_label(Resources.ROTATE_CW_LABEL);
rotate_button.set_tooltip_text(Resources.ROTATE_CW_TOOLTIP);
rotate_button.clicked -= on_rotate_counterclockwise;
rotate_button.clicked += on_rotate_clockwise;
rotate_button.clicked.disconnect(on_rotate_counterclockwise);
rotate_button.clicked.connect(on_rotate_clockwise);
return base.on_ctrl_released(event);
}
......
......@@ -18,7 +18,7 @@ public abstract class PageCommand : Command {
page = AppWindow.get_instance().get_current_page();
if (page != null) {
page.destroy += on_page_destroyed;
page.destroy.connect(on_page_destroyed);
// If the command occurred on a LibaryPhotoPage, the PageCommand must record additional
// objects to be restore it to its old state: a specific photo to focus on, a page to return
......@@ -30,8 +30,8 @@ public abstract class PageCommand : Command {
collection_page = photo_page.get_controller_page();
if (library_photo != null && collection_page != null) {
library_photo.destroyed += on_photo_destroyed;
collection_page.destroy += on_controller_destroyed;
library_photo.destroyed.connect(on_photo_destroyed);
collection_page.destroy.connect(on_controller_destroyed);
} else {
library_photo = null;
collection_page = null;
......@@ -42,13 +42,13 @@ public abstract class PageCommand : Command {
~PageCommand() {
if (page != null)
page.destroy -= on_page_destroyed;
page.destroy.disconnect(on_page_destroyed);
if (library_photo != null)
library_photo.destroyed -= on_photo_destroyed;
library_photo.destroyed.disconnect(on_photo_destroyed);
if (collection_page != null)
collection_page.destroy -= on_controller_destroyed;
collection_page.destroy.disconnect(on_controller_destroyed);
}
public void set_auto_return_to_page(bool auto_return) {
......@@ -73,17 +73,17 @@ public abstract class PageCommand : Command {
}
private void on_page_destroyed() {
page.destroy -= on_page_destroyed;
page.destroy.disconnect(on_page_destroyed);
page = null;
}
private void on_photo_destroyed() {
library_photo.destroyed -= on_photo_destroyed;
library_photo.destroyed.disconnect(on_photo_destroyed);
library_photo = null;
}
private void on_controller_destroyed() {
collection_page.destroy -= on_controller_destroyed;
collection_page.destroy.disconnect(on_controller_destroyed);
collection_page = null;
}
......@@ -97,11 +97,11 @@ public abstract class SingleDataSourceCommand : PageCommand {
this.source = source;
source.destroyed += on_source_destroyed;
source.destroyed.connect(on_source_destroyed);
}
~SingleDataSourceCommand() {
source.destroyed -= on_source_destroyed;
source.destroyed.disconnect(on_source_destroyed);
}
public DataSource get_source() {
......@@ -122,11 +122,11 @@ public abstract class SimpleProxyableCommand : PageCommand {
base (name, explanation);
proxy = proxyable.get_proxy();
proxy.broken += on_proxy_broken;
proxy.broken.connect(on_proxy_broken);
}
~SimpleProxyableCommand() {
proxy.broken -= on_proxy_broken;
proxy.broken.disconnect(on_proxy_broken);
}
public override void execute() {
......@@ -153,11 +153,11 @@ public abstract class SinglePhotoTransformationCommand : SingleDataSourceCommand
base(photo, name, explanation);
state = photo.save_transformation_state();
state.broken += on_state_broken;
state.broken.connect(on_state_broken);
}
~SinglePhotoTransformationCommand() {
state.broken -= on_state_broken;
state.broken.disconnect(on_state_broken);
}
public override void undo() {
......@@ -179,22 +179,22 @@ public abstract class GenericPhotoTransformationCommand : SingleDataSourceComman
~GenericPhotoTransformationState() {
if (original_state != null)
original_state.broken -= on_state_broken;
original_state.broken.disconnect(on_state_broken);
if (transformed_state != null)
transformed_state.broken -= on_state_broken;
transformed_state.broken.disconnect(on_state_broken);
}
public override void execute() {
TransformablePhoto photo = (TransformablePhoto) source;
original_state = photo.save_transformation_state();
original_state.broken += on_state_broken;
original_state.broken.connect(on_state_broken);
execute_on_photo(photo);
transformed_state = photo.save_transformation_state();
transformed_state.broken += on_state_broken;
transformed_state.broken.connect(on_state_broken);
}
public abstract void execute_on_photo(TransformablePhoto photo);
......@@ -269,12 +269,12 @@ public abstract class MultipleDataSourceCommand : PageCommand {
}
if (collection != null)
collection.item_destroyed += on_source_destroyed;
collection.item_destroyed.connect(on_source_destroyed);
}
~MultipleDataSourceCommand() {
if (collection != null)
collection.item_destroyed -= on_source_destroyed;
collection.item_destroyed.disconnect(on_source_destroyed);
}
public Gee.Iterable<DataSource> get_sources() {
......@@ -360,7 +360,7 @@ public abstract class MultiplePhotoTransformationCommand : MultipleDataSourceCom
foreach (DataSource source in source_list) {
TransformablePhoto photo = (TransformablePhoto) source;
PhotoTransformationState state = photo.save_transformation_state();
state.broken += on_state_broken;
state.broken.connect(on_state_broken);
map.set(photo, state);
}
......@@ -368,7 +368,7 @@ public abstract class MultiplePhotoTransformationCommand : MultipleDataSourceCom
~MultiplePhotoTransformationCommand() {
foreach (PhotoTransformationState state in map.values)
state.broken -= on_state_broken;
state.broken.disconnect(on_state_broken);
}
public override void undo_on_source(DataSource source) {
......@@ -632,22 +632,22 @@ public abstract class MovePhotosCommand : Command {
// if any of the proxies break, the show's off
if (old_event_proxy != null)
old_event_proxy.broken += on_proxy_broken;
old_event_proxy.broken.connect(on_proxy_broken);
old_photo_events.set(photo, old_event_proxy);
}
// stash the proxy of the new event
new_event_proxy = new_event.get_proxy();
new_event_proxy.broken += on_proxy_broken;
new_event_proxy.broken.connect(on_proxy_broken);
}
~RealMovePhotosCommand() {
new_event_proxy.broken -= on_proxy_broken;
new_event_proxy.broken.disconnect(on_proxy_broken);
foreach (SourceProxy? proxy in old_photo_events.values) {
if (proxy != null)
proxy.broken -= on_proxy_broken;
proxy.broken.disconnect(on_proxy_broken);
}
}
......@@ -771,11 +771,11 @@ public class DuplicateMultiplePhotosCommand : MultipleDataSourceCommand {
base (iter, _("Duplicating photos"), _("Removing duplicated photos"),
Resources.DUPLICATE_PHOTO_LABEL, Resources.DUPLICATE_PHOTO_TOOLTIP);
LibraryPhoto.global.item_destroyed += on_photo_destroyed;
LibraryPhoto.global.item_destroyed.connect(on_photo_destroyed);
}
~DuplicateMultiplePhotosCommand() {
LibraryPhoto.global.item_destroyed -= on_photo_destroyed;
LibraryPhoto.global.item_destroyed.disconnect(on_photo_destroyed);
}
private void on_photo_destroyed(DataSource source) {
......@@ -811,7 +811,7 @@ public class DuplicateMultiplePhotosCommand : MultipleDataSourceCommand {
public override void undo() {
// disconnect from monitoring the duplicates' destruction, as undo() does exactly that
LibraryPhoto.global.item_destroyed -= on_photo_destroyed;
LibraryPhoto.global.item_destroyed.disconnect(on_photo_destroyed);
base.undo();
......@@ -820,7 +820,7 @@ public class DuplicateMultiplePhotosCommand : MultipleDataSourceCommand {
failed = 0;
// re-monitor for duplicates' destruction
LibraryPhoto.global.item_destroyed += on_photo_destroyed;
LibraryPhoto.global.item_destroyed.connect(on_photo_destroyed);
}
public override void undo_on_source(DataSource source) {
......@@ -1064,19 +1064,19 @@ public class AddTagsCommand : PageCommand {
}
if (add_photos.size > 0) {
tag_proxy.broken += on_proxy_broken;
tag_proxy.broken.connect(on_proxy_broken);
map.set(tag_proxy, add_photos);
}
}
LibraryPhoto.global.item_destroyed += on_photo_destroyed;
LibraryPhoto.global.item_destroyed.connect(on_photo_destroyed);
}
~AddTagsCommand() {
foreach (SourceProxy tag_proxy in map.keys)
tag_proxy.broken -= on_proxy_broken;
tag_proxy.broken.disconnect(on_proxy_broken);
LibraryPhoto.global.item_destroyed -= on_photo_destroyed;
LibraryPhoto.global.item_destroyed.disconnect(on_photo_destroyed);
}
public override void execute() {
......@@ -1162,7 +1162,7 @@ public class ModifyTagsCommand : SingleDataSourceCommand {
SourceProxy proxy = tag.get_proxy();
to_remove.add(proxy);
proxy.broken += on_proxy_broken;
proxy.broken.connect(on_proxy_broken);
}
}
}
......@@ -1173,17 +1173,17 @@ public class ModifyTagsCommand : SingleDataSourceCommand {
SourceProxy proxy = tag.get_proxy();
to_add.add(proxy);
proxy.broken += on_proxy_broken;
proxy.broken.connect(on_proxy_broken);
}
}
}
~ModifyTagsCommand() {
foreach (SourceProxy proxy in to_add)
proxy.broken -= on_proxy_broken;
proxy.broken.disconnect(on_proxy_broken);
foreach (SourceProxy proxy in to_remove)
proxy.broken -= on_proxy_broken;
proxy.broken.disconnect(on_proxy_broken);
}
public override void execute() {
......@@ -1221,11 +1221,11 @@ public class TagUntagPhotosCommand : SimpleProxyableCommand {
this.photos = photos;
this.attach = attach;
LibraryPhoto.global.item_destroyed += on_photo_destroyed;
LibraryPhoto.global.item_destroyed.connect(on_photo_destroyed);
}
~TagPhotosCommand() {
LibraryPhoto.global.item_destroyed -= on_photo_destroyed;
LibraryPhoto.global.item_destroyed.disconnect(on_photo_destroyed);
}
public override void execute_on_source(DataSource source) {
......@@ -1260,11 +1260,11 @@ public class TrashUntrashPhotosCommand : PageCommand {
this.photos = photos;
this.to_trash = to_trash;
LibraryPhoto.global.item_destroyed += on_photo_destroyed;
LibraryPhoto.global.item_destroyed.connect(on_photo_destroyed);
}
~TrashUntrashPhotosCommand() {
LibraryPhoto.global.item_destroyed -= on_photo_destroyed;
LibraryPhoto.global.item_destroyed.disconnect(on_photo_destroyed);
}
private ProgressDialog? get_progress_dialog(bool to_trash) {
......
......@@ -216,7 +216,7 @@ public class RGBHistogramManipulator : Gtk.DrawingArea {
private int track_nub_start_position = 0;
public RGBHistogramManipulator( ) {
expose_event += on_expose;
expose_event.connect(on_expose);
set_size_request(CONTROL_WIDTH, CONTROL_HEIGHT);
if (dummy_slider == null)
dummy_slider = new Gtk.HScale(null);
......@@ -225,9 +225,9 @@ public class RGBHistogramManipulator : Gtk.DrawingArea {
add_events(Gdk.EventMask.BUTTON_PRESS_MASK);
add_events(Gdk.EventMask.BUTTON_RELEASE_MASK);
add_events(Gdk.EventMask.BUTTON_MOTION_MASK);
button_press_event += on_button_press;
button_release_event += on_button_release;
motion_notify_event += on_button_motion;
button_press_event.connect(on_button_press);
button_release_event.connect(on_button_release);
motion_notify_event.connect(on_button_motion);
}
private LocationCode hit_test_point(int x, int y) {
......
......@@ -251,11 +251,11 @@ public class DataCollection {
// if items are removed from main collection, they're removed from the marked list
// as well
owner.items_removed += on_items_removed;
owner.items_removed.connect(on_items_removed);
}
~MarkerImpl() {
owner.items_removed -= on_items_removed;
owner.items_removed.disconnect(on_items_removed);
}
public void mark(DataObject object) {
......@@ -316,7 +316,7 @@ public class DataCollection {
// the marker at this point stops monitoring the collection, preventing a possible
// removal during an iteration, which is bad.
public void freeze() {
owner.items_removed -= on_items_removed;
owner.items_removed.disconnect(on_items_removed);
}
public void finished() {
......@@ -1110,15 +1110,15 @@ public abstract class ContainerSourceCollection : DatabaseSourceCollection {
this.contained_sources = contained_sources;
this.backlink_name = backlink_name;
contained_sources.items_unlinking += on_contained_sources_unlinking;
contained_sources.items_relinked += on_contained_sources_relinked;
contained_sources.item_destroyed += on_contained_source_destroyed;
contained_sources.items_unlinking.connect(on_contained_sources_unlinking);
contained_sources.items_relinked.connect(on_contained_sources_relinked);
contained_sources.item_destroyed.connect(on_contained_source_destroyed);
}
~ContainerSourceCollection() {
contained_sources.items_unlinking -= on_contained_sources_unlinking;
contained_sources.items_relinked -= on_contained_sources_relinked;
contained_sources.item_destroyed -= on_contained_source_destroyed;
contained_sources.items_unlinking.disconnect(on_contained_sources_unlinking);
contained_sources.items_relinked.disconnect(on_contained_sources_relinked);
contained_sources.item_destroyed.disconnect(on_contained_source_destroyed);
}
public virtual void notify_container_contents_added(ContainerSource container,
......@@ -1429,18 +1429,18 @@ public class ViewCollection : DataCollection {
// subscribe to the SourceCollection to monitor it for additions and removals, reflecting
// those changes in this collection
sources.items_added += on_sources_added;
sources.items_removed += on_sources_removed;
sources.item_altered += on_source_altered;
sources.item_metadata_altered += on_source_altered;
sources.items_added.connect(on_sources_added);
sources.items_removed.connect(on_sources_removed);
sources.item_altered.connect(on_source_altered);
sources.item_metadata_altered.connect(on_source_altered);
}
public void halt_monitoring() {
if (sources != null) {
sources.items_added -= on_sources_added;
sources.items_removed -= on_sources_removed;
sources.item_altered -= on_source_altered;
sources.item_metadata_altered -= on_source_altered;
sources.items_added.disconnect(on_sources_added);
sources.items_removed.disconnect(on_sources_removed);
sources.item_altered.disconnect(on_source_altered);
sources.item_metadata_altered.disconnect(on_source_altered);
}
sources = null;
......@@ -1458,14 +1458,14 @@ public class ViewCollection : DataCollection {
// load up with current items
on_mirror_contents_added(mirroring.get_all());
mirroring.items_added += on_mirror_contents_added;
mirroring.items_removed += on_mirror_contents_removed;
mirroring.items_added.connect(on_mirror_contents_added);
mirroring.items_removed.connect(on_mirror_contents_removed);
}
public void halt_mirroring() {
if (mirroring != null) {
mirroring.items_added -= on_mirror_contents_added;
mirroring.items_removed -= on_mirror_contents_removed;
mirroring.items_added.disconnect(on_mirror_contents_added);
mirroring.items_removed.disconnect(on_mirror_contents_removed);
}
mirroring = null;
......
......@@ -714,18 +714,18 @@ public abstract class SourceProxy {
snapshot = source.save_snapshot();
assert(snapshot != null);
snapshot.broken += on_snapshot_broken;
snapshot.broken.connect(on_snapshot_broken);
set_source(source);
membership = (SourceCollection) source.get_membership();
assert(membership != null);
membership.items_added += on_source_added;
membership.items_added.connect(on_source_added);
}
~SourceProxy() {
drop_source();
membership.items_added -= on_source_added;
membership.items_added.disconnect(on_source_added);
}
public abstract DataSource reconstitute(int64 object_id, SourceSnapshot snapshot);
......@@ -752,14 +752,14 @@ public abstract class SourceProxy {
drop_source();
this.source = source;
source.destroyed += on_destroyed;
source.destroyed.connect(on_destroyed);
}
private void drop_source() {
if (source == null)
return;
source.destroyed -= on_destroyed;
source.destroyed.disconnect(on_destroyed);
source = null;
}
......
......@@ -125,11 +125,11 @@ public class ExportDialog : Gtk.Dialog {
pixels_entry.set_text("%d".printf(current_scale));
// register after preparation to avoid signals during init
constraint_combo.changed += on_constraint_changed;
format_combo.changed += on_format_changed;
pixels_entry.changed += on_pixels_changed;
pixels_entry.insert_text += on_pixels_insert_text;
pixels_entry.activate += on_activate;
constraint_combo.changed.connect(on_constraint_changed);
format_combo.changed.connect(on_format_changed);
pixels_entry.changed.connect(on_pixels_changed);
pixels_entry.insert_text.connect(on_pixels_insert_text);
pixels_entry.activate.connect(on_activate);
// layout controls
add_label(_("_Format:"), 0, 0, format_combo);
......@@ -610,7 +610,7 @@ public class ProgressDialog : Gtk.Window {
if (cancellable != null) {
cancel_button = new Gtk.Button.from_stock(Gtk.STOCK_CANCEL);
cancel_button.clicked += on_cancel;
cancel_button.clicked.connect(on_cancel);
}
Gtk.HBox hbox = new Gtk.HBox(false, 8);
......@@ -739,32 +739,32 @@ public class AdjustDateTimeDialog : Gtk.Dialog {
set_title(Resources.ADJUST_DATE_TIME_LABEL);
calendar = new Gtk.Calendar();
calendar.day_selected += on_time_changed;
calendar.month_changed += on_time_changed;
calendar.next_year += on_time_changed;
calendar.prev_year += on_time_changed;
calendar.day_selected.connect(on_time_changed);
calendar.month_changed.connect(on_time_changed);
calendar.next_year.connect(on_time_changed);
calendar.prev_year.connect(on_time_changed);
if (Config.get_instance().get_24_hr_time())