Fix vala mainline switch statement build warnings
This commit is contained in:
parent
4411e00b18
commit
850bb3139f
17 changed files with 120 additions and 17 deletions
|
|
@ -365,6 +365,10 @@ private class Accounts.AccountListRow : AccountRow<EditorListPane,Gtk.Grid> {
|
||||||
case Geary.ServiceProvider.YAHOO:
|
case Geary.ServiceProvider.YAHOO:
|
||||||
details = _("Yahoo");
|
details = _("Yahoo");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Geary.ServiceProvider.OTHER:
|
||||||
|
// no-op: Use the generated label
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
this.service_label.set_text(details);
|
this.service_label.set_text(details);
|
||||||
}
|
}
|
||||||
|
|
@ -393,6 +397,10 @@ private class Accounts.AccountListRow : AccountRow<EditorListPane,Gtk.Grid> {
|
||||||
_("This account has encountered a problem and is unavailable")
|
_("This account has encountered a problem and is unavailable")
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case REMOVED:
|
||||||
|
// Nothing to do - account is gone
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.unavailable_icon.set_visible(!enabled);
|
this.unavailable_icon.set_visible(!enabled);
|
||||||
|
|
@ -440,7 +448,7 @@ private class Accounts.AddServiceProviderRow : EditorRow<EditorListPane> {
|
||||||
this.provider = provider;
|
this.provider = provider;
|
||||||
|
|
||||||
// Translators: Label for adding a generic email account
|
// Translators: Label for adding a generic email account
|
||||||
string? name = _("Other email providers");
|
string? name = null;
|
||||||
switch (provider) {
|
switch (provider) {
|
||||||
case Geary.ServiceProvider.GMAIL:
|
case Geary.ServiceProvider.GMAIL:
|
||||||
name = _("Gmail");
|
name = _("Gmail");
|
||||||
|
|
@ -453,6 +461,10 @@ private class Accounts.AddServiceProviderRow : EditorRow<EditorListPane> {
|
||||||
case Geary.ServiceProvider.YAHOO:
|
case Geary.ServiceProvider.YAHOO:
|
||||||
name = _("Yahoo");
|
name = _("Yahoo");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Geary.ServiceProvider.OTHER:
|
||||||
|
name = _("Other email providers");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
this.service_name.set_text(name);
|
this.service_name.set_text(name);
|
||||||
this.service_name.set_hexpand(true);
|
this.service_name.set_hexpand(true);
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ internal class Accounts.ServiceProviderRow<PaneType> :
|
||||||
|
|
||||||
public ServiceProviderRow(Geary.ServiceProvider provider,
|
public ServiceProviderRow(Geary.ServiceProvider provider,
|
||||||
string other_type_label) {
|
string other_type_label) {
|
||||||
string? label = other_type_label;
|
string? label = null;
|
||||||
switch (provider) {
|
switch (provider) {
|
||||||
case Geary.ServiceProvider.GMAIL:
|
case Geary.ServiceProvider.GMAIL:
|
||||||
label = _("Gmail");
|
label = _("Gmail");
|
||||||
|
|
@ -286,6 +286,10 @@ internal class Accounts.ServiceProviderRow<PaneType> :
|
||||||
case Geary.ServiceProvider.YAHOO:
|
case Geary.ServiceProvider.YAHOO:
|
||||||
label = _("Yahoo");
|
label = _("Yahoo");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Geary.ServiceProvider.OTHER:
|
||||||
|
label = other_type_label;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
base(
|
base(
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,11 @@ internal class Accounts.EditorServersPane :
|
||||||
case OTHER:
|
case OTHER:
|
||||||
add_row(this.details_list, this.save_sent);
|
add_row(this.details_list, this.save_sent);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
// XXX GMail and Outlook auto-save sent mail so don't
|
||||||
|
// include save sent option, but we shouldn't be
|
||||||
|
// hard-coding visible rows like this
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Receiving
|
// Receiving
|
||||||
|
|
|
||||||
|
|
@ -1572,6 +1572,10 @@ internal class Application.Controller :
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Accounts.Manager.Status.REMOVED:
|
||||||
|
// Account is gone, no further action is required
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1678,6 +1682,10 @@ internal class Application.Controller :
|
||||||
context.tls_validation_failed = false;
|
context.tls_validation_failed = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// No special action required for other statuses
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_restart) {
|
if (do_restart) {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,9 @@ public class Components.EntryUndo : Geary.BaseObject {
|
||||||
case DELETE:
|
case DELETE:
|
||||||
do_insert(manager.target);
|
do_insert(manager.target);
|
||||||
break;
|
break;
|
||||||
|
case NONE:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
manager.events_enabled = true;
|
manager.events_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
@ -73,6 +76,9 @@ public class Components.EntryUndo : Geary.BaseObject {
|
||||||
case DELETE:
|
case DELETE:
|
||||||
do_delete(manager.target);
|
do_delete(manager.target);
|
||||||
break;
|
break;
|
||||||
|
case NONE:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
manager.events_enabled = true;
|
manager.events_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,10 @@ public class Components.Validator : GLib.Object {
|
||||||
case Trigger.LOST_FOCUS:
|
case Trigger.LOST_FOCUS:
|
||||||
focus_lost();
|
focus_lost();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Trigger.MANUAL:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else if (!this.pulse_timer.is_running) {
|
} else if (!this.pulse_timer.is_running) {
|
||||||
this.pulse_timer.start();
|
this.pulse_timer.start();
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,11 @@ public class Composer.Headerbar : Gtk.HeaderBar {
|
||||||
this.recipients_button.visible = true;
|
this.recipients_button.visible = true;
|
||||||
this.set_attached(true);
|
this.set_attached(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Widget.PresentationMode.CLOSED:
|
||||||
|
case Widget.PresentationMode.NONE:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.show_close_button = (mode == Widget.PresentationMode.PANED
|
this.show_close_button = (mode == Widget.PresentationMode.PANED
|
||||||
|
|
|
||||||
|
|
@ -879,6 +879,10 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
|
||||||
);
|
);
|
||||||
this.referred_ids.add(full_context.id);
|
this.referred_ids.add(full_context.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NONE:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
update_extended_headers();
|
update_extended_headers();
|
||||||
|
|
||||||
|
|
@ -1533,6 +1537,11 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
|
||||||
this.subject_row.visible = false;
|
this.subject_row.visible = false;
|
||||||
set_compact_header_recipients();
|
set_compact_header_recipients();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PresentationMode.CLOSED:
|
||||||
|
case PresentationMode.NONE:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
update_from_field();
|
update_from_field();
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,10 @@ public class ConversationListView : Gtk.TreeView, Geary.BaseInterface {
|
||||||
this.get_window().beep();
|
this.get_window().beep();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_cursor(target_path, null, false);
|
set_cursor(target_path, null, false);
|
||||||
|
|
|
||||||
|
|
@ -568,6 +568,9 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
|
||||||
composer.focus(DOWN);
|
composer.focus(DOWN);
|
||||||
handled = true;
|
handled = true;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -595,6 +598,9 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
|
||||||
case Gtk.ScrollType.END:
|
case Gtk.ScrollType.END:
|
||||||
value = adj.get_upper();
|
value = adj.get_upper();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
adj.set_value(value);
|
adj.set_value(value);
|
||||||
this.mark_read_timer.start();
|
this.mark_read_timer.start();
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,10 @@ public class Plugin.SpecialFolders :
|
||||||
target, get_folder_info_bar(target), PRIORITY
|
target, get_folder_info_bar(target), PRIORITY
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,22 +209,31 @@ public string get_clock_format(ClockFormat clock_format) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public string get_full_date(ClockFormat clock_format) {
|
public string get_full_date(ClockFormat clock_format) {
|
||||||
switch(clock_format) {
|
var value = "";
|
||||||
case ClockFormat.TWELVE_HOURS:
|
switch (clock_format) {
|
||||||
/// 12 hours format for datetime that a message being replied to was received
|
case TWELVE_HOURS:
|
||||||
/// See http://developer.gnome.org/glib/2.32/glib-GDateTime.html#g-date-time-format
|
/// 12 hours format for datetime that a message being replied
|
||||||
return _("%a, %b %-e, %Y at %l:%M %P");
|
/// to was received See
|
||||||
case ClockFormat.TWENTY_FOUR_HOURS:
|
/// http://developer.gnome.org/glib/2.32/glib-GDateTime.html#g-date-time-format
|
||||||
/// 24 hours format for the datetime that a message being replied to was received
|
value = _("%a, %b %-e, %Y at %l:%M %P");
|
||||||
/// See http://developer.gnome.org/glib/2.32/glib-GDateTime.html#g-date-time-format
|
break;
|
||||||
return _("%a, %b %-e, %Y at %H:%M");
|
case TWENTY_FOUR_HOURS:
|
||||||
case ClockFormat.LOCALE_DEFAULT:
|
/// 24 hours format for the datetime that a message being
|
||||||
/// Format for the datetime that a message being replied to was received
|
/// replied to was received See
|
||||||
/// See http://developer.gnome.org/glib/2.32/glib-GDateTime.html#g-date-time-format
|
/// http://developer.gnome.org/glib/2.32/glib-GDateTime.html#g-date-time-format
|
||||||
return _("%a, %b %-e, %Y at %X");
|
value = _("%a, %b %-e, %Y at %H:%M");
|
||||||
|
break;
|
||||||
|
case LOCALE_DEFAULT:
|
||||||
|
/// Format for the datetime that a message being replied to
|
||||||
|
/// was received See
|
||||||
|
/// http://developer.gnome.org/glib/2.32/glib-GDateTime.html#g-date-time-format
|
||||||
|
value = _("%a, %b %-e, %Y at %X");
|
||||||
|
break;
|
||||||
|
case TOTAL:
|
||||||
|
// noop
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
GLib.assert(false); // unreachable
|
return value;
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@ public class Geary.AccountInformation : BaseObject {
|
||||||
case OUTLOOK:
|
case OUTLOOK:
|
||||||
save = false;
|
save = false;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
|
|
@ -433,6 +435,9 @@ public class Geary.AccountInformation : BaseObject {
|
||||||
case CUSTOM:
|
case CUSTOM:
|
||||||
outgoing = this.outgoing.credentials;
|
outgoing = this.outgoing.credentials;
|
||||||
break;
|
break;
|
||||||
|
case NONE:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return outgoing;
|
return outgoing;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -348,6 +348,9 @@ public class Geary.Engine : BaseObject {
|
||||||
case CUSTOM:
|
case CUSTOM:
|
||||||
credentials = service.credentials;
|
credentials = service.credentials;
|
||||||
break;
|
break;
|
||||||
|
case NONE:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Geary.Smtp.ClientSession client = new Geary.Smtp.ClientSession(endpoint);
|
Geary.Smtp.ClientSession client = new Geary.Smtp.ClientSession(endpoint);
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@ public enum Geary.ServiceProvider {
|
||||||
case OUTLOOK:
|
case OUTLOOK:
|
||||||
ImapEngine.OutlookAccount.setup_account(service);
|
ImapEngine.OutlookAccount.setup_account(service);
|
||||||
break;
|
break;
|
||||||
|
case OTHER:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,6 +57,9 @@ public enum Geary.ServiceProvider {
|
||||||
case OUTLOOK:
|
case OUTLOOK:
|
||||||
ImapEngine.OutlookAccount.setup_service(service);
|
ImapEngine.OutlookAccount.setup_service(service);
|
||||||
break;
|
break;
|
||||||
|
case OTHER:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1781,6 +1781,15 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
|
||||||
case Geary.Email.Field.PROPERTIES:
|
case Geary.Email.Field.PROPERTIES:
|
||||||
append = "internaldate, internaldate_time_t, rfc822_size";
|
append = "internaldate, internaldate_time_t, rfc822_size";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NONE:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ENVELOPE:
|
||||||
|
case ALL:
|
||||||
|
// XXX hmm
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -979,6 +979,10 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
|
||||||
unloc_names.add("Archive | Archives");
|
unloc_names.add("Archive | Archives");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// no-op
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
loc_names.add_all(unloc_names);
|
loc_names.add_all(unloc_names);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue