@@ -47,45 +47,6 @@ public class Maya.View.CalendarView : Gtk.Box {
4747 var action_group = new SimpleActionGroup ();
4848 action_group. add_action (export_action);
4949
50- var contractor_menu = new GLib .Menu ();
51-
52- try {
53- var contracts = Granite . Services . ContractorProxy . get_contracts_by_mime (" text/calender" );
54-
55- int i = 0 ;
56- foreach (var contract in contracts) {
57- var contract_action = new SimpleAction (" contract-%i " . printf (i), null );
58- contract_action. activate. connect (() = > {
59- /* creates a .ics file */
60- Util . save_temp_selected_calendars ();
61-
62- var file_path = GLib . Environment . get_tmp_dir () + " /calendar.ics" ;
63- var cal_file = File . new_for_path (file_path);
64-
65- try {
66- contract. execute_with_file (cal_file);
67- } catch (Error err) {
68- warning (err. message);
69- }
70- });
71-
72- action_group. add_action (contract_action);
73-
74- contractor_menu. append (
75- contract. get_display_name (),
76- ACTION_PREFIX + " contract-%i " . printf (i)
77- );
78- i++ ;
79- }
80- } catch (GLib . Error error) {
81- critical (error. message);
82- }
83-
84- contractor_menu. append (
85- _(" Export Calendar…" ),
86- " calendar.export"
87- );
88-
8950 insert_action_group (ACTION_GROUP_PREFIX , action_group);
9051
9152 selected_date = Maya . Application . get_selected_datetime ();
@@ -123,13 +84,6 @@ public class Maya.View.CalendarView : Gtk.Box {
12384
12485 var spinner = new Maya .View .Widgets .DynamicSpinner ();
12586
126- var contractor = new Gtk .MenuButton () {
127- image = new Gtk .Image .from_icon_name (" document-export" , LARGE_TOOLBAR ),
128- menu_model = contractor_menu,
129- tooltip_text = _ ("Export or Share the default Calendar "),
130- use_popover = false
131- };
132-
13387 var source_popover = new Calendar .Widgets .SourcePopover ();
13488
13589 var menu_button = new Gtk .MenuButton () {
@@ -145,7 +99,6 @@ public class Maya.View.CalendarView : Gtk.Box {
14599 header_bar.pack_start (year_switcher );
146100 header_bar.pack_start (button_today );
147101 header_bar.pack_end (menu_button );
148- header_bar.pack_end (contractor );
149102 header_bar.pack_end (spinner );
150103
151104 header_bar.get_style_context ().add_class (Gtk .STYLE_CLASS_FLAT );
0 commit comments