Merge lp:~marcus-lundgren/maya/fix-1020798 into lp:~elementary-apps/maya/trunk

Proposed by Marcus Lundgren
Status: Merged
Approved by: Cody Garver
Approved revision: 470
Merged at revision: 470
Proposed branch: lp:~marcus-lundgren/maya/fix-1020798
Merge into: lp:~elementary-apps/maya/trunk
Diff against target: 212 lines (+0/-69)
6 files modified
Maya/Application.vala (+0/-26)
Maya/View/MayaToolbar.vala (+0/-7)
Maya/View/Sidebar/AgendaView.vala (+0/-8)
Maya/View/Sidebar/EventWidget.vala (+0/-12)
Maya/View/Sidebar/Sidebar.vala (+0/-8)
Maya/View/Sidebar/SourceWidget.vala (+0/-8)
To merge this branch: bzr merge lp:~marcus-lundgren/maya/fix-1020798
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
Review via email: mp+175263@code.launchpad.net

Commit message

Removed the toolbar buttons to edit and delete an event.

Description of the change

Removed the toolbar buttons to edit and delete an event.

To post a comment you must log in.
lp:~marcus-lundgren/maya/fix-1020798 updated
470. By Marcus Lundgren

Removed dead code.

Revision history for this message
David Gomes (davidgomes) wrote :

I can approve the code and I couldn't find any references of these buttons that weren't deleted, but I can't compile Maya on Ubuntu 13.04 so we'll need somebody to test this so that it can be approved and merged.

Revision history for this message
Cody Garver (codygarver) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Maya/Application.vala'
2--- Maya/Application.vala 2013-05-02 00:13:23 +0000
3+++ Maya/Application.vala 2013-07-19 11:28:25 +0000
4@@ -116,8 +116,6 @@
5 Model.CalendarModel calmodel;
6 View.SourceSelector source_selector;
7
8- E.CalComponent sidebar_selected_event = null;
9-
10 /**
11 * Called when the application is activated.
12 */
13@@ -215,8 +213,6 @@
14 // Don't automatically display all the widgets on the sidebar
15 sidebar.no_show_all = true;
16 sidebar.show ();
17- sidebar.event_selected.connect ((event) => (on_sidebar_selected (event)));
18- sidebar.event_deselected.connect ((event) => (on_sidebar_deselected (event)));
19 sidebar.event_removed.connect (on_remove);
20 sidebar.event_modified.connect (on_modified);
21 sidebar.agenda_view.shown_changed.connect (on_agenda_view_shown_changed);
22@@ -252,26 +248,6 @@
23 }
24
25 /**
26- * Called when an event is selected in the sidebar.
27- */
28- void on_sidebar_selected (E.CalComponent event) {
29- sidebar_selected_event = event;
30-
31- toolbar.edit_button.sensitive = true;
32- toolbar.delete_button.sensitive = true;
33- }
34-
35- /**
36- * Called when an event is deselected in the sidebar.
37- */
38- void on_sidebar_deselected (E.CalComponent event) {
39- sidebar_selected_event = null;
40-
41- toolbar.edit_button.sensitive = false;
42- toolbar.delete_button.sensitive = false;
43- }
44-
45- /**
46 * Called when the remove button is selected.
47 */
48 void on_remove (E.CalComponent comp) {
49@@ -325,8 +301,6 @@
50 void create_toolbar () {
51 toolbar = new View.MayaToolbar (calmodel.month_start);
52 toolbar.button_add.clicked.connect (() => on_tb_add_clicked (calview.grid.selected_date));
53- toolbar.edit_button.clicked.connect (() => on_modified (sidebar_selected_event));
54- toolbar.delete_button.clicked.connect (() => on_remove (sidebar_selected_event));
55 toolbar.button_calendar_sources.clicked.connect (on_tb_sources_clicked);
56 toolbar.menu.today.activate.connect (on_menu_today_toggled);
57 toolbar.menu.fullscreen.toggled.connect (on_toggle_fullscreen);
58
59=== modified file 'Maya/View/MayaToolbar.vala'
60--- Maya/View/MayaToolbar.vala 2012-06-21 15:20:29 +0000
61+++ Maya/View/MayaToolbar.vala 2013-07-19 11:28:25 +0000
62@@ -20,8 +20,6 @@
63 public class MayaToolbar : Gtk.Toolbar {
64
65 public Gtk.ToolButton button_add { get; private set; }
66- public Gtk.ToolButton edit_button { get; private set; }
67- public Gtk.ToolButton delete_button { get; private set; }
68
69 public Widgets.DateSwitcher month_switcher { get; private set; }
70 public Widgets.DateSwitcher year_switcher { get; private set; }
71@@ -43,9 +41,6 @@
72 // Initialize everything
73 button_add = make_toolbutton (Gtk.IconTheme.get_default ().has_icon ("event-new") ? "event-new" : "list-add", _("Create a new event"));
74
75- edit_button = make_toolbutton ("edit", _("Edit the selected event"), false);
76- delete_button = make_toolbutton ("edit-delete", _("Delete the selected event"), false);
77-
78 button_calendar_sources = make_toolbutton ("gtk-index", _("Select calendars to display"), true);
79
80 month_switcher = new Widgets.DateSwitcher (10);
81@@ -62,8 +57,6 @@
82
83 // Insert into appropriate positions
84 insert (button_add, -1);
85- insert (edit_button, -1);
86- insert (delete_button, -1);
87
88 insert (make_spacer (), -1);
89
90
91=== modified file 'Maya/View/Sidebar/AgendaView.vala'
92--- Maya/View/Sidebar/AgendaView.vala 2012-09-16 15:50:08 +0000
93+++ Maya/View/Sidebar/AgendaView.vala 2013-07-19 11:28:25 +0000
94@@ -38,12 +38,6 @@
95
96 Model.SourceManager sourcemgr;
97
98- // Sent out when an event is selected.
99- public signal void event_selected (E.CalComponent event);
100-
101- // Sent out when an event is deselected.
102- public signal void event_deselected (E.CalComponent event);
103-
104 public signal void event_removed (E.CalComponent event);
105 public signal void event_modified (E.CalComponent event);
106
107@@ -134,8 +128,6 @@
108
109 source_widgets.set (source, widget);
110 widget.shown_changed.connect (on_source_shown_changed);
111- widget.event_selected.connect ((event) => (event_selected (event)));
112- widget.event_deselected.connect ((event) => (event_deselected (event)));
113 widget.event_modified.connect ((event) => (event_modified (event)));
114 widget.event_removed.connect ((event) => (event_removed (event)));
115 widget.selected = true;
116
117=== modified file 'Maya/View/Sidebar/EventWidget.vala'
118--- Maya/View/Sidebar/EventWidget.vala 2012-09-16 15:50:08 +0000
119+++ Maya/View/Sidebar/EventWidget.vala 2013-07-19 11:28:25 +0000
120@@ -42,12 +42,6 @@
121 Gtk.Button close_button;
122 Gtk.Button edit_button;
123
124- // Signal sent out when the event is selected.
125- public signal void selected ();
126-
127- // Signal sent out when the event is deselected.
128- public signal void deselected ();
129-
130 // Signal sent out when a button is pressed
131
132 public signal void removed (E.CalComponent event);
133@@ -120,20 +114,15 @@
134 }
135
136 private bool on_button_press (Gdk.EventButton event) {
137-
138 grab_focus ();
139 return true;
140 }
141
142 private bool on_focus_in (Gdk.EventFocus event) {
143-
144- selected ();
145 return false;
146 }
147
148 private bool on_focus_out (Gdk.EventFocus event) {
149-
150- deselected ();
151 return false;
152 }
153
154@@ -141,7 +130,6 @@
155 * Updates the event to match the given event.
156 */
157 public void update (E.CalComponent event) {
158-
159 name_label.set_markup ("<big>" + Markup.escape_text (get_label (event)) + "</big>");
160
161 string end_string = get_end_string (event);
162
163=== modified file 'Maya/View/Sidebar/Sidebar.vala'
164--- Maya/View/Sidebar/Sidebar.vala 2012-09-16 15:50:08 +0000
165+++ Maya/View/Sidebar/Sidebar.vala 2013-07-19 11:28:25 +0000
166@@ -28,12 +28,6 @@
167
168 Gtk.ScrolledWindow scrolled_window;
169
170- // Sent out when an event is selected.
171- public signal void event_selected (E.CalComponent event);
172-
173- // Sent out when an event is deselected.
174- public signal void event_deselected (E.CalComponent event);
175-
176 public signal void event_removed (E.CalComponent event);
177 public signal void event_modified (E.CalComponent event);
178
179@@ -87,8 +81,6 @@
180 label_box.show ();
181 label.show ();
182 agenda_view.shown_changed.connect (on_agenda_view_shown_changed);
183- agenda_view.event_selected.connect ((event) => (event_selected (event)));
184- agenda_view.event_deselected.connect ((event) => (event_deselected (event)));
185 agenda_view.event_removed.connect ((event) => (event_removed (event)));
186 agenda_view.event_modified.connect ((event) => (event_modified (event)));
187 }
188
189=== modified file 'Maya/View/Sidebar/SourceWidget.vala'
190--- Maya/View/Sidebar/SourceWidget.vala 2012-09-16 15:50:08 +0000
191+++ Maya/View/Sidebar/SourceWidget.vala 2013-07-19 11:28:25 +0000
192@@ -43,12 +43,6 @@
193 // Sent out when the visibility of this widget changes.
194 public signal void shown_changed (bool old, bool new);
195
196- // Sent out when an event is selected.
197- public signal void event_selected (E.CalComponent event);
198-
199- // Sent out when an event is selected.
200- public signal void event_deselected (E.CalComponent event);
201-
202 public signal void event_removed (E.CalComponent event);
203 public signal void event_modified (E.CalComponent event);
204
205@@ -261,8 +255,6 @@
206 EventWidget widget = new EventWidget (this.sourcemgr, this.group, this.source, event);
207 attach (widget, 0, number_of_events, 1, 1);
208 number_of_events++;
209- widget.selected.connect (() => {event_selected (event);});
210- widget.deselected.connect (() => {event_deselected (event);});
211 widget.modified.connect ((event) => (event_modified (event)));
212 widget.removed.connect ((event) => (event_removed (event)));
213

Subscribers

People subscribed via source and target branches