diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bc32b73c5..385583829 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -25,7 +25,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
- apt install -y libchamplain-0.12-dev libchamplain-gtk-0.12-dev libclutter-1.0-dev libecal2.0-dev libedataserver1.2-dev libedataserverui1.2-dev libfolks-dev libgee-0.8-dev libgeoclue-2-dev libgeocode-glib-dev libglib2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev libical-dev libportal-dev libportal-gtk3-dev meson valac
+ apt install -y libadwaita-1-dev libecal2.0-dev libedataserver1.2-dev libedataserverui4-dev libfolks-dev libgee-0.8-dev libgeoclue-2-dev libgeocode-glib-dev libglib2.0-dev libgranite-7-dev libgtk-4-dev libical-dev libportal-dev libportal-gtk4-dev libshumate-dev meson valac
- name: Build and Test
env:
DESTDIR: out
diff --git a/README.md b/README.md
index 4885658ee..332ba14d0 100644
--- a/README.md
+++ b/README.md
@@ -7,9 +7,7 @@
You'll need the following dependencies:
-* libchamplain-0.12-dev
-* libchamplain-gtk-0.12-dev
-* libclutter-1.0-dev
+* libadwaita-1-dev
* libecal1.2-dev
* libedataserverui1.2-dev >=3.46
* libfolks-dev
@@ -17,10 +15,10 @@ You'll need the following dependencies:
* libgeocode-glib-dev
* libgeoclue-2-dev
* libglib2.0-dev
-* libgranite-dev >= 6.2.0
-* libgtk-3-dev
+* libgranite-7-dev >= 7.7.0
+* libgtk-4-dev >= 4.12
* libical-dev
-* libhandy-1-dev >= 0.90.0
+* libshumate-dev
* meson
* valac
diff --git a/core/GesturesUtils.vala b/core/GesturesUtils.vala
index 5097bb938..48adba0b9 100644
--- a/core/GesturesUtils.vala
+++ b/core/GesturesUtils.vala
@@ -23,7 +23,7 @@ namespace Maya.GesturesUtils {
static bool has_scrolled = false;
const uint INTERVAL = 500;
- public void on_scroll (Gtk.EventControllerScroll scroll_controller, double delta_x, double delta_y) {
+ public bool on_scroll (Gtk.EventControllerScroll scroll_controller, double delta_x, double delta_y) {
double choice = delta_x;
if (((int)delta_x).abs () < ((int)delta_y).abs ()) {
choice = delta_y;
@@ -33,27 +33,29 @@ namespace Maya.GesturesUtils {
if (choice == 1 || choice == -1) {
Calendar.EventStore.get_default ().change_month ((int) choice);
scroll_controller.reset ();
- return;
+ return true;
}
if (has_scrolled == true) {
scroll_controller.reset ();
- return;
+ return true;
}
if (choice > 0.3) {
reset_timer.begin ();
Calendar.EventStore.get_default ().change_month (1);
scroll_controller.reset ();
- return;
+ return true;
}
if (choice < -0.3) {
reset_timer.begin ();
Calendar.EventStore.get_default ().change_month (-1);
scroll_controller.reset ();
- return;
+ return true;
}
+
+ return false;
}
public async void reset_timer () {
diff --git a/data/io.elementary.calendar.gschema.xml b/data/io.elementary.calendar.gschema.xml
index f531321a0..6cd6074c0 100644
--- a/data/io.elementary.calendar.gschema.xml
+++ b/data/io.elementary.calendar.gschema.xml
@@ -12,10 +12,15 @@
Whether the window was maximized on last run
Whether the window was maximized on last run
-
- (1024, 750)
- Most recent window size
- Most recent window size (width, height)
+
+ 750
+ Most recent window height
+ Most recent window height
+
+
+ 1024
+ Most recent window width
+ Most recent window width
true
diff --git a/data/meson.build b/data/meson.build
index 515473194..f9e09f927 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -50,7 +50,7 @@ i18n.merge_file(
i18n.merge_file(
input: 'calendar.metainfo.xml.in',
output: meson.project_name() + '.metainfo.xml',
- po_dir: meson.source_root() / 'po' / 'extra',
+ po_dir: meson.project_source_root() / 'po' / 'extra',
type: 'xml',
install: true,
install_dir: get_option('datadir') / 'metainfo',
diff --git a/meson.build b/meson.build
index 044af293b..2fc8faeb8 100644
--- a/meson.build
+++ b/meson.build
@@ -22,30 +22,21 @@ gnome = import('gnome')
i18n = import('i18n')
pkgconfig = import('pkgconfig')
+adw_dep = dependency('libadwaita-1', version: '>=1.0.0')
glib_dep = dependency('glib-2.0')
gee_dep = dependency('gee-0.8')
-granite_dep = dependency('granite', version: '>=6.2.0')
-gtk_dep = dependency('gtk+-3.0', version: '>=3.22')
-handy_dep = dependency('libhandy-1', version: '>=0.90.0')
-libedataserver_dep = dependency('libedataserver-1.2', version: '>=3.8.0')
-libedataserverui_dep = dependency('libedataserverui-1.2', version: '>=3.46')
+granite_dep = dependency('granite-7', version: '>=7.7.0')
+gtk_dep = dependency('gtk4', version: '>=4.12')
+libedataserver_dep = dependency('libedataserver-1.2', version: '>=3.45.1')
+libedataserverui_dep = dependency('libedataserverui4-1.0', version: '>= 3.46.4')
geocode_glib_dep = dependency('geocode-glib-2.0')
gmodule_dep = dependency('gmodule-2.0')
-champlain_dep = dependency('champlain-0.12', fallback: ['libchamplain', 'libchamplain_dep'], default_options: ['default_library=static', 'introspection=false', 'vapi=false'])
-champlain_gtk_dep = dependency('champlain-gtk-0.12', fallback: ['libchamplain', 'libchamplain_gtk_dep'], default_options: ['default_library=static', 'introspection=false', 'vapi=false'])
-# We need to force the inclusion of the Vapi in case of fallback
-if (champlain_dep.type_name() == 'internal')
- vapi_dir = meson.current_source_dir() / 'vapi'
- champlain_dep = [champlain_dep, meson.get_compiler('vala').find_library('champlain-0.12', dirs: vapi_dir)]
- champlain_gtk_dep = [champlain_gtk_dep, meson.get_compiler('vala').find_library('champlain-gtk-0.12', dirs: vapi_dir)]
-endif
-clutter_dep = dependency('clutter-1.0')
-clutter_gtk_dep = dependency('clutter-gtk-1.0')
folks_dep = dependency('folks')
gclue_dep = dependency('libgeoclue-2.0')
libecal_dep = dependency('libecal-2.0')
libical_dep = dependency('libical-glib')
-libportal_dep = [ dependency('libportal'), dependency('libportal-gtk3') ]
+libportal_dep = [ dependency('libportal'), dependency('libportal-gtk4') ]
+shumate_dep = dependency('shumate-1.0')
add_project_arguments('-DLIBICAL_GLIB_UNSTABLE_API=1', language: 'c')
diff --git a/src/AgendaView.vala b/src/AgendaView.vala
index b0fbeec5a..e9cc19053 100644
--- a/src/AgendaView.vala
+++ b/src/AgendaView.vala
@@ -10,7 +10,7 @@
public class Maya.View.AgendaView : Gtk.Box {
public signal void event_removed (ECal.Component event);
- public Hdy.HeaderBar header_bar { get; private set; }
+ public Adw.HeaderBar header_bar { get; private set; }
private Gtk.Label day_label;
private Gtk.Label weekday_label;
@@ -21,7 +21,7 @@ public class Maya.View.AgendaView : Gtk.Box {
construct {
var application_instance = ((Gtk.Application) GLib.Application.get_default ());
- var button_add = new Gtk.Button.from_icon_name ("appointment-new", Gtk.IconSize.LARGE_TOOLBAR) {
+ var button_add = new Gtk.Button.from_icon_name ("appointment-new") {
action_name = Maya.MainWindow.ACTION_PREFIX + Maya.MainWindow.ACTION_NEW_EVENT
};
button_add.tooltip_markup = Granite.markup_accel_tooltip (
@@ -33,21 +33,19 @@ public class Maya.View.AgendaView : Gtk.Box {
margin_start = 6,
xalign = 0
};
- weekday_label.get_style_context ().add_class (Granite.STYLE_CLASS_H2_LABEL);
+ weekday_label.add_css_class (Granite.STYLE_CLASS_H2_LABEL);
- header_bar = new Hdy.HeaderBar () {
- show_close_button = true
- };
+ header_bar = new Adw.HeaderBar ();
header_bar.pack_start (weekday_label);
header_bar.pack_end (button_add);
- header_bar.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
+ header_bar.add_css_class (Granite.STYLE_CLASS_FLAT);
day_label = new Gtk.Label ("") {
margin_start = 12,
margin_end = 12,
xalign = 0
};
- day_label.get_style_context ().add_class (Granite.STYLE_CLASS_H3_LABEL);
+ day_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);
var placeholder_label = new Gtk.Label (_("Your upcoming events will be displayed here when you select a date with events.")) {
wrap = true,
@@ -56,8 +54,7 @@ public class Maya.View.AgendaView : Gtk.Box {
margin_end = 12,
justify = CENTER
};
- placeholder_label.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
- placeholder_label.show_all ();
+ placeholder_label.add_css_class (Granite.CssClass.DIM);
selected_date_events_list = new Gtk.ListBox () {
activate_on_single_click = false,
@@ -103,20 +100,20 @@ public class Maya.View.AgendaView : Gtk.Box {
});
var box = new Gtk.Box (VERTICAL, 0);
- box.add (day_label);
- box.add (selected_date_events_list);
- box.add (upcoming_events_list);
+ box.append (day_label);
+ box.append (selected_date_events_list);
+ box.append (upcoming_events_list);
- var scrolled_window = new Gtk.ScrolledWindow (null, null) {
+ var scrolled_window = new Gtk.ScrolledWindow () {
hscrollbar_policy = NEVER,
child = box,
vexpand = true
};
orientation = VERTICAL;
- add (header_bar);
- add (scrolled_window);
- get_style_context ().add_class (Gtk.STYLE_CLASS_VIEW);
+ append (header_bar);
+ append (scrolled_window);
+ add_css_class (Granite.STYLE_CLASS_VIEW);
// Listen to changes for events
var calmodel = Calendar.EventStore.get_default ();
@@ -129,7 +126,6 @@ public class Maya.View.AgendaView : Gtk.Box {
time_manager.on_update_today.connect (on_today_changed);
set_selected_date (Maya.Application.get_selected_datetime ());
- show_all ();
selected_date_events_list.row_activated.connect (activate_eventrow);
upcoming_events_list.row_activated.connect (activate_eventrow);
@@ -303,13 +299,11 @@ public class Maya.View.AgendaView : Gtk.Box {
foreach (var event in events) {
var row = new AgendaEventRow (source, event, false);
row.removed.connect ((event) => (event_removed (event)));
- row.show_all ();
- selected_date_events_list.add (row);
+ selected_date_events_list.append (row);
var row2 = new AgendaEventRow (source, event, true);
row2.removed.connect ((event) => (event_removed (event)));
- row2.show_all ();
- upcoming_events_list.add (row2);
+ upcoming_events_list.append (row2);
}
}
@@ -372,13 +366,8 @@ public class Maya.View.AgendaView : Gtk.Box {
* Calendar model parameters have been updated.
*/
private void on_model_parameters_changed () {
- foreach (unowned var row in selected_date_events_list.get_children ()) {
- row.destroy ();
- }
-
- foreach (unowned var row in upcoming_events_list.get_children ()) {
- row.destroy ();
- }
+ selected_date_events_list.remove_all ();
+ upcoming_events_list.remove_all ();
}
private void on_today_changed () {
diff --git a/src/Application.vala b/src/Application.vala
index 7e5aac933..df0ba5222 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -63,25 +63,8 @@ namespace Maya {
protected override void startup () {
base.startup ();
- Hdy.init ();
-
- var style_provider = new Gtk.CssProvider ();
- style_provider.load_from_resource ("/io/elementary/calendar/Application.css");
-
- Gtk.StyleContext.add_provider_for_screen (
- Gdk.Screen.get_default (),
- style_provider,
- Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
- );
-
- var granite_settings = Granite.Settings.get_default ();
- var gtk_settings = Gtk.Settings.get_default ();
-
- gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK;
-
- granite_settings.notify["prefers-color-scheme"].connect (() => {
- gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK;
- });
+ Granite.init ();
+ Adw.init ();
var quit_action = new SimpleAction ("quit", null);
quit_action.activate.connect (quit);
@@ -159,17 +142,23 @@ namespace Maya {
* Initializes the graphical window and its components
*/
void init_gui () {
- var rect = Gtk.Allocation ();
- saved_state.get ("window-size", "(ii)", out rect.width, out rect.height);
-
window = new MainWindow (this);
window.title = _(Build.APP_NAME);
- window.set_allocation (rect);
+
+ /*
+ * This is very finicky. Bind size after present else set_titlebar gives us bad sizes
+ * Set maximize after height/width else window is min size on unmaximize
+ * Bind maximize as SET else get get bad sizes
+ */
+ saved_state.bind ("window-height", window, "default-height", SettingsBindFlags.DEFAULT);
+ saved_state.bind ("window-width", window, "default-width", SettingsBindFlags.DEFAULT);
if (saved_state.get_boolean ("window-maximized")) {
window.maximize ();
}
+ saved_state.bind ("window-maximized", window, "maximized", SettingsBindFlags.SET);
+
window.destroy.connect (on_quit);
}
@@ -225,7 +214,6 @@ namespace Maya {
warning (e.message);
}
- GtkClutter.init (ref args);
var app = new Application ();
int res = app.run (args);
diff --git a/src/EventEdition/EventDialog.vala b/src/EventEdition/EventDialog.vala
index cdc4946ff..0e94dfda6 100644
--- a/src/EventEdition/EventDialog.vala
+++ b/src/EventEdition/EventDialog.vala
@@ -143,14 +143,14 @@ public class EventDialog : Granite.Dialog {
halign = START,
hexpand = true
};
- delete_button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
+ delete_button.add_css_class (Granite.CssClass.DESTRUCTIVE);
delete_button.clicked.connect (remove_event);
- buttonbox.add (delete_button);
+ buttonbox.append (delete_button);
}
var create_button = new Gtk.Button ();
- create_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
+ create_button.add_css_class (Granite.CssClass.SUGGESTED);
create_button.clicked.connect (save_dialog);
if (date_time != null) {
@@ -163,20 +163,19 @@ public class EventDialog : Granite.Dialog {
var cancel_button = new Gtk.Button.with_label (_("Cancel"));
cancel_button.clicked.connect (() => {this.destroy ();});
- buttonbox.add (cancel_button);
- buttonbox.add (create_button);
+ buttonbox.append (cancel_button);
+ buttonbox.append (create_button);
var button_sizegroup = new Gtk.SizeGroup (HORIZONTAL);
button_sizegroup.add_widget (cancel_button);
button_sizegroup.add_widget (create_button);
- var box = new Gtk.Box (VERTICAL, 24);
- box.add (stack_switcher);
- box.add (stack);
- box.add (buttonbox);
- box.show_all ();
+ var box = new Granite.Box (VERTICAL, DOUBLE);
+ box.append (stack_switcher);
+ box.append (stack);
+ box.append (buttonbox);
- get_content_area ().add (box);
+ get_content_area ().append (box);
info_panel.valid_event.connect ((is_valid) => {
create_button.sensitive = is_valid;
diff --git a/src/EventEdition/GuestGrid.vala b/src/EventEdition/GuestGrid.vala
index 023116a1b..e56152c6c 100644
--- a/src/EventEdition/GuestGrid.vala
+++ b/src/EventEdition/GuestGrid.vala
@@ -14,7 +14,7 @@ public class Maya.View.EventEdition.GuestGrid : Gtk.Grid {
private Gtk.Label mail_label;
private Gtk.Label name_label;
- private Hdy.Avatar avatar;
+ private Adw.Avatar avatar;
public GuestGrid (ICal.Property attendee) {
Object (attendee: attendee.clone ());
@@ -24,7 +24,7 @@ public class Maya.View.EventEdition.GuestGrid : Gtk.Grid {
var status_label = new Gtk.Label ("") {
justify = RIGHT
};
- status_label.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL);
+ status_label.add_css_class (Granite.STYLE_CLASS_H4_LABEL);
var mail = attendee.get_attendee ().replace ("mailto:", "");
@@ -39,12 +39,12 @@ public class Maya.View.EventEdition.GuestGrid : Gtk.Grid {
xalign = 0
};
- var remove_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic", BUTTON) {
+ var remove_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic") {
relief = NONE,
valign = CENTER
};
- avatar = new Hdy.Avatar (ICON_SIZE, name_label.label, true);
+ avatar = new Adw.Avatar (ICON_SIZE, name_label.label, true);
column_spacing = 12;
margin = 6;
@@ -61,15 +61,15 @@ public class Maya.View.EventEdition.GuestGrid : Gtk.Grid {
switch (parameter.get_partstat ()) {
case ICal.ParameterPartstat.ACCEPTED:
status_label.label = _("Accepted");
- status_label.get_style_context ().add_class ("success");
+ status_label.add_css_class (Granite.CssClass.SUCCESS);
break;
case ICal.ParameterPartstat.DECLINED:
status_label.label = _("Declined");
- status_label.get_style_context ().add_class (Gtk.STYLE_CLASS_ERROR);
+ status_label.add_css_class (Granite.CssClass.ERROR);
break;
case ICal.ParameterPartstat.TENTATIVE:
status_label.label = _("Maybe");
- status_label.get_style_context ().add_class (Gtk.STYLE_CLASS_ERROR);
+ status_label.add_css_class (Granite.CssClass.WARNING);
break;
default:
break;
diff --git a/src/EventEdition/GuestsPanel.vala b/src/EventEdition/GuestsPanel.vala
index 926a0a5d7..ae4d2bb4f 100644
--- a/src/EventEdition/GuestsPanel.vala
+++ b/src/EventEdition/GuestsPanel.vala
@@ -59,7 +59,7 @@ public class Maya.View.EventEdition.GuestsPanel : Gtk.Grid {
unowned Gtk.StyleContext no_guests_context = no_guests_label.get_style_context ();
no_guests_context.add_class (Granite.STYLE_CLASS_H3_LABEL);
- no_guests_context.add_class (Gtk.STYLE_CLASS_DIM_LABEL);
+ no_guests_context.add_class (Granite.CssClass.DIM_LABEL);
guest_list = new Gtk.ListBox ();
guest_list.set_selection_mode (Gtk.SelectionMode.NONE);
diff --git a/src/EventEdition/InfoPanel.vala b/src/EventEdition/InfoPanel.vala
index c40df4931..6a92f4688 100644
--- a/src/EventEdition/InfoPanel.vala
+++ b/src/EventEdition/InfoPanel.vala
@@ -21,11 +21,11 @@
public class Maya.View.EventEdition.InfoPanel : Gtk.Grid {
private Gtk.Entry title_entry;
private Granite.HyperTextView comment_textview;
- private Granite.Widgets.DatePicker from_date_picker;
- private Granite.Widgets.DatePicker to_date_picker;
+ private Granite.DatePicker from_date_picker;
+ private Granite.DatePicker to_date_picker;
private Gtk.Switch allday_switch;
- private Granite.Widgets.TimePicker from_time_picker;
- private Granite.Widgets.TimePicker to_time_picker;
+ private Granite.TimePicker from_time_picker;
+ private Granite.TimePicker to_time_picker;
private Gtk.Label timezone_label;
private Widgets.CalendarChooser calchooser;
@@ -161,8 +161,8 @@ public class Maya.View.EventEdition.InfoPanel : Gtk.Grid {
};
var button_box = new Gtk.Box (HORIZONTAL, 6);
- button_box.add (current_calendar_grid);
- button_box.add (new Gtk.Image.from_icon_name ("pan-down-symbolic", Gtk.IconSize.MENU));
+ button_box.append (current_calendar_grid);
+ button_box.append (new Gtk.Image.from_icon_name ("pan-down-symbolic"));
var calendar_button = new Gtk.MenuButton () {
child = button_box,
@@ -373,15 +373,15 @@ public class Maya.View.EventEdition.InfoPanel : Gtk.Grid {
timezone_label.label = timezone.get_display_name ();
}
- Granite.Widgets.DatePicker make_date_picker () {
+ Granite.DatePicker make_date_picker () {
var format = Granite.DateTime.get_default_date_format (false, true, true);
- var date_picker = new Granite.Widgets.DatePicker.with_format (format);
+ var date_picker = new Granite.DatePicker.with_format (format);
date_picker.width_request = 200;
return date_picker;
}
- Granite.Widgets.TimePicker make_time_picker () {
- var time_picker = new Granite.Widgets.TimePicker ();
+ Granite.TimePicker make_time_picker () {
+ var time_picker = new Granite.TimePicker ();
time_picker.width_request = 120;
return time_picker;
}
diff --git a/src/EventEdition/LocationPanel.vala b/src/EventEdition/LocationPanel.vala
index be47e11d9..5fdec97e8 100644
--- a/src/EventEdition/LocationPanel.vala
+++ b/src/EventEdition/LocationPanel.vala
@@ -10,8 +10,8 @@ public class Maya.View.EventEdition.LocationPanel : Gtk.Box {
private Gtk.SearchEntry location_entry;
private Gtk.ListStore location_store;
- private GtkChamplain.Embed champlain_embed;
- private Maya.Marker point;
+ private Shumate.SimpleMap simple_map;
+ private Shumate.Marker point;
// Only set the geo property if map_selected is true, this is a smart behavior!
private bool map_selected = false;
private GLib.Cancellable search_cancellable;
@@ -60,24 +60,31 @@ public class Maya.View.EventEdition.LocationPanel : Gtk.Box {
mnemonic_widget = location_entry
};
- champlain_embed = new GtkChamplain.Embed ();
+ simple_map = new Shumate.SimpleMap () {
+ map_source = registry.get_by_id (Shumate.MAP_SOURCE_OSM_MAPNIK)
+ };
- point = new Maya.Marker ();
+ point = new Shumate.Marker () {
+ child = new Gtk.Image.from_icon_name ("location-marker") {
+ icon_size = LARGE
+ }
+ };
point.draggable = parent_dialog.can_edit;
point.drag_finish.connect (() => {
map_selected = true;
find_location.begin (point.latitude, point.longitude);
});
- var marker_layer = new Champlain.MarkerLayer.full (SINGLE);
+ var marker_layer = new Shumate.MarkerLayer.full (simple_map.viewport, SINGLE);
marker_layer.add_marker (point);
- var view = champlain_embed.champlain_view;
+ var view = simple_map.viewport;
view.zoom_level = 10;
- view.goto_animation_duration = 500;
- view.add_layer (marker_layer);
- view.center_on (point.latitude, point.longitude);
+ var map = simple_map.map;
+ map.go_to_duration = 500;
+ map.add_layer (marker_layer);
+ map.center_on (point.latitude, point.longitude);
load_contact.begin ();
@@ -110,8 +117,8 @@ public class Maya.View.EventEdition.LocationPanel : Gtk.Box {
if (geo != null) {
var latitude = geo.get_lat ();
var longitude = geo.get_lon ();
- if (latitude >= Champlain.MIN_LATITUDE && longitude >= Champlain.MIN_LONGITUDE &&
- latitude <= Champlain.MAX_LATITUDE && longitude <= Champlain.MAX_LONGITUDE) {
+ if (latitude >= Shumate.MIN_LATITUDE && longitude >= Shumate.MIN_LONGITUDE &&
+ latitude <= Shumate.MAX_LATITUDE && longitude <= Shumate.MAX_LONGITUDE) {
need_relocation = false;
point.latitude = latitude;
point.longitude = longitude;
@@ -298,24 +305,3 @@ public class Maya.View.EventEdition.LocationPanel : Gtk.Box {
return true;
}
}
-
-public class Maya.Marker : Champlain.Marker {
- public Marker () {
- try {
- weak Gtk.IconTheme icon_theme = Gtk.IconTheme.get_default ();
- var pixbuf = icon_theme.load_icon ("location-marker", 32, Gtk.IconLookupFlags.GENERIC_FALLBACK);
- Clutter.Image image = new Clutter.Image ();
- image.set_data (pixbuf.get_pixels (),
- pixbuf.has_alpha ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888,
- pixbuf.width,
- pixbuf.height,
- pixbuf.rowstride);
- content = image;
- set_size (pixbuf.width, pixbuf.height);
- translation_x = -pixbuf.width / 2;
- translation_y = -pixbuf.height;
- } catch (Error e) {
- critical (e.message);
- }
- }
-}
diff --git a/src/EventEdition/ReminderPanel.vala b/src/EventEdition/ReminderPanel.vala
index 0f72164b5..c9bb100db 100644
--- a/src/EventEdition/ReminderPanel.vala
+++ b/src/EventEdition/ReminderPanel.vala
@@ -17,8 +17,8 @@ public class Maya.View.EventEdition.ReminderPanel : Gtk.Box {
var no_reminder_label = new Gtk.Label (_("No Reminders"));
no_reminder_label.show ();
- no_reminder_label.get_style_context ().add_class (Granite.STYLE_CLASS_H3_LABEL);
- no_reminder_label.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
+ no_reminder_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);
+ no_reminder_label.add_css_class (Granite.CssClass.DIM_LABEL);
reminders = new Gee.ArrayList ();
reminders_to_remove = new Gee.ArrayList ();
@@ -41,21 +41,21 @@ public class Maya.View.EventEdition.ReminderPanel : Gtk.Box {
};
var add_button_box = new Gtk.Box (HORIZONTAL, 0);
- add_button_box.add (new Gtk.Image.from_icon_name ("list-add-symbolic", BUTTON));
- add_button_box.add (new Gtk.Label (_("Add Reminder")));
+ add_button_box.append (new Gtk.Image.from_icon_name ("list-add-symbolic", BUTTON));
+ add_button_box.append (new Gtk.Label (_("Add Reminder")));
var add_button = new Gtk.Button () {
- child = add_button_box
+ child = add_button_box,
+ has_frame = false
};
- add_button.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
var inline_toolbar = new Gtk.ActionBar ();
- inline_toolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
+ inline_toolbar.add_css_class (Granite.CssClass.FLAT);
inline_toolbar.pack_start (add_button);
var box = new Gtk.Box (VERTICAL, 0);
- box.add (scrolled);
- box.add (inline_toolbar);
+ box.append (scrolled);
+ box.append (inline_toolbar);
var frame = new Gtk.Frame (null) {
child = box,
@@ -189,10 +189,10 @@ public class Maya.View.EventEdition.ReminderGrid : Gtk.ListBoxRow {
}
});
- var remove_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic", BUTTON) {
+ var remove_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic") {
relief = NONE
};
- remove_button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
+ remove_button.add_css_class (Granite.CssClass.DESTRUCTIVE);
var box = new Gtk.Box (HORIZONTAL, 6) {
margin_top = 6,
@@ -200,8 +200,8 @@ public class Maya.View.EventEdition.ReminderGrid : Gtk.ListBoxRow {
margin_bottom = 6,
margin_start = 6
};
- box.add (time);
- box.add (remove_button);
+ box.append (time);
+ box.append (remove_button);
child = box;
diff --git a/src/EventEdition/RepeatPanel.vala b/src/EventEdition/RepeatPanel.vala
index 45d4a369e..854177b74 100644
--- a/src/EventEdition/RepeatPanel.vala
+++ b/src/EventEdition/RepeatPanel.vala
@@ -11,7 +11,7 @@ public class Maya.View.EventEdition.RepeatPanel : Gtk.Grid {
private Gtk.ComboBoxText repeat_combobox;
private Gtk.ComboBoxText ends_combobox;
private Gtk.SpinButton end_entry;
- private Granite.Widgets.DatePicker end_datepicker;
+ private Granite.DatePicker end_datepicker;
private Gtk.Box week_box;
private Gtk.SpinButton every_entry;
private Gtk.ListBox exceptions_list;
@@ -24,8 +24,8 @@ public class Maya.View.EventEdition.RepeatPanel : Gtk.Grid {
private Gtk.ToggleButton sat_button;
private Gtk.ToggleButton sun_button;
- private Gtk.RadioButton every_radiobutton;
- private Gtk.RadioButton same_radiobutton;
+ private Gtk.CheckButton every_radiobutton;
+ private Gtk.CheckButton same_radiobutton;
public RepeatPanel (EventDialog parent_dialog) {
this.parent_dialog = parent_dialog;
@@ -763,7 +763,7 @@ public class Maya.View.EventEdition.RepeatPanel : Gtk.Grid {
}
public class Maya.View.EventEdition.ExceptionGrid : Gtk.ListBoxRow {
- private Granite.Widgets.DatePicker date;
+ private Granite.DatePicker date;
public ExceptionGrid (GLib.DateTime dt) {
date = new Granite.Widgets.DatePicker () {
@@ -771,13 +771,13 @@ public class Maya.View.EventEdition.ExceptionGrid : Gtk.ListBoxRow {
hexpand = true
};
- var remove_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic", BUTTON) {
- relief = NONE
+ var remove_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic") {
+ has_frame = false
};
var box = new Gtk.Box (HORIZONTAL, 12);
- box.add (date);
- box.add (remove_button);
+ box.append (date);
+ box.append (remove_button);
margin_top = 6;
margin_start = 6;
diff --git a/src/Grid/CalendarView.vala b/src/Grid/CalendarView.vala
index 90a4a2085..349a38f79 100644
--- a/src/Grid/CalendarView.vala
+++ b/src/Grid/CalendarView.vala
@@ -21,12 +21,11 @@ public class Maya.View.CalendarView : Gtk.Box {
public DateTime? selected_date { get; private set; }
public Gtk.SearchEntry search_bar { get; private set; }
- public Hdy.HeaderBar header_bar { get; private set; }
+ public Adw.HeaderBar header_bar { get; private set; }
private Calendar.Widgets.DateSwitcher month_switcher;
private Calendar.Widgets.DateSwitcher year_switcher;
private Grid days_grid;
- private Gtk.EventControllerScroll scroll_controller;
private Gtk.Stack stack;
private WeekLabels weeks;
@@ -52,20 +51,19 @@ public class Maya.View.CalendarView : Gtk.Box {
selected_date = Maya.Application.get_selected_datetime ();
var error_label = new Gtk.Label (null);
- error_label.show ();
var error_bar = new Gtk.InfoBar () {
message_type = Gtk.MessageType.ERROR,
revealed = false,
show_close_button = true
};
- error_bar.get_content_area ().add (error_label);
+ error_bar.add_child (error_label);
var info_bar = new Calendar.Widgets.ConnectivityInfoBar ();
var application_instance = ((Gtk.Application) GLib.Application.get_default ());
- var button_today = new Gtk.Button.from_icon_name ("calendar-go-today", Gtk.IconSize.LARGE_TOOLBAR) {
+ var button_today = new Gtk.Button.from_icon_name ("calendar-go-today") {
action_name = Maya.MainWindow.ACTION_PREFIX + Maya.MainWindow.ACTION_SHOW_TODAY
};
button_today.tooltip_markup = Granite.markup_accel_tooltip (
@@ -87,13 +85,13 @@ public class Maya.View.CalendarView : Gtk.Box {
var source_popover = new Calendar.Widgets.SourcePopover ();
var menu_button = new Gtk.MenuButton () {
- image = new Gtk.Image.from_icon_name ("open-menu", Gtk.IconSize.LARGE_TOOLBAR),
+ icon_name = "open-menu",
popover = source_popover,
tooltip_text = _("Manage Calendars")
};
- header_bar = new Hdy.HeaderBar () {
- show_close_button = true
+ header_bar = new Adw.HeaderBar () {
+ show_start_title_buttons = true
};
header_bar.pack_start (month_switcher);
header_bar.pack_start (year_switcher);
@@ -101,7 +99,7 @@ public class Maya.View.CalendarView : Gtk.Box {
header_bar.pack_end (menu_button);
header_bar.pack_end (spinner);
- header_bar.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
+ header_bar.add_css_class (Granite.STYLE_CLASS_FLAT);
stack = new Gtk.Stack () {
hexpand = true,
@@ -130,17 +128,12 @@ public class Maya.View.CalendarView : Gtk.Box {
settings.changed["show-weeks"].connect (on_show_weeks_changed);
settings.get_value ("show-weeks");
- events |= Gdk.EventMask.BUTTON_PRESS_MASK;
- events |= Gdk.EventMask.KEY_PRESS_MASK;
- events |= Gdk.EventMask.SCROLL_MASK;
- events |= Gdk.EventMask.SMOOTH_SCROLL_MASK;
orientation = VERTICAL;
- get_style_context ().add_class (Gtk.STYLE_CLASS_VIEW);
- add (header_bar);
- add (error_bar);
- add (info_bar);
- add (stack);
- show_all ();
+ add_css_class (Granite.STYLE_CLASS_VIEW);
+ append (header_bar);
+ append (error_bar);
+ append (info_bar);
+ append (stack);
error_bar.response.connect ((id) => error_bar.set_revealed (false));
@@ -162,8 +155,10 @@ public class Maya.View.CalendarView : Gtk.Box {
set_switcher_date (calmodel.month_start);
});
- scroll_controller = new Gtk.EventControllerScroll (this, Gtk.EventControllerScrollFlags.BOTH_AXES);
+ var scroll_controller = new Gtk.EventControllerScroll (Gtk.EventControllerScrollFlags.BOTH_AXES);
scroll_controller.scroll.connect (GesturesUtils.on_scroll);
+
+ add_controller (scroll_controller);
}
private void action_export () {
@@ -280,7 +275,7 @@ public class Maya.View.CalendarView : Gtk.Box {
}
var spacer = new Gtk.Label ("");
- spacer.get_style_context ().add_class ("weeks");
+ spacer.add_css_class ("weeks");
var spacer_revealer = new Gtk.Revealer () {
child = spacer,
@@ -307,11 +302,10 @@ public class Maya.View.CalendarView : Gtk.Box {
big_grid.attach (header, 1, 0);
big_grid.attach (days_grid, 1, 1);
big_grid.attach (weeks, 0, 1);
- big_grid.show_all ();
settings.bind ("show-weeks", spacer_revealer, "reveal-child", SettingsBindFlags.GET);
- stack.add (big_grid);
+ stack.add_child (big_grid);
header.update_columns (model.week_starts_on);
weeks.update (model.data_range.first_dt, model.num_weeks);
diff --git a/src/Grid/EventButton.vala b/src/Grid/EventButton.vala
index 98ad7119e..02f81b3be 100644
--- a/src/Grid/EventButton.vala
+++ b/src/Grid/EventButton.vala
@@ -6,16 +6,13 @@
* Corentin Noël
*/
-public class Maya.View.EventButton : Gtk.Bin {
+public class Maya.View.EventButton : Granite.Bin {
public ECal.Component comp { get; construct set; }
private Gtk.Revealer revealer;
private Gtk.Label label;
private Gtk.StyleContext grid_style_context;
- private Gtk.GestureMultiPress click_gesture;
- private Gtk.GestureLongPress long_press_gesture;
-
public EventButton (ECal.Component comp) {
Object (
comp: comp
@@ -37,7 +34,7 @@ public class Maya.View.EventButton : Gtk.Bin {
grid_style_context.add_class ("event");
var event_box = new Gtk.EventBox ();
- event_box.add (internal_grid);
+ event_box.append (internal_grid);
revealer = new Gtk.Revealer () {
child = event_box,
@@ -49,7 +46,7 @@ public class Maya.View.EventButton : Gtk.Bin {
var context_menu = Maya.EventMenu.build (comp);
context_menu.attach_to_widget (this, null);
- click_gesture = new Gtk.GestureMultiPress (this) {
+ var click_gesture = new Gtk.GestureClick () {
button = 0
};
click_gesture.pressed.connect ((n_press, x, y) => {
@@ -71,7 +68,7 @@ public class Maya.View.EventButton : Gtk.Bin {
}
});
- long_press_gesture = new Gtk.GestureLongPress (this) {
+ var long_press_gesture = new Gtk.GestureLongPress () {
touch_only = true
};
long_press_gesture.pressed.connect ((x, y) => {
@@ -84,24 +81,27 @@ public class Maya.View.EventButton : Gtk.Bin {
long_press_gesture.reset ();
});
- Gtk.TargetEntry dnd = {"binary/calendar", 0, 0};
- Gtk.TargetEntry dnd2 = {"text/uri-list", 0, 0};
- Gtk.drag_source_set (event_box, Gdk.ModifierType.BUTTON1_MASK, {dnd, dnd2}, Gdk.DragAction.MOVE);
-
- event_box.drag_data_get.connect ( (ctx, sel, info, time) => {
- Calendar.EventStore.get_default ().drag_component = comp;
- unowned ICal.Component icalcomp = comp.get_icalcomponent ();
- var ical_str = icalcomp.as_ical_string ();
- sel.set_text (ical_str, ical_str.length);
- try {
- var path = GLib.Path.build_filename (GLib.Environment.get_tmp_dir (), icalcomp.get_summary () + ".ics");
- var file = File.new_for_path (path);
- if (file.replace_contents (ical_str.data, null, false, FileCreateFlags.PRIVATE, null))
- sel.set_uris ({file.get_uri ()});
- } catch (Error e) {
- critical (e.message);
- }
- });
+ add_controller (click_gesture);
+ add_controller (long_press_gesture);
+
+ // Gtk.TargetEntry dnd = {"binary/calendar", 0, 0};
+ // Gtk.TargetEntry dnd2 = {"text/uri-list", 0, 0};
+ // Gtk.drag_source_set (event_box, Gdk.ModifierType.BUTTON1_MASK, {dnd, dnd2}, Gdk.DragAction.MOVE);
+
+ // event_box.drag_data_get.connect ( (ctx, sel, info, time) => {
+ // Calendar.EventStore.get_default ().drag_component = comp;
+ // unowned ICal.Component icalcomp = comp.get_icalcomponent ();
+ // var ical_str = icalcomp.as_ical_string ();
+ // sel.set_text (ical_str, ical_str.length);
+ // try {
+ // var path = GLib.Path.build_filename (GLib.Environment.get_tmp_dir (), icalcomp.get_summary () + ".ics");
+ // var file = File.new_for_path (path);
+ // if (file.replace_contents (ical_str.data, null, false, FileCreateFlags.PRIVATE, null))
+ // sel.set_uris ({file.get_uri ()});
+ // } catch (Error e) {
+ // critical (e.message);
+ // }
+ // });
E.Source source = comp.get_data ("source");
diff --git a/src/Grid/Grid.vala b/src/Grid/Grid.vala
index 0578be955..a0fec0a15 100644
--- a/src/Grid/Grid.vala
+++ b/src/Grid/Grid.vala
@@ -49,8 +49,6 @@ public class Grid : Gtk.Grid {
row_spacing = 0;
data = new Gee.HashMap ();
- events |= Gdk.EventMask.SCROLL_MASK;
- events |= Gdk.EventMask.SMOOTH_SCROLL_MASK;
unowned var time_manager = Calendar.TimeManager.get_default ();
time_manager.on_update_today.connect (callback_update_today);
@@ -167,11 +165,10 @@ public class Grid : Gtk.Grid {
});
if (col == 0) {
- day.get_style_context ().add_class ("firstcol");
+ day.add_css_class ("firstcol");
}
attach (day, col, row);
- day.show_all ();
}
col = (col + 1) % 7;
diff --git a/src/Grid/GridDay.vala b/src/Grid/GridDay.vala
index 419cccc1a..8a345ed00 100644
--- a/src/Grid/GridDay.vala
+++ b/src/Grid/GridDay.vala
@@ -9,7 +9,7 @@
/**
* Represents a single day on the grid.
*/
-public class Maya.View.GridDay : Gtk.EventBox {
+public class Maya.View.GridDay : Granite.Bin {
/*
* Event emitted when the day is double clicked or the ENTER key is pressed.
*/
@@ -21,15 +21,13 @@ public class Maya.View.GridDay : Gtk.EventBox {
public bool draw_left_border = true;
private VAutoHider event_box;
private GLib.HashTable event_buttons;
- private Gtk.EventControllerKey key_controller;
- private Gtk.GestureMultiPress click_gesture;
public bool in_current_month {
set {
if (value) {
- get_style_context ().remove_class (Gtk.STYLE_CLASS_DIM_LABEL);
+ get_style_context ().remove_class (Granite.CssClass.DIM_LABEL);
} else {
- get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
+ get_style_context ().add_class (Granite.CssClass.DIM_LABEL);
}
}
}
@@ -54,27 +52,30 @@ public class Maya.View.GridDay : Gtk.EventBox {
};
var container_box = new Gtk.Box (VERTICAL, 3);
- container_box.add (label);
- container_box.add (event_box);
+ container_box.append (label);
+ container_box.append (event_box);
can_focus = true;
child = container_box;
events |= Gdk.EventMask.SMOOTH_SCROLL_MASK;
get_style_context ().add_class ("cell");
- click_gesture = new Gtk.GestureMultiPress (this) {
+ var click_gesture = new Gtk.GestureClick () {
button = Gdk.BUTTON_PRIMARY,
propagation_phase = BUBBLE
};
click_gesture.released.connect (on_button_press);
- key_controller = new Gtk.EventControllerKey (this) {
+ var key_controller = new Gtk.EventControllerKey () {
propagation_phase = BUBBLE
};
key_controller.key_pressed.connect (on_key_press);
- Gtk.TargetEntry dnd = {"binary/calendar", 0, 0};
- Gtk.drag_dest_set (this, Gtk.DestDefaults.MOTION, {dnd}, Gdk.DragAction.MOVE);
+ add_controller (click_gesture);
+ add_controller (key_controller);
+
+ // Gtk.TargetEntry dnd = {"binary/calendar", 0, 0};
+ // Gtk.drag_dest_set (this, Gtk.DestDefaults.MOTION, {dnd}, Gdk.DragAction.MOVE);
this.bind_property ("date", label, "label", BindingFlags.SYNC_CREATE, (binding, srcval, ref targetval) => {
unowned var date = (GLib.DateTime) srcval.get_boxed ();
@@ -83,31 +84,31 @@ public class Maya.View.GridDay : Gtk.EventBox {
});
}
- public override bool drag_drop (Gdk.DragContext context, int x, int y, uint time_) {
- Gtk.drag_finish (context, true, false, time_);
- Gdk.Atom atom = Gtk.drag_dest_find_target (this, context, Gtk.drag_dest_get_target_list (this));
- Gtk.drag_get_data (this, context, atom, time_);
- return true;
- }
-
- public override void drag_data_received (Gdk.DragContext context, int x, int y, Gtk.SelectionData selection_data, uint info, uint time_) {
- var calmodel = Calendar.EventStore.get_default ();
- var comp = calmodel.drag_component;
- unowned ICal.Component icalcomp = comp.get_icalcomponent ();
- E.Source src = comp.get_data ("source");
- var start = icalcomp.get_dtstart ();
- var end = icalcomp.get_dtend ();
- var gap = date.get_day_of_month () - start.get_day ();
- start.set_day (start.get_day () + gap);
-
- if (!end.is_null_time ()) {
- end.set_day (end.get_day () + gap);
- icalcomp.set_dtend (end);
- }
-
- icalcomp.set_dtstart (start);
- calmodel.update_event (src, comp, ECal.ObjModType.ALL);
- }
+ // public override bool drag_drop (Gdk.DragContext context, int x, int y, uint time_) {
+ // Gtk.drag_finish (context, true, false, time_);
+ // Gdk.Atom atom = Gtk.drag_dest_find_target (this, context, Gtk.drag_dest_get_target_list (this));
+ // Gtk.drag_get_data (this, context, atom, time_);
+ // return true;
+ // }
+
+ // public override void drag_data_received (Gdk.DragContext context, int x, int y, Gtk.SelectionData selection_data, uint info, uint time_) {
+ // var calmodel = Calendar.EventStore.get_default ();
+ // var comp = calmodel.drag_component;
+ // unowned ICal.Component icalcomp = comp.get_icalcomponent ();
+ // E.Source src = comp.get_data ("source");
+ // var start = icalcomp.get_dtstart ();
+ // var end = icalcomp.get_dtend ();
+ // var gap = date.get_day_of_month () - start.get_day ();
+ // start.set_day (start.get_day () + gap);
+
+ // if (!end.is_null_time ()) {
+ // end.set_day (end.get_day () + gap);
+ // icalcomp.set_dtend (end);
+ // }
+
+ // icalcomp.set_dtstart (start);
+ // calmodel.update_event (src, comp, ECal.ObjModType.ALL);
+ // }
public void add_event (ECal.Component component) {
var button = new EventButton (component);
@@ -122,8 +123,7 @@ public class Maya.View.GridDay : Gtk.EventBox {
button.unparent ();
}
- event_box.add (button);
- button.show_all ();
+ event_box.append (button);
}
public bool update_event (ECal.Component modified_event) {
diff --git a/src/Grid/Header.vala b/src/Grid/Header.vala
index 5574e9c76..d215ffc0a 100644
--- a/src/Grid/Header.vala
+++ b/src/Grid/Header.vala
@@ -24,15 +24,12 @@ namespace Maya.View {
/**
* Represents the header at the top of the calendar grid.
*/
-public class Header : Gtk.EventBox {
+public class Header : Granite.Bin {
private Gtk.Grid header_grid;
private Gtk.Label[] labels;
private static GLib.Settings show_weeks;
- private Gtk.GestureMultiPress click_gesture;
- private Gtk.GestureLongPress long_press_gesture;
-
static construct {
if (Application.wingpanel_settings != null) {
show_weeks = Application.wingpanel_settings;
@@ -50,9 +47,6 @@ public class Header : Gtk.EventBox {
header_grid.column_spacing = 0;
header_grid.row_spacing = 0;
- // EventBox properties
- set_visible_window (true); // needed for style
-
labels = new Gtk.Label[7];
for (int c = 0; c < 7; c++) {
labels[c] = new Gtk.Label ("");
@@ -64,7 +58,7 @@ public class Header : Gtk.EventBox {
header_grid.attach (labels[c], c, 0);
}
- add (header_grid);
+ child = header_grid;
var action_show_weeks = show_weeks.create_action ("show-weeks");
@@ -76,11 +70,11 @@ public class Header : Gtk.EventBox {
var menu = new GLib.Menu ();
menu.append (_("Show Week Numbers"), "header.show-weeks");
- var gtk_menu = new Gtk.Menu.from_model (menu) {
+ var gtk_menu = new Gtk.PopoverMenu.from_model (menu) {
attach_widget = this
};
- click_gesture = new Gtk.GestureMultiPress (this) {
+ var click_gesture = new Gtk.GestureClick () {
button = 0
};
click_gesture.pressed.connect ((n_press, x, y) => {
@@ -95,7 +89,7 @@ public class Header : Gtk.EventBox {
}
});
- long_press_gesture = new Gtk.GestureLongPress (this) {
+ var long_press_gesture = new Gtk.GestureLongPress () {
touch_only = true
};
long_press_gesture.pressed.connect ((x, y) => {
@@ -107,6 +101,9 @@ public class Header : Gtk.EventBox {
long_press_gesture.set_state (CLAIMED);
long_press_gesture.reset ();
});
+
+ add_controller (click_gesture);
+ add_controller (long_press_gesture);
}
public void update_columns (int week_starts_on) {
diff --git a/src/Grid/VAutoHider.vala b/src/Grid/VAutoHider.vala
index aca35a0d3..4f79baf6a 100644
--- a/src/Grid/VAutoHider.vala
+++ b/src/Grid/VAutoHider.vala
@@ -6,7 +6,7 @@
* Corentin Noël
*/
-public class Maya.View.VAutoHider : Gtk.Bin {
+public class Maya.View.VAutoHider : Granite.Bin {
private Gtk.Label more_label;
private Gtk.Box main_box;
diff --git a/src/Grid/WeekLabels.vala b/src/Grid/WeekLabels.vala
index fcdb3dbf2..47a6ee5ce 100644
--- a/src/Grid/WeekLabels.vala
+++ b/src/Grid/WeekLabels.vala
@@ -21,16 +21,13 @@
/**
* Represent the week labels at the left side of the grid.
*/
-public class Maya.View.WeekLabels : Gtk.Bin {
+public class Maya.View.WeekLabels : Granite.Bin {
private Gtk.Grid day_grid;
private Gtk.Label[] labels;
private int nr_of_weeks;
private static GLib.Settings show_weeks;
- private Gtk.GestureMultiPress click_gesture;
- private Gtk.GestureLongPress long_press_gesture;
-
static construct {
if (Application.wingpanel_settings != null) {
show_weeks = Application.wingpanel_settings;
@@ -43,7 +40,7 @@ public class Maya.View.WeekLabels : Gtk.Bin {
day_grid = new Gtk.Grid () {
row_homogeneous = true
};
- day_grid.get_style_context ().add_class ("weeks");
+ day_grid.add_css_class ("weeks");
set_nr_of_weeks (5);
day_grid.insert_row (1);
@@ -68,11 +65,11 @@ public class Maya.View.WeekLabels : Gtk.Bin {
var menu = new GLib.Menu ();
menu.append (_("Show Week Numbers"), "week-labels.show-weeks");
- var gtk_menu = new Gtk.Menu.from_model (menu) {
+ var gtk_menu = new Gtk.PopoverMenu.from_model (menu) {
attach_widget = this
};
- click_gesture = new Gtk.GestureMultiPress (revealer) {
+ var click_gesture = new Gtk.GestureClick () {
button = 0
};
click_gesture.pressed.connect ((n_press, x, y) => {
@@ -87,7 +84,7 @@ public class Maya.View.WeekLabels : Gtk.Bin {
}
});
- long_press_gesture = new Gtk.GestureLongPress (this) {
+ var long_press_gesture = new Gtk.GestureLongPress () {
touch_only = true
};
long_press_gesture.pressed.connect ((x, y) => {
@@ -99,6 +96,9 @@ public class Maya.View.WeekLabels : Gtk.Bin {
long_press_gesture.set_state (CLAIMED);
long_press_gesture.reset ();
});
+
+ add_controller (click_gesture);
+ add_controller (long_press_gesture);
}
public void update (DateTime date, int nr_of_weeks) {
@@ -115,7 +115,7 @@ public class Maya.View.WeekLabels : Gtk.Bin {
valign = START,
width_chars = 2
};
- labels[c].get_style_context ().add_class ("weeklabel");
+ labels[c].add_css_class ("weeklabel");
day_grid.attach (labels[c], 0, c);
labels[c].show ();
diff --git a/src/ImportDialog.vala b/src/ImportDialog.vala
index d3f3911e0..ce3b15792 100644
--- a/src/ImportDialog.vala
+++ b/src/ImportDialog.vala
@@ -55,12 +55,12 @@ public class Maya.View.ImportDialog : Granite.MessageDialog {
var frame = new Gtk.Frame (null) {
child = calchooser
};
- frame.get_style_context ().add_class (Gtk.STYLE_CLASS_VIEW);
+ frame.add_css_class (Granite.STYLE_CLASS_VIEW);
- custom_bin.add (frame);
+ custom_bin.append (frame);
var ok_button = (Gtk.Button) add_button (_("Import"), Gtk.ResponseType.APPLY);
- ok_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
+ ok_button.add_css_class (Granite.CssClass.SUGGESTED);
response.connect ((response_id) => {
if (response_id == Gtk.ResponseType.APPLY) {
diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index 63f6e8894..a45960996 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -6,7 +6,7 @@
* Corentin Noël
*/
-public class Maya.MainWindow : Hdy.ApplicationWindow {
+public class Maya.MainWindow : Gtk.ApplicationWindow {
public View.CalendarView calview;
public const string ACTION_PREFIX = "win.";
@@ -50,14 +50,18 @@ public class Maya.MainWindow : Hdy.ApplicationWindow {
width_request = 160
};
- var hpaned = new Gtk.Paned (HORIZONTAL);
- hpaned.pack1 (calview, true, false);
- hpaned.pack2 (sidebar, false, false);
+ var hpaned = new Gtk.Paned (HORIZONTAL) {
+ start_child = calview,
+ resize_start_child = true,
+ shrink_start_child = false,
+ end_child = sidebar,
+ resize_end_child = false,
+ shrink_end_child = false
+ };
child = hpaned;
- show_all ();
- var header_group = new Hdy.HeaderGroup ();
+ var header_group = new Adw.HeaderGroup ();
header_group.add_header_bar (calview.header_bar);
header_group.add_header_bar (sidebar.header_bar);
@@ -96,7 +100,7 @@ public class Maya.MainWindow : Hdy.ApplicationWindow {
var dialog = new Maya.View.EventDialog (comp, null, this);
dialog.present ();
} else {
- Gdk.beep ();
+ Gdk.Display.get_default ().beep ();
}
}
@@ -112,44 +116,20 @@ public class Maya.MainWindow : Hdy.ApplicationWindow {
};
dialog.present ();
} else {
- Gdk.beep ();
+ Gdk.Display.get_default ().beep ();
}
}
- public override bool configure_event (Gdk.EventConfigure event) {
- if (configure_id != 0) {
- GLib.Source.remove (configure_id);
- }
-
- configure_id = Timeout.add (100, () => {
- configure_id = 0;
-
- if (is_maximized) {
- Maya.Application.saved_state.set_boolean ("window-maximized", true);
- } else {
- Maya.Application.saved_state.set_boolean ("window-maximized", false);
-
- Gdk.Rectangle rect;
- get_allocation (out rect);
- Maya.Application.saved_state.set ("window-size", "(ii)", rect.width, rect.height);
- }
-
- return GLib.Source.REMOVE;
- });
-
- return base.configure_event (event);
- }
-
- public override bool delete_event (Gdk.EventAny event) {
- ((Application) application).ask_for_background.begin ((obj, res) => {
- unowned var app = (Application) obj;
- if (app.ask_for_background.end (res)) {
- hide ();
- } else {
- destroy ();
- }
- });
-
- return Gdk.EVENT_STOP;
- }
+ // public override bool delete_event (Gdk.EventAny event) {
+ // ((Application) application).ask_for_background.begin ((obj, res) => {
+ // unowned var app = (Application) obj;
+ // if (app.ask_for_background.end (res)) {
+ // hide ();
+ // } else {
+ // destroy ();
+ // }
+ // });
+
+ // return Gdk.EVENT_STOP;
+ // }
}
diff --git a/src/SourceDialog/SourceDialog.vala b/src/SourceDialog/SourceDialog.vala
index 93d8ba56d..2961a738d 100644
--- a/src/SourceDialog/SourceDialog.vala
+++ b/src/SourceDialog/SourceDialog.vala
@@ -34,17 +34,17 @@ public class Maya.View.SourceDialog : Granite.Dialog {
private Gtk.CheckButton is_default_check;
private E.Source source = null;
- private Gtk.RadioButton color_button_blue;
- private Gtk.RadioButton color_button_mint;
- private Gtk.RadioButton color_button_green;
- private Gtk.RadioButton color_button_yellow;
- private Gtk.RadioButton color_button_orange;
- private Gtk.RadioButton color_button_red;
- private Gtk.RadioButton color_button_pink;
- private Gtk.RadioButton color_button_purple;
- private Gtk.RadioButton color_button_brown;
- private Gtk.RadioButton color_button_slate;
- private Gtk.RadioButton color_button_none;
+ private Gtk.CheckButton color_button_blue;
+ private Gtk.CheckButton color_button_mint;
+ private Gtk.CheckButton color_button_green;
+ private Gtk.CheckButton color_button_yellow;
+ private Gtk.CheckButton color_button_orange;
+ private Gtk.CheckButton color_button_red;
+ private Gtk.CheckButton color_button_pink;
+ private Gtk.CheckButton color_button_purple;
+ private Gtk.CheckButton color_button_brown;
+ private Gtk.CheckButton color_button_slate;
+ private Gtk.CheckButton color_button_none;
public signal void go_back ();
@@ -70,8 +70,8 @@ public class Maya.View.SourceDialog : Granite.Dialog {
var name_box = new Gtk.Box (VERTICAL, 0) {
margin_bottom = 12
};
- name_box.add (name_label);
- name_box.add (name_entry);
+ name_box.append (name_label);
+ name_box.append (name_entry);
list_store = new Gtk.ListStore (2, typeof (string), typeof (Backend));
@@ -98,8 +98,8 @@ public class Maya.View.SourceDialog : Granite.Dialog {
var type_box = new Gtk.Box (VERTICAL, 0) {
margin_bottom = 12
};
- type_box.add (type_label);
- type_box.add (type_combobox);
+ type_box.append (type_label);
+ type_box.append (type_combobox);
Gtk.TreeIter iter;
var backends_manager = BackendsManager.get_default ();
@@ -115,90 +115,90 @@ public class Maya.View.SourceDialog : Granite.Dialog {
type_combobox.set_active (0);
- color_button_blue = new Gtk.RadioButton (null) {
+ color_button_blue = new Gtk.CheckButton () {
tooltip_text = _("Blueberry")
};
- color_button_blue.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_blue.get_style_context ().add_class ("blue");
+ color_button_blue.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_blue.add_css_class ("blue");
- color_button_mint = new Gtk.RadioButton (null) {
+ color_button_mint = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Mint")
};
- color_button_mint.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_mint.get_style_context ().add_class ("mint");
+ color_button_mint.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_mint.add_css_class ("mint");
- color_button_green = new Gtk.RadioButton (null) {
+ color_button_green = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Lime")
};
- color_button_green.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_green.get_style_context ().add_class ("green");
+ color_button_green.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_green.add_css_class ("green");
- color_button_yellow = new Gtk.RadioButton (null) {
+ color_button_yellow = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Banana")
};
- color_button_yellow.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_yellow.get_style_context ().add_class ("yellow");
+ color_button_yellow.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_yellow.add_css_class ("yellow");
- color_button_orange = new Gtk.RadioButton (null) {
+ color_button_orange = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Orange")
};
- color_button_orange.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_orange.get_style_context ().add_class ("orange");
+ color_button_orange.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_orange.add_css_class ("orange");
- color_button_red = new Gtk.RadioButton (null) {
+ color_button_red = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Strawberry")
};
- color_button_red.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_red.get_style_context ().add_class ("red");
+ color_button_red.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_red.add_css_class ("red");
- color_button_pink = new Gtk.RadioButton (null) {
+ color_button_pink = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Bubblegum")
};
- color_button_pink.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_pink.get_style_context ().add_class ("pink");
+ color_button_pink.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_pink.add_css_class ("pink");
- color_button_purple = new Gtk.RadioButton (null) {
+ color_button_purple = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Grape")
};
- color_button_purple.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_purple.get_style_context ().add_class ("purple");
+ color_button_purple.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_purple.add_css_class ("purple");
- color_button_brown = new Gtk.RadioButton (null) {
+ color_button_brown = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Cocoa")
};
- color_button_brown.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_brown.get_style_context ().add_class ("brown");
+ color_button_brown.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_brown.add_css_class ("brown");
- color_button_slate = new Gtk.RadioButton (null) {
+ color_button_slate = new Gtk.CheckButton () {
group = color_button_blue,
tooltip_text = _("Slate")
};
- color_button_slate.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON);
- color_button_slate.get_style_context ().add_class ("slate");
+ color_button_slate.add_css_class (Granite.STYLE_CLASS_COLOR_BUTTON);
+ color_button_slate.add_css_class ("slate");
- color_button_none = new Gtk.RadioButton (null) {
+ color_button_none = new Gtk.CheckButton () {
group = color_button_blue
};
var color_button_box = new Gtk.Box (HORIZONTAL, 6);
- color_button_box.add (color_button_blue);
- color_button_box.add (color_button_mint);
- color_button_box.add (color_button_green);
- color_button_box.add (color_button_yellow);
- color_button_box.add (color_button_orange);
- color_button_box.add (color_button_red);
- color_button_box.add (color_button_pink);
- color_button_box.add (color_button_purple);
- color_button_box.add (color_button_brown);
- color_button_box.add (color_button_slate);
+ color_button_box.append (color_button_blue);
+ color_button_box.append (color_button_mint);
+ color_button_box.append (color_button_green);
+ color_button_box.append (color_button_yellow);
+ color_button_box.append (color_button_orange);
+ color_button_box.append (color_button_red);
+ color_button_box.append (color_button_pink);
+ color_button_box.append (color_button_purple);
+ color_button_box.append (color_button_brown);
+ color_button_box.append (color_button_slate);
var color_label = new Granite.HeaderLabel (_("Color")) {
mnemonic_widget = color_button_box
@@ -207,8 +207,8 @@ public class Maya.View.SourceDialog : Granite.Dialog {
var color_box = new Gtk.Box (VERTICAL, 0) {
margin_bottom = 12
};
- color_box.add (color_label);
- color_box.add (color_button_box);
+ color_box.append (color_label);
+ color_box.append (color_button_box);
is_default_check = new Gtk.CheckButton.with_label (_("Mark as default calendar")) {
margin_bottom = 12
@@ -259,13 +259,12 @@ public class Maya.View.SourceDialog : Granite.Dialog {
margin_start = 12,
vexpand = true
};
- main_box.add (type_box);
- main_box.add (name_box);
- main_box.add (color_box);
- main_box.add (is_default_check);
- main_box.show_all ();
+ main_box.append (type_box);
+ main_box.append (name_box);
+ main_box.append (color_box);
+ main_box.append (is_default_check);
- get_content_area ().add (main_box);
+ get_content_area ().append (main_box);
}
public void set_source (E.Source? source = null) {
@@ -371,7 +370,7 @@ public class Maya.View.SourceDialog : Granite.Dialog {
widget.widget.margin_bottom = 12;
}
- main_box.add (widget.widget);
+ main_box.append (widget.widget);
if (widget.needed == true && widget.widget is Gtk.Entry) {
var entry = widget.widget as Gtk.Entry;
@@ -380,7 +379,6 @@ public class Maya.View.SourceDialog : Granite.Dialog {
}
}
- main_box.show_all ();
check_can_validate ();
}
diff --git a/src/Widgets/AgendaEventRow.vala b/src/Widgets/AgendaEventRow.vala
index 80e39b599..a307b2328 100644
--- a/src/Widgets/AgendaEventRow.vala
+++ b/src/Widgets/AgendaEventRow.vala
@@ -36,9 +36,6 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow {
public Gtk.Revealer revealer { public get; private set; }
- private Gtk.GestureMultiPress click_gesture;
- private Gtk.GestureLongPress long_press_gesture;
-
private Gtk.Image event_image;
private Gtk.Label name_label;
private Gtk.Label datetime_label;
@@ -172,7 +169,7 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow {
split_keywords ((Category)cat);
}
- event_image = new Gtk.Image.from_icon_name ("office-calendar-symbolic", Gtk.IconSize.MENU) {
+ event_image = new Gtk.Image.from_icon_name ("office-calendar-symbolic") {
pixel_size = 16,
valign = START
};
@@ -196,8 +193,8 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow {
use_markup = true,
xalign = 0
};
- datetime_label.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
- datetime_label.get_style_context ().add_class (Granite.STYLE_CLASS_SMALL_LABEL);
+ datetime_label.add_css_class (Granite.CssClass.DIM);
+ datetime_label.add_css_class (Granite.CssClass.SMALL);
location_label = new Gtk.Label ("") {
margin_top = 6,
@@ -225,14 +222,10 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow {
main_grid.attach (location_revealer, 1, 2);
main_grid_context = main_grid.get_style_context ();
- main_grid_context.add_class ("event");
-
- var event_box = new Gtk.EventBox () {
- child = main_grid
- };
+ main_grid.add_css_class ("event");
revealer = new Gtk.Revealer () {
- child = event_box,
+ child = main_grid,
transition_type = SLIDE_DOWN
};
@@ -261,7 +254,7 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow {
revealer.set_reveal_child (false);
});
- click_gesture = new Gtk.GestureMultiPress (this) {
+ var click_gesture = new Gtk.GestureClick () {
button = 0
};
click_gesture.pressed.connect ((n_press, x, y) => {
@@ -276,7 +269,7 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow {
}
});
- long_press_gesture = new Gtk.GestureLongPress (this) {
+ var long_press_gesture = new Gtk.GestureLongPress () {
touch_only = true
};
long_press_gesture.pressed.connect ((x, y) => {
@@ -291,6 +284,9 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow {
// Fill in the information
update (calevent);
+
+ add_controller (click_gesture);
+ add_controller (long_press_gesture);
}
/**
@@ -398,7 +394,7 @@ public class Maya.View.AgendaEventRow : Gtk.ListBoxRow {
var provider = new Gtk.CssProvider ();
try {
var colored_css = EVENT_CSS.printf (background_color.slice (0, 7));
- provider.load_from_data (colored_css, colored_css.length);
+ provider.load_from_string (colored_css);
event_image_context.add_provider (provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
main_grid_context.add_provider (provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
diff --git a/src/Widgets/CalendarChooser.vala b/src/Widgets/CalendarChooser.vala
index 29bab78c3..56bd88b63 100644
--- a/src/Widgets/CalendarChooser.vala
+++ b/src/Widgets/CalendarChooser.vala
@@ -58,7 +58,6 @@ public class Maya.View.Widgets.CalendarChooser : Gtk.Box {
_("Try changing search terms."),
""
);
- placeholder.show_all ();
var list_box = new Gtk.ListBox () {
activate_on_single_click = true
@@ -76,7 +75,6 @@ public class Maya.View.Widgets.CalendarChooser : Gtk.Box {
orientation = VERTICAL;
add (search_entry);
add (scrolled);
- show_all ();
list_box.set_filter_func (filter_function);
list_box.set_header_func (header_update_func);
@@ -143,9 +141,8 @@ public class Maya.View.Widgets.CalendarChooser : Gtk.Box {
var row = new Gtk.ListBoxRow () {
child = calrow
};
- row.show_all ();
- list_box.add (row);
+ list_box.append (row);
if (source.dup_uid () == current_source.dup_uid ()) {
list_box.select_row (row);
@@ -183,7 +180,6 @@ public class Maya.View.Widgets.CalendarChooser : Gtk.Box {
row.set_header (header);
- header.show_all ();
if (before == null) {
header.margin_top = 0;
}
diff --git a/src/Widgets/CalendarRow.vala b/src/Widgets/CalendarRow.vala
index b041bc629..6639b05f6 100644
--- a/src/Widgets/CalendarRow.vala
+++ b/src/Widgets/CalendarRow.vala
@@ -61,7 +61,7 @@ public class CalendarRow : Gtk.Box {
xalign = 0
};
- var selection_icon = new Gtk.Image.from_icon_name ("object-select-symbolic", Gtk.IconSize.MENU) {
+ var selection_icon = new Gtk.Image.from_icon_name ("object-select-symbolic") {
no_show_all = true,
visible = false
};
@@ -84,7 +84,7 @@ public class CalendarRow : Gtk.Box {
var style_provider = new Gtk.CssProvider ();
try {
- style_provider.load_from_data (css_color, css_color.length);
+ style_provider.load_from_string (css_color);
calendar_color_context.add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
} catch (Error e) {
warning ("Could not create CSS Provider: %s\nStylesheet:\n%s", e.message, css_color);
diff --git a/src/Widgets/DateSwitcher.vala b/src/Widgets/DateSwitcher.vala
index ff4e8d705..2490a9810 100644
--- a/src/Widgets/DateSwitcher.vala
+++ b/src/Widgets/DateSwitcher.vala
@@ -38,9 +38,9 @@ public class Calendar.Widgets.DateSwitcher : Gtk.Grid {
}
construct {
- var start_button = new Gtk.Button.from_icon_name ("pan-start-symbolic", Gtk.IconSize.MENU);
+ var start_button = new Gtk.Button.from_icon_name ("pan-start-symbolic");
- var end_button = new Gtk.Button.from_icon_name ("pan-end-symbolic", Gtk.IconSize.MENU);
+ var end_button = new Gtk.Button.from_icon_name ("pan-end-symbolic");
label = new Gtk.Label (null) {
width_chars = width_chars
@@ -49,7 +49,7 @@ public class Calendar.Widgets.DateSwitcher : Gtk.Grid {
var center_button = new Gtk.Button ();
center_button.add (label);
- get_style_context ().add_class (Gtk.STYLE_CLASS_LINKED);
+ get_style_context ().add_class (Granite.CssClass.LINKED);
add (start_button);
add (center_button);
add (end_button);
diff --git a/src/Widgets/DateTimePicker.vala b/src/Widgets/DateTimePicker.vala
index 634d07191..e108051c3 100644
--- a/src/Widgets/DateTimePicker.vala
+++ b/src/Widgets/DateTimePicker.vala
@@ -28,13 +28,13 @@ namespace Maya.View.Widgets {
time_picker.time.get_second ()); }
}
- public Granite.Widgets.DatePicker date_picker { get; private set; }
- public Granite.Widgets.TimePicker time_picker { get; private set; }
+ public Granite.DatePicker date_picker { get; private set; }
+ public Granite.TimePicker time_picker { get; private set; }
public DateTimePicker () {
- date_picker = new Granite.Widgets.DatePicker ();
- time_picker = new Granite.Widgets.TimePicker ();
+ date_picker = new Granite.DatePicker ();
+ time_picker = new Granite.TimePicker ();
// Grid properties
set_column_spacing (10);
diff --git a/src/Widgets/DeleteDialog.vala b/src/Widgets/DeleteDialog.vala
index f6610fe7e..3a7a67164 100644
--- a/src/Widgets/DeleteDialog.vala
+++ b/src/Widgets/DeleteDialog.vala
@@ -49,7 +49,7 @@ class Calendar.DeleteEventDialog : Granite.MessageDialog {
}
unowned var trash_button = add_button (delete_text, Gtk.ResponseType.YES);
- trash_button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
+ trash_button.add_css_class (Granite.CssClass.DESTRUCTIVE);
response.connect ((response) => {
if (response == Gtk.ResponseType.YES) {
diff --git a/src/Widgets/DynamicSpinner.vala b/src/Widgets/DynamicSpinner.vala
index 15f3afb1b..d8e901005 100644
--- a/src/Widgets/DynamicSpinner.vala
+++ b/src/Widgets/DynamicSpinner.vala
@@ -5,7 +5,7 @@
* Authored by: Corentin Noël
*/
-public class Maya.View.Widgets.DynamicSpinner : Gtk.Bin {
+public class Maya.View.Widgets.DynamicSpinner : Granite.Bin {
private Gtk.ListBox list_box;
private Gtk.Revealer revealer;
@@ -21,7 +21,7 @@ public class Maya.View.Widgets.DynamicSpinner : Gtk.Bin {
selection_mode = NONE
};
- var info_popover = new Gtk.Popover (null) {
+ var info_popover = new Gtk.Popover () {
child = list_box,
position = BOTTOM
};
@@ -42,7 +42,6 @@ public class Maya.View.Widgets.DynamicSpinner : Gtk.Bin {
};
child = revealer;
- show_all ();
}
public async void add_source (E.Source source, Cancellable cancellable) {
@@ -51,8 +50,9 @@ public class Maya.View.Widgets.DynamicSpinner : Gtk.Bin {
var label = new Gtk.Label (source.get_display_name ());
- var stop_button = new Gtk.Button.from_icon_name ("process-stop-symbolic", Gtk.IconSize.BUTTON);
- stop_button.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
+ var stop_button = new Gtk.Button.from_icon_name ("process-stop-symbolic") {
+ has_frame = false
+ };
stop_button.clicked.connect (() => {
cancellable.cancel ();
@@ -65,15 +65,14 @@ public class Maya.View.Widgets.DynamicSpinner : Gtk.Bin {
margin_start = 6
};
- box.add (label);
- box.add (stop_button);
+ box.append (label);
+ box.append (stop_button);
lock (children_matcher) {
children_matcher.insert (source.dup_uid (), box);
}
- list_box.add (box);
- list_box.show_all ();
+ list_box.append (box);
return false;
});
diff --git a/src/Widgets/EventMenu.vala b/src/Widgets/EventMenu.vala
index 633f24306..3c15698cf 100644
--- a/src/Widgets/EventMenu.vala
+++ b/src/Widgets/EventMenu.vala
@@ -7,7 +7,7 @@
*/
namespace Maya.EventMenu {
- public static Gtk.Menu build (ECal.Component comp) {
+ public static Gtk.PopoverMenu build (ECal.Component comp) {
var action_edit = new GLib.SimpleAction ("edit", null);
action_edit.activate.connect (() => {
((Maya.Application) GLib.Application.get_default ()).window.on_modified (comp);
@@ -41,7 +41,7 @@ namespace Maya.EventMenu {
menu_model.prepend (_("Remove"), "event.remove");
}
- var menu = new Gtk.Menu.from_model (menu_model);
+ var menu = new Gtk.PopoverMenu.from_model (menu_model);
menu.insert_action_group ("event", action_group);
E.Source src = comp.get_data ("source");
diff --git a/src/Widgets/SourcePopover.vala b/src/Widgets/SourcePopover.vala
index 5425c7667..bc593178b 100644
--- a/src/Widgets/SourcePopover.vala
+++ b/src/Widgets/SourcePopover.vala
@@ -26,7 +26,7 @@ public class Calendar.Widgets.SourcePopover : Gtk.Popover {
}
});
- var scroll = new Gtk.ScrolledWindow (null, null) {
+ var scroll = new Gtk.ScrolledWindow () {
child = calendar_box,
hscrollbar_policy = NEVER,
max_content_height = 300,
@@ -61,13 +61,12 @@ public class Calendar.Widgets.SourcePopover : Gtk.Popover {
margin_bottom = 3,
};
- main_box.add (scroll);
- main_box.add (separator);
- main_box.add (add_calendar_button);
- main_box.add (import_calendar_button);
- main_box.add (export_calendar_button);
- main_box.add (accounts_button);
- main_box.show_all ();
+ main_box.append (scroll);
+ main_box.append (separator);
+ main_box.append (add_calendar_button);
+ main_box.append (import_calendar_button);
+ main_box.append (export_calendar_button);
+ main_box.append (accounts_button);
child = main_box;
populate.begin ();
@@ -152,7 +151,6 @@ public class Calendar.Widgets.SourcePopover : Gtk.Popover {
var header = new Granite.HeaderLabel (row_location);
row.set_header (header);
- header.show_all ();
}
private void source_removed (E.Source source) {
@@ -180,8 +178,7 @@ public class Calendar.Widgets.SourcePopover : Gtk.Popover {
source_item.edit_request.connect (edit_source);
source_item.remove_request.connect (remove_source);
- calendar_box.add (source_item);
- calendar_box.show_all ();
+ calendar_box.append (source_item);
src_map.set (source.dup_uid (), source_item);
}
diff --git a/src/Widgets/SourceRow.vala b/src/Widgets/SourceRow.vala
index 73ae1ab0c..b13742a34 100644
--- a/src/Widgets/SourceRow.vala
+++ b/src/Widgets/SourceRow.vala
@@ -59,12 +59,12 @@ public class Calendar.SourceRow : Gtk.ListBoxRow {
style_calendar_color (cal.dup_color ());
- delete_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic", MENU) {
+ delete_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic") {
sensitive = source.removable,
tooltip_text = source.removable ? _("Remove") : _("Not Removable")
};
- edit_button = new Gtk.Button.from_icon_name ("edit-symbolic", MENU) {
+ edit_button = new Gtk.Button.from_icon_name ("edit-symbolic") {
sensitive = source.writable,
tooltip_text = source.writable ? _("Edit…"): _("Not Editable")
};
@@ -75,17 +75,17 @@ public class Calendar.SourceRow : Gtk.ListBoxRow {
margin_bottom = 3,
margin_start = 12
};
- calendar_box.add (visible_checkbutton);
- calendar_box.add (calendar_name_label);
- calendar_box.add (delete_button);
- calendar_box.add (edit_button);
+ calendar_box.append (visible_checkbutton);
+ calendar_box.append (calendar_name_label);
+ calendar_box.append (delete_button);
+ calendar_box.append (edit_button);
var undo_button = new Gtk.Button.with_label (_("Undo")) {
margin_end = 6
};
- var close_button = new Gtk.Button.from_icon_name ("process-stop-symbolic", SMALL_TOOLBAR) {
- relief = NONE
+ var close_button = new Gtk.Button.from_icon_name ("process-stop-symbolic") {
+ has_frame = false
};
message_label = new Gtk.Label (_("\"%s\" removed").printf (source.display_name)) {
@@ -94,18 +94,18 @@ public class Calendar.SourceRow : Gtk.ListBoxRow {
};
info_box = new Gtk.Box (HORIZONTAL, 12);
- info_box.add (close_button);
- info_box.add (message_label);
- info_box.add (undo_button);
+ info_box.append (close_button);
+ info_box.append (message_label);
+ info_box.append (undo_button);
stack = new Gtk.Stack () {
transition_type = OVER_RIGHT_LEFT
};
- stack.add (calendar_box);
- stack.add (info_box);
+ stack.add_child (calendar_box);
+ stack.add_child (info_box);
stack.visible_child = calendar_box;
- add (stack);
+ child = stack;
close_button.clicked.connect (() => {
hide ();
@@ -130,7 +130,7 @@ public class Calendar.SourceRow : Gtk.ListBoxRow {
var style_provider = new Gtk.CssProvider ();
try {
- style_provider.load_from_data (css_color, css_color.length);
+ style_provider.load_from_string (css_color);
visible_checkbutton.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
} catch (Error e) {
warning ("Could not create CSS Provider: %s\nStylesheet:\n%s", e.message, css_color);
diff --git a/src/meson.build b/src/meson.build
index 481cd818d..198b150d5 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -40,25 +40,24 @@ calendar_files = files(
)
calendar_deps = [
+ adw_dep,
core_dep,
glib_dep,
granite_dep,
gtk_dep,
- handy_dep,
libecal_dep,
libedataserver_dep,
libedataserverui_dep,
libical_dep,
gmodule_dep,
m_dep,
- champlain_dep,
- champlain_gtk_dep,
- clutter_dep,
- clutter_gtk_dep,
+ # clutter_dep,
+ # clutter_gtk_dep,
folks_dep,
geocode_glib_dep,
gclue_dep,
- libportal_dep
+ libportal_dep,
+ shumate_dep,
]
executable(
diff --git a/vapi/champlain-0.12.deps b/vapi/champlain-0.12.deps
deleted file mode 100644
index 8d3fd570a..000000000
--- a/vapi/champlain-0.12.deps
+++ /dev/null
@@ -1,4 +0,0 @@
-clutter-1.0
-cogl-pango-1.0
-atk
-pangocairo
diff --git a/vapi/champlain-0.12.vapi b/vapi/champlain-0.12.vapi
deleted file mode 100644
index 58a39ba84..000000000
--- a/vapi/champlain-0.12.vapi
+++ /dev/null
@@ -1,841 +0,0 @@
-/* champlain-0.12.vapi generated by vapigen, do not modify. */
-
-[CCode (cprefix = "Champlain", gir_namespace = "Champlain", gir_version = "0.12", lower_case_cprefix = "champlain_")]
-namespace Champlain {
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_adjustment_get_type ()")]
- public class Adjustment : GLib.Object {
- [CCode (has_construct_function = false)]
- public Adjustment (double value, double lower, double upper, double step_increment);
- public bool clamp (bool interpolate, uint n_frames, uint fps);
- public double get_value ();
- public void get_values (double value, double lower, double upper, double step_increment);
- public void interpolate (double value, uint n_frames, uint fps);
- public void interpolate_stop ();
- public void set_value (double value);
- public void set_values (double value, double lower, double upper, double step_increment);
- [NoAccessorMethod]
- public double lower { get; set; }
- [NoAccessorMethod]
- public double step_increment { get; set; }
- [NoAccessorMethod]
- public double upper { get; set; }
- public double value { get; set; }
- public virtual signal void changed ();
- }
- [CCode (cheader_filename = "champlain/champlain.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "champlain_bounding_box_get_type ()")]
- [Compact]
- [Version (since = "0.6")]
- public class BoundingBox {
- public double bottom;
- public double left;
- public double right;
- public double top;
- [CCode (has_construct_function = false)]
- public BoundingBox ();
- [Version (since = "0.10")]
- public void compose (Champlain.BoundingBox other);
- public Champlain.BoundingBox copy ();
- [Version (since = "0.12.4")]
- public bool covers (double latitude, double longitude);
- [Version (since = "0.10")]
- public void extend (double latitude, double longitude);
- public void free ();
- public void get_center (out double latitude, out double longitude);
- [Version (since = "0.10")]
- public bool is_valid ();
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_coordinate_get_type ()")]
- [Version (since = "0.10")]
- public class Coordinate : GLib.InitiallyUnowned, Champlain.Location {
- [CCode (has_construct_function = false)]
- public Coordinate ();
- [CCode (has_construct_function = false)]
- public Coordinate.full (double latitude, double longitude);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_custom_marker_get_type ()")]
- [Version (deprecated = true, deprecated_since = "0.12.4", since = "0.10")]
- public class CustomMarker : Champlain.Marker, Atk.Implementor, Champlain.Location, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public CustomMarker ();
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_error_tile_renderer_get_type ()")]
- [Version (since = "0.8")]
- public class ErrorTileRenderer : Champlain.Renderer {
- [CCode (has_construct_function = false)]
- public ErrorTileRenderer (uint tile_size);
- public uint get_tile_size ();
- public void set_tile_size (uint size);
- public uint tile_size { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_file_cache_get_type ()")]
- [Version (since = "0.6")]
- public class FileCache : Champlain.TileCache {
- [CCode (has_construct_function = false)]
- protected FileCache ();
- [CCode (has_construct_function = false)]
- [Version (since = "0.8")]
- public FileCache.full (uint size_limit, string? cache_dir, Champlain.Renderer renderer);
- public unowned string get_cache_dir ();
- [Version (since = "0.4")]
- public uint get_size_limit ();
- [Version (since = "0.4")]
- public void purge ();
- [Version (since = "0.4")]
- public void purge_on_idle ();
- [Version (since = "0.4")]
- public void set_size_limit (uint size_limit);
- public string cache_dir { get; construct; }
- [Version (since = "0.4")]
- public uint size_limit { get; set construct; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_file_tile_source_get_type ()")]
- [Version (since = "0.8")]
- public class FileTileSource : Champlain.TileSource {
- [CCode (has_construct_function = false)]
- protected FileTileSource ();
- [CCode (has_construct_function = false)]
- public FileTileSource.full (string id, string name, string license, string license_uri, uint min_zoom, uint max_zoom, uint tile_size, Champlain.MapProjection projection, Champlain.Renderer renderer);
- public void load_map_data (string map_path);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_image_renderer_get_type ()")]
- [Version (since = "0.8")]
- public class ImageRenderer : Champlain.Renderer {
- [CCode (has_construct_function = false)]
- public ImageRenderer ();
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_kinetic_scroll_view_get_type ()")]
- public class KineticScrollView : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public KineticScrollView (bool kinetic, Champlain.Viewport viewport);
- public void stop ();
- [NoAccessorMethod]
- public double decel_rate { get; set; }
- [NoAccessorMethod]
- public bool mode { get; set; }
- [NoAccessorMethod]
- public uint motion_buffer { get; set; }
- public signal void panning_completed ();
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_label_get_type ()")]
- [Version (since = "0.10")]
- public class Label : Champlain.Marker, Atk.Implementor, Champlain.Location, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Label ();
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Label.from_file (string filename) throws GLib.Error;
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Label.full (string text, Clutter.Actor actor);
- public Pango.Alignment get_alignment ();
- public Pango.AttrList get_attributes ();
- public Clutter.Color? get_color ();
- public bool get_draw_background ();
- [Version (since = "0.12.10")]
- public bool get_draw_shadow ();
- public Pango.EllipsizeMode get_ellipsize ();
- public unowned string get_font_name ();
- public unowned Clutter.Actor get_image ();
- public bool get_single_line_mode ();
- public unowned string get_text ();
- public Clutter.Color? get_text_color ();
- public bool get_use_markup ();
- public bool get_wrap ();
- public Pango.WrapMode get_wrap_mode ();
- public void set_alignment (Pango.Alignment alignment);
- public void set_attributes (Pango.AttrList list);
- public void set_color (Clutter.Color? color);
- public void set_draw_background (bool background);
- [Version (since = "0.12.10")]
- public void set_draw_shadow (bool shadow);
- public void set_ellipsize (Pango.EllipsizeMode mode);
- public void set_font_name (string? font_name);
- public void set_image (Clutter.Actor? image);
- public void set_single_line_mode (bool mode);
- public void set_text (string text);
- public void set_text_color (Clutter.Color? color);
- public void set_use_markup (bool use_markup);
- public void set_wrap (bool wrap);
- public void set_wrap_mode (Pango.WrapMode wrap_mode);
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Label.with_image (Clutter.Actor actor);
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Label.with_text (string text, string? font, Clutter.Color? text_color, Clutter.Color? label_color);
- public Pango.Alignment alignment { get; set; }
- public Clutter.Color color { owned get; set; }
- public bool draw_background { get; set; }
- [Version (since = "0.12.10")]
- public bool draw_shadow { get; set; }
- public Pango.EllipsizeMode ellipsize { get; set; }
- public string font_name { get; set; }
- public Clutter.Actor image { get; set; }
- public bool single_line_mode { get; set; }
- public string text { get; set; }
- public Clutter.Color text_color { owned get; set; }
- public bool use_markup { get; set; }
- public bool wrap { get; set; }
- public Pango.WrapMode wrap_mode { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_layer_get_type ()")]
- [Version (since = "0.10")]
- public abstract class Layer : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false)]
- protected Layer ();
- public virtual Champlain.BoundingBox get_bounding_box ();
- public virtual void set_view (Champlain.View view);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_license_get_type ()")]
- [Version (since = "0.10")]
- public class License : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public License ();
- public void connect_view (Champlain.View view);
- public void disconnect_view ();
- public Pango.Alignment get_alignment ();
- public unowned string get_extra_text ();
- public void set_alignment (Pango.Alignment alignment);
- public void set_extra_text (string text);
- public Pango.Alignment alignment { get; set; }
- public string extra_text { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_map_source_get_type ()")]
- [Version (since = "0.4")]
- public abstract class MapSource : GLib.InitiallyUnowned {
- [CCode (has_construct_function = false)]
- protected MapSource ();
- public virtual void fill_tile (Champlain.Tile tile);
- public uint get_column_count (uint zoom_level);
- public virtual unowned string get_id ();
- public double get_latitude (uint zoom_level, double y);
- public virtual unowned string get_license ();
- public virtual unowned string get_license_uri ();
- public double get_longitude (uint zoom_level, double x);
- public virtual uint get_max_zoom_level ();
- [Version (since = "0.4.3")]
- public double get_meters_per_pixel (uint zoom_level, double latitude, double longitude);
- public virtual uint get_min_zoom_level ();
- public virtual unowned string get_name ();
- [Version (since = "0.6")]
- public unowned Champlain.MapSource get_next_source ();
- public virtual Champlain.MapProjection get_projection ();
- [Version (since = "0.8")]
- public unowned Champlain.Renderer get_renderer ();
- public uint get_row_count (uint zoom_level);
- public virtual uint get_tile_size ();
- public double get_x (uint zoom_level, double longitude);
- public double get_y (uint zoom_level, double latitude);
- [Version (since = "0.6")]
- public void set_next_source (Champlain.MapSource next_source);
- [Version (since = "0.8")]
- public void set_renderer (Champlain.Renderer renderer);
- [Version (since = "0.6")]
- public Champlain.MapSource next_source { get; set; }
- [Version (since = "0.8")]
- public Champlain.Renderer renderer { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_map_source_chain_get_type ()")]
- [Version (since = "0.6")]
- public class MapSourceChain : Champlain.MapSource {
- [CCode (has_construct_function = false)]
- public MapSourceChain ();
- public void pop ();
- public void push (Champlain.MapSource map_source);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_map_source_desc_get_type ()")]
- [Version (since = "0.10")]
- public class MapSourceDesc : GLib.Object {
- [CCode (has_construct_function = false)]
- protected MapSourceDesc ();
- public void* get_data ();
- public unowned string get_id ();
- public unowned string get_license ();
- public unowned string get_license_uri ();
- public uint get_max_zoom_level ();
- public uint get_min_zoom_level ();
- public unowned string get_name ();
- public Champlain.MapProjection get_projection ();
- public uint get_tile_size ();
- public unowned string get_uri_format ();
- [NoAccessorMethod]
- public void* constructor { get; construct; }
- public void* data { get; construct; }
- public string id { get; construct; }
- public string license { get; construct; }
- public string license_uri { get; construct; }
- public uint max_zoom_level { get; construct; }
- public uint min_zoom_level { get; construct; }
- public string name { get; construct; }
- public Champlain.MapProjection projection { get; construct; }
- public uint tile_size { get; construct; }
- public string uri_format { get; construct; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_map_source_factory_get_type ()")]
- [Version (since = "0.4")]
- public class MapSourceFactory : GLib.Object {
- [CCode (has_construct_function = false)]
- protected MapSourceFactory ();
- public unowned Champlain.MapSource create (string id);
- [Version (since = "0.6")]
- public unowned Champlain.MapSource create_cached_source (string id);
- [Version (since = "0.8")]
- public unowned Champlain.MapSource create_error_source (uint tile_size);
- [Version (since = "0.12.5")]
- public unowned Champlain.MapSource create_memcached_source (string id);
- public static Champlain.MapSourceFactory dup_default ();
- public GLib.SList get_registered ();
- [Version (since = "0.10")]
- public bool register (Champlain.MapSourceDesc desc);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_marker_get_type ()")]
- [Version (since = "0.10")]
- public class Marker : Clutter.Actor, Atk.Implementor, Champlain.Location, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- [Version (since = "0.12.4")]
- public Marker ();
- public void animate_in ();
- public void animate_in_with_delay (uint delay);
- public void animate_out ();
- public void animate_out_with_delay (uint delay);
- public bool get_draggable ();
- public bool get_selectable ();
- public bool get_selected ();
- public static unowned Clutter.Color? get_selection_color ();
- public static unowned Clutter.Color? get_selection_text_color ();
- public void set_draggable (bool value);
- public void set_selectable (bool value);
- public void set_selected (bool value);
- public static void set_selection_color (Clutter.Color color);
- public static void set_selection_text_color (Clutter.Color color);
- public bool draggable { get; set; }
- public bool selectable { get; set; }
- public bool selected { get; set; }
- public signal void button_press (Clutter.Event event);
- public signal void button_release (Clutter.Event event);
- public signal void drag_finish (Clutter.Event event);
- public signal void drag_motion (double dx, double dy, Clutter.Event event);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_marker_layer_get_type ()")]
- [Version (since = "0.10")]
- public class MarkerLayer : Champlain.Layer, Atk.Implementor, Champlain.Exportable, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false)]
- public MarkerLayer ();
- public void add_marker (Champlain.Marker marker);
- public void animate_in_all_markers ();
- public void animate_out_all_markers ();
- [CCode (has_construct_function = false)]
- public MarkerLayer.full (Champlain.SelectionMode mode);
- public GLib.List get_markers ();
- public GLib.List get_selected ();
- public Champlain.SelectionMode get_selection_mode ();
- public void hide_all_markers ();
- public void remove_all ();
- public void remove_marker (Champlain.Marker marker);
- public void select_all_markers ();
- public void set_all_markers_draggable ();
- public void set_all_markers_undraggable ();
- public void set_selection_mode (Champlain.SelectionMode mode);
- public void show_all_markers ();
- public void unselect_all_markers ();
- public Champlain.SelectionMode selection_mode { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_memory_cache_get_type ()")]
- [Version (since = "0.8")]
- public class MemoryCache : Champlain.TileCache {
- [CCode (has_construct_function = false)]
- protected MemoryCache ();
- public void clean ();
- [CCode (has_construct_function = false)]
- public MemoryCache.full (uint size_limit, Champlain.Renderer renderer);
- public uint get_size_limit ();
- public void set_size_limit (uint size_limit);
- public uint size_limit { get; set construct; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_network_bbox_tile_source_get_type ()")]
- [Version (since = "0.8")]
- public class NetworkBboxTileSource : Champlain.TileSource {
- [CCode (has_construct_function = false)]
- protected NetworkBboxTileSource ();
- [CCode (has_construct_function = false)]
- public NetworkBboxTileSource.full (string id, string name, string license, string license_uri, uint min_zoom, uint max_zoom, uint tile_size, Champlain.MapProjection projection, Champlain.Renderer renderer);
- public unowned string get_api_uri ();
- [Version (since = "0.10")]
- public void load_map_data (Champlain.BoundingBox bbox);
- public void set_api_uri (string api_uri);
- [Version (since = "0.12.16")]
- public void set_user_agent (string user_agent);
- public string api_uri { get; set; }
- [NoAccessorMethod]
- public string proxy_uri { owned get; set; }
- [NoAccessorMethod]
- public Champlain.State state { get; set; }
- [Version (since = "0.12.16")]
- public string user_agent { set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_network_tile_source_get_type ()")]
- [Version (since = "0.6")]
- public class NetworkTileSource : Champlain.TileSource {
- [CCode (has_construct_function = false)]
- protected NetworkTileSource ();
- [CCode (has_construct_function = false)]
- [Version (since = "0.4")]
- public NetworkTileSource.full (string id, string name, string license, string license_uri, uint min_zoom, uint max_zoom, uint tile_size, Champlain.MapProjection projection, string uri_format, Champlain.Renderer renderer);
- [Version (since = "0.12.14")]
- public int get_max_conns ();
- public bool get_offline ();
- public unowned string get_proxy_uri ();
- public unowned string get_uri_format ();
- [Version (since = "0.12.14")]
- public void set_max_conns (int max_conns);
- public void set_offline (bool offline);
- public void set_proxy_uri (string proxy_uri);
- [Version (since = "0.4")]
- public void set_uri_format (string uri_format);
- [Version (since = "0.12.16")]
- public void set_user_agent (string user_agent);
- [Version (since = "0.12.14")]
- public int max_conns { get; set; }
- [Version (since = "0.4")]
- public bool offline { get; set; }
- [Version (since = "0.4")]
- public string proxy_uri { get; set; }
- [Version (since = "0.4")]
- public string uri_format { get; set construct; }
- [Version (since = "0.12.16")]
- public string user_agent { set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_null_tile_source_get_type ()")]
- [Version (since = "0.8")]
- public class NullTileSource : Champlain.TileSource {
- [CCode (has_construct_function = false)]
- protected NullTileSource ();
- [CCode (has_construct_function = false)]
- public NullTileSource.full (Champlain.Renderer renderer);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_path_layer_get_type ()")]
- [Version (since = "0.10")]
- public class PathLayer : Champlain.Layer, Atk.Implementor, Champlain.Exportable, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false)]
- public PathLayer ();
- public void add_node (Champlain.Location location);
- public bool get_closed ();
- [Version (since = "0.12.4")]
- public GLib.List get_dash ();
- public bool get_fill ();
- public Clutter.Color? get_fill_color ();
- public GLib.List get_nodes ();
- public bool get_stroke ();
- public Clutter.Color? get_stroke_color ();
- public double get_stroke_width ();
- public bool get_visible ();
- public void insert_node (Champlain.Location location, uint position);
- public void remove_all ();
- public void remove_node (Champlain.Location location);
- public void set_closed (bool value);
- [Version (since = "0.12.4")]
- public void set_dash (GLib.List dash_pattern);
- public void set_fill (bool value);
- public void set_fill_color (Clutter.Color? color);
- public void set_stroke (bool value);
- public void set_stroke_color (Clutter.Color? color);
- public void set_stroke_width (double value);
- public void set_visible (bool value);
- public bool closed { get; set; }
- public bool fill { get; set; }
- public Clutter.Color fill_color { owned get; set; }
- public bool stroke { get; set; }
- public Clutter.Color stroke_color { owned get; set; }
- public double stroke_width { get; set; }
- public bool visible { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_point_get_type ()")]
- [Version (since = "0.10")]
- public class Point : Champlain.Marker, Atk.Implementor, Champlain.Exportable, Champlain.Location, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Point ();
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Point.full (double size, Clutter.Color color);
- public Clutter.Color? get_color ();
- public double get_size ();
- public void set_color (Clutter.Color? color);
- public void set_size (double size);
- public Clutter.Color color { owned get; set; }
- public double size { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_renderer_get_type ()")]
- [Version (since = "0.8")]
- public class Renderer : GLib.InitiallyUnowned {
- [CCode (has_construct_function = false)]
- protected Renderer ();
- public virtual void render (Champlain.Tile tile);
- public virtual void set_data ([CCode (array_length_cname = "size", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_scale_get_type ()")]
- [Version (since = "0.10")]
- public class Scale : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Scale ();
- public void connect_view (Champlain.View view);
- public void disconnect_view ();
- public uint get_max_width ();
- public Champlain.Unit get_unit ();
- public void set_max_width (uint value);
- public void set_unit (Champlain.Unit unit);
- public uint max_width { get; set; }
- public Champlain.Unit unit { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_tile_get_type ()")]
- [Version (since = "0.4")]
- public class Tile : Clutter.Actor, Atk.Implementor, Champlain.Exportable, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false)]
- public Tile ();
- [Version (since = "0.8")]
- public void display_content ();
- [CCode (has_construct_function = false)]
- public Tile.full (uint x, uint y, uint size, uint zoom_level);
- public unowned Clutter.Actor get_content ();
- public unowned string get_etag ();
- [Version (since = "0.6")]
- public bool get_fade_in ();
- public unowned GLib.TimeVal? get_modified_time ();
- public uint get_size ();
- public Champlain.State get_state ();
- public uint get_x ();
- public uint get_y ();
- public uint get_zoom_level ();
- public void set_content (Clutter.Actor actor);
- public void set_etag (string etag);
- [Version (since = "0.6")]
- public void set_fade_in (bool fade_in);
- public void set_modified_time (GLib.TimeVal time);
- public void set_size (uint size);
- public void set_state (Champlain.State state);
- public void set_x (uint x);
- public void set_y (uint y);
- public void set_zoom_level (uint zoom_level);
- public Clutter.Actor content { get; set; }
- public string etag { get; set; }
- [Version (since = "0.6")]
- public bool fade_in { get; set; }
- public uint size { get; set; }
- public Champlain.State state { get; set; }
- public uint x { get; set; }
- public uint y { get; set; }
- public uint zoom_level { get; set; }
- [Version (since = "0.10")]
- public signal void render_complete (void* data, uint size, bool error);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_tile_cache_get_type ()")]
- [Version (since = "0.6")]
- public abstract class TileCache : Champlain.MapSource {
- [CCode (has_construct_function = false)]
- protected TileCache ();
- public virtual void on_tile_filled (Champlain.Tile tile);
- public virtual void refresh_tile_time (Champlain.Tile tile);
- public virtual void store_tile (Champlain.Tile tile, string contents, size_t size);
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_tile_source_get_type ()")]
- [Version (since = "0.6")]
- public abstract class TileSource : Champlain.MapSource {
- [CCode (has_construct_function = false)]
- protected TileSource ();
- public unowned Champlain.TileCache get_cache ();
- public void set_cache (Champlain.TileCache cache);
- [Version (since = "0.4")]
- public void set_id (string id);
- [Version (since = "0.4")]
- public void set_license (string license);
- [Version (since = "0.4")]
- public void set_license_uri (string license_uri);
- public void set_max_zoom_level (uint zoom_level);
- public void set_min_zoom_level (uint zoom_level);
- [Version (since = "0.4")]
- public void set_name (string name);
- [Version (since = "0.4")]
- public void set_projection (Champlain.MapProjection projection);
- public void set_tile_size (uint tile_size);
- public Champlain.TileCache cache { get; set; }
- [NoAccessorMethod]
- [Version (since = "0.4")]
- public string id { owned get; set construct; }
- [NoAccessorMethod]
- [Version (since = "0.4")]
- public string license { owned get; set construct; }
- [NoAccessorMethod]
- [Version (since = "0.4")]
- public string license_uri { owned get; set construct; }
- [NoAccessorMethod]
- [Version (since = "0.4")]
- public uint max_zoom_level { get; set construct; }
- [NoAccessorMethod]
- [Version (since = "0.4")]
- public uint min_zoom_level { get; set construct; }
- [NoAccessorMethod]
- [Version (since = "0.4")]
- public string name { owned get; set construct; }
- [NoAccessorMethod]
- [Version (since = "0.4")]
- public Champlain.MapProjection projection { get; set construct; }
- [NoAccessorMethod]
- [Version (since = "0.4")]
- public uint tile_size { get; set construct; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_view_get_type ()")]
- [Version (since = "0.1")]
- public class View : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- [Version (since = "0.4")]
- public View ();
- [Version (since = "0.2")]
- public void add_layer (Champlain.Layer layer);
- [Version (since = "0.12.5")]
- public void add_overlay_source (Champlain.MapSource map_source, uint8 opacity);
- [Version (deprecated = true, deprecated_since = "0.12.4", since = "0.10")]
- public void bin_layout_add (Clutter.Actor child, Clutter.BinAlignment x_align, Clutter.BinAlignment y_align);
- public void center_on (double latitude, double longitude);
- [Version (since = "0.10")]
- public void ensure_layers_visible (bool animate);
- [Version (since = "0.10")]
- public void ensure_visible (Champlain.BoundingBox bbox, bool animate);
- [Version (since = "0.12")]
- public bool get_animate_zoom ();
- [Version (since = "0.12.4")]
- public unowned Clutter.Content get_background_pattern ();
- [Version (since = "0.12.4")]
- public Champlain.BoundingBox get_bounding_box ();
- [Version (since = "0.12.6")]
- public Champlain.BoundingBox get_bounding_box_for_zoom_level (uint zoom_level);
- [Version (since = "0.10")]
- public double get_center_latitude ();
- [Version (since = "0.10")]
- public double get_center_longitude ();
- [Version (since = "0.4")]
- public double get_deceleration ();
- public bool get_horizontal_wrap ();
- [Version (since = "0.4")]
- public bool get_keep_center_on_resize ();
- [Version (since = "0.10")]
- public bool get_kinetic_mode ();
- [Version (since = "0.10")]
- public unowned Champlain.License get_license_actor ();
- [Version (since = "0.4")]
- public unowned Champlain.MapSource get_map_source ();
- [Version (since = "0.4")]
- public uint get_max_zoom_level ();
- [Version (since = "0.4")]
- public uint get_min_zoom_level ();
- [Version (since = "0.12.5")]
- public GLib.List get_overlay_sources ();
- [Version (since = "0.10")]
- public Champlain.State get_state ();
- [Version (since = "0.12.14")]
- public void get_viewport_anchor (out int anchor_x, out int anchor_y);
- [Version (since = "0.10")]
- public void get_viewport_origin (out int x, out int y);
- [Version (since = "0.12.11")]
- public unowned Champlain.BoundingBox get_world ();
- [Version (since = "0.4")]
- public uint get_zoom_level ();
- [Version (since = "0.4")]
- public bool get_zoom_on_double_click ();
- [Version (since = "0.4")]
- public void go_to (double latitude, double longitude);
- [Version (since = "0.10")]
- public double latitude_to_y (double latitude);
- [Version (since = "0.10")]
- public double longitude_to_x (double longitude);
- [Version (since = "0.8")]
- public void reload_tiles ();
- [Version (since = "0.4.1")]
- public void remove_layer (Champlain.Layer layer);
- [Version (since = "0.12.5")]
- public void remove_overlay_source (Champlain.MapSource map_source);
- [Version (since = "0.12")]
- public void set_animate_zoom (bool value);
- [Version (since = "0.12.4")]
- public void set_background_pattern (Clutter.Content background);
- [Version (since = "0.4")]
- public void set_deceleration (double rate);
- public void set_horizontal_wrap (bool wrap);
- [Version (since = "0.4")]
- public void set_keep_center_on_resize (bool value);
- [Version (since = "0.10")]
- public void set_kinetic_mode (bool kinetic);
- [Version (since = "0.4")]
- public void set_map_source (Champlain.MapSource map_source);
- [Version (since = "0.4")]
- public void set_max_zoom_level (uint zoom_level);
- [Version (since = "0.4")]
- public void set_min_zoom_level (uint zoom_level);
- [Version (since = "0.12.11")]
- public void set_world (Champlain.BoundingBox bbox);
- [Version (since = "0.4")]
- public void set_zoom_level (uint zoom_level);
- [Version (since = "0.4")]
- public void set_zoom_on_double_click (bool value);
- [Version (since = "0.4")]
- public void stop_go_to ();
- public Cairo.Surface to_surface (bool include_layers);
- [Version (since = "0.10")]
- public double x_to_longitude (double x);
- [Version (since = "0.10")]
- public double y_to_latitude (double y);
- public void zoom_in ();
- public void zoom_out ();
- [Version (since = "0.12")]
- public bool animate_zoom { get; set; }
- [Version (since = "0.12.4")]
- public Clutter.Actor background_pattern { get; set; }
- [Version (since = "0.10")]
- public double deceleration { get; set; }
- [NoAccessorMethod]
- public uint goto_animation_duration { get; set; }
- [NoAccessorMethod]
- public Clutter.AnimationMode goto_animation_mode { get; set; }
- public bool horizontal_wrap { get; set; }
- [Version (since = "0.2.7")]
- public bool keep_center_on_resize { get; set; }
- [Version (since = "0.10")]
- public bool kinetic_mode { get; set; }
- [NoAccessorMethod]
- public double latitude { get; set; }
- [NoAccessorMethod]
- public double longitude { get; set; }
- [Version (since = "0.2")]
- public Champlain.MapSource map_source { get; set; }
- [Version (since = "0.4")]
- public uint max_zoom_level { get; set; }
- [Version (since = "0.4")]
- public uint min_zoom_level { get; set; }
- [Version (since = "0.4")]
- public Champlain.State state { get; }
- [Version (since = "0.12.11")]
- public Champlain.BoundingBox world { get; set; }
- public uint zoom_level { get; set; }
- [Version (since = "0.4")]
- public bool zoom_on_double_click { get; set; }
- [Version (since = "0.4")]
- public signal void animation_completed ();
- [Version (since = "0.10")]
- public signal void layer_relocated ();
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_viewport_get_type ()")]
- public class Viewport : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
- [CCode (has_construct_function = false, type = "ClutterActor*")]
- public Viewport ();
- public void get_adjustments (Champlain.Adjustment hadjustment, Champlain.Adjustment vadjustment);
- public void get_anchor (int x, int y);
- public void get_origin (double x, double y);
- public void set_actor_position (Clutter.Actor actor, double x, double y);
- public void set_adjustments (Champlain.Adjustment hadjustment, Champlain.Adjustment vadjustment);
- public void set_child (Clutter.Actor child);
- public void set_origin (double x, double y);
- public void stop ();
- [NoAccessorMethod]
- public Champlain.Adjustment hadjustment { owned get; set; }
- [NoAccessorMethod]
- public Champlain.Adjustment vadjustment { owned get; set; }
- [NoAccessorMethod]
- public int x_origin { get; set; }
- [NoAccessorMethod]
- public int y_origin { get; set; }
- public signal void relocated ();
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_exportable_get_type ()")]
- public interface Exportable : GLib.Object {
- [Version (since = "0.12.12")]
- public abstract unowned Cairo.Surface get_surface ();
- [Version (since = "0.12.12")]
- public abstract void set_surface (Cairo.Surface surface);
- [Version (since = "0.12.12")]
- public abstract Cairo.Surface surface { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_location_get_type ()")]
- public interface Location : GLib.Object {
- [Version (since = "0.10")]
- public abstract double get_latitude ();
- [Version (since = "0.10")]
- public abstract double get_longitude ();
- [Version (since = "0.10")]
- public abstract void set_location (double latitude, double longitude);
- [NoAccessorMethod]
- [Version (since = "0.10")]
- public abstract double latitude { get; set; }
- [NoAccessorMethod]
- [Version (since = "0.10")]
- public abstract double longitude { get; set; }
- }
- [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_MAP_PROJECTION_", type_id = "champlain_map_projection_get_type ()")]
- public enum MapProjection {
- MERCATOR
- }
- [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_SELECTION_", type_id = "champlain_selection_mode_get_type ()")]
- public enum SelectionMode {
- NONE,
- SINGLE,
- MULTIPLE
- }
- [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_STATE_", type_id = "champlain_state_get_type ()")]
- public enum State {
- NONE,
- LOADING,
- LOADED,
- DONE
- }
- [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_UNIT_", type_id = "champlain_unit_get_type ()")]
- public enum Unit {
- KM,
- MILES
- }
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAJOR_VERSION")]
- public const int MAJOR_VERSION;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_MEMPHIS_LOCAL")]
- public const string MAP_SOURCE_MEMPHIS_LOCAL;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_MEMPHIS_NETWORK")]
- public const string MAP_SOURCE_MEMPHIS_NETWORK;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_MFF_RELIEF")]
- public const string MAP_SOURCE_MFF_RELIEF;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OAM")]
- [Version (deprecated = true)]
- public const string MAP_SOURCE_OAM;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_AERIAL_MAP")]
- [Version (deprecated = true)]
- public const string MAP_SOURCE_OSM_AERIAL_MAP;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP")]
- public const string MAP_SOURCE_OSM_CYCLE_MAP;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK")]
- public const string MAP_SOURCE_OSM_MAPNIK;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST")]
- [Version (deprecated = true)]
- public const string MAP_SOURCE_OSM_MAPQUEST;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER")]
- [Version (deprecated = true)]
- public const string MAP_SOURCE_OSM_OSMARENDER;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP")]
- public const string MAP_SOURCE_OSM_TRANSPORT_MAP;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OWM_CLOUDS")]
- public const string MAP_SOURCE_OWM_CLOUDS;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OWM_PRECIPITATION")]
- public const string MAP_SOURCE_OWM_PRECIPITATION;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OWM_PRESSURE")]
- public const string MAP_SOURCE_OWM_PRESSURE;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OWM_TEMPERATURE")]
- public const string MAP_SOURCE_OWM_TEMPERATURE;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OWM_WIND")]
- public const string MAP_SOURCE_OWM_WIND;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAX_LATITUDE")]
- public const double MAX_LATITUDE;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAX_LONGITUDE")]
- public const double MAX_LONGITUDE;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MICRO_VERSION")]
- public const int MICRO_VERSION;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MINOR_VERSION")]
- public const int MINOR_VERSION;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MIN_LATITUDE")]
- public const double MIN_LATITUDE;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MIN_LONGITUDE")]
- public const double MIN_LONGITUDE;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_VERSION")]
- public const double VERSION;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_VERSION_HEX")]
- public const int VERSION_HEX;
- [CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_VERSION_S")]
- public const string VERSION_S;
-}
diff --git a/vapi/champlain-gtk-0.12.deps b/vapi/champlain-gtk-0.12.deps
deleted file mode 100644
index 6ed23b451..000000000
--- a/vapi/champlain-gtk-0.12.deps
+++ /dev/null
@@ -1,6 +0,0 @@
-clutter-gtk-1.0
-cogl-pango-1.0
-gtk+-3.0
-atk
-pangocairo
-champlain-0.12
diff --git a/vapi/champlain-gtk-0.12.vapi b/vapi/champlain-gtk-0.12.vapi
deleted file mode 100644
index 1a35aa1fa..000000000
--- a/vapi/champlain-gtk-0.12.vapi
+++ /dev/null
@@ -1,14 +0,0 @@
-/* champlain-gtk-0.12.vapi generated by vapigen, do not modify. */
-
-[CCode (cprefix = "GtkChamplain", gir_namespace = "GtkChamplain", gir_version = "0.12", lower_case_cprefix = "gtk_champlain_")]
-namespace GtkChamplain {
- [CCode (cheader_filename = "champlain-gtk/champlain-gtk.h", type_id = "gtk_champlain_embed_get_type ()")]
- [Version (since = "0.4")]
- public class Embed : Gtk.Alignment, Atk.Implementor, Gtk.Buildable {
- [CCode (has_construct_function = false, type = "GtkWidget*")]
- public Embed ();
- public unowned Champlain.View get_view ();
- [NoAccessorMethod]
- public Champlain.View champlain_view { owned get; }
- }
-}