Merge branch 'mjog/vala-switch-warnings' into 'mainline'
Fix vala mainline switch statement build warnings See merge request GNOME/geary!543
This commit is contained in:
commit
cb648cd839
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:
|
||||
details = _("Yahoo");
|
||||
break;
|
||||
|
||||
case Geary.ServiceProvider.OTHER:
|
||||
// no-op: Use the generated label
|
||||
break;
|
||||
}
|
||||
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")
|
||||
);
|
||||
break;
|
||||
|
||||
case REMOVED:
|
||||
// Nothing to do - account is gone
|
||||
break;
|
||||
}
|
||||
|
||||
this.unavailable_icon.set_visible(!enabled);
|
||||
|
|
@ -440,7 +448,7 @@ private class Accounts.AddServiceProviderRow : EditorRow<EditorListPane> {
|
|||
this.provider = provider;
|
||||
|
||||
// Translators: Label for adding a generic email account
|
||||
string? name = _("Other email providers");
|
||||
string? name = null;
|
||||
switch (provider) {
|
||||
case Geary.ServiceProvider.GMAIL:
|
||||
name = _("Gmail");
|
||||
|
|
@ -453,6 +461,10 @@ private class Accounts.AddServiceProviderRow : EditorRow<EditorListPane> {
|
|||
case Geary.ServiceProvider.YAHOO:
|
||||
name = _("Yahoo");
|
||||
break;
|
||||
|
||||
case Geary.ServiceProvider.OTHER:
|
||||
name = _("Other email providers");
|
||||
break;
|
||||
}
|
||||
this.service_name.set_text(name);
|
||||
this.service_name.set_hexpand(true);
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ internal class Accounts.ServiceProviderRow<PaneType> :
|
|||
|
||||
public ServiceProviderRow(Geary.ServiceProvider provider,
|
||||
string other_type_label) {
|
||||
string? label = other_type_label;
|
||||
string? label = null;
|
||||
switch (provider) {
|
||||
case Geary.ServiceProvider.GMAIL:
|
||||
label = _("Gmail");
|
||||
|
|
@ -286,6 +286,10 @@ internal class Accounts.ServiceProviderRow<PaneType> :
|
|||
case Geary.ServiceProvider.YAHOO:
|
||||
label = _("Yahoo");
|
||||
break;
|
||||
|
||||
case Geary.ServiceProvider.OTHER:
|
||||
label = other_type_label;
|
||||
break;
|
||||
}
|
||||
|
||||
base(
|
||||
|
|
|
|||
|
|
@ -127,6 +127,11 @@ internal class Accounts.EditorServersPane :
|
|||
case OTHER:
|
||||
add_row(this.details_list, this.save_sent);
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1572,6 +1572,10 @@ internal class Application.Controller :
|
|||
);
|
||||
}
|
||||
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;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// No special action required for other statuses
|
||||
break;
|
||||
}
|
||||
|
||||
if (do_restart) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ public class Components.EntryUndo : Geary.BaseObject {
|
|||
case DELETE:
|
||||
do_insert(manager.target);
|
||||
break;
|
||||
case NONE:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
manager.events_enabled = true;
|
||||
}
|
||||
|
|
@ -73,6 +76,9 @@ public class Components.EntryUndo : Geary.BaseObject {
|
|||
case DELETE:
|
||||
do_delete(manager.target);
|
||||
break;
|
||||
case NONE:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
manager.events_enabled = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,6 +258,10 @@ public class Components.Validator : GLib.Object {
|
|||
case Trigger.LOST_FOCUS:
|
||||
focus_lost();
|
||||
break;
|
||||
|
||||
case Trigger.MANUAL:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
} else if (!this.pulse_timer.is_running) {
|
||||
this.pulse_timer.start();
|
||||
|
|
|
|||
|
|
@ -76,6 +76,11 @@ public class Composer.Headerbar : Gtk.HeaderBar {
|
|||
this.recipients_button.visible = true;
|
||||
this.set_attached(true);
|
||||
break;
|
||||
|
||||
case Widget.PresentationMode.CLOSED:
|
||||
case Widget.PresentationMode.NONE:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
break;
|
||||
|
||||
case NONE:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
update_extended_headers();
|
||||
|
||||
|
|
@ -1533,6 +1537,11 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
|
|||
this.subject_row.visible = false;
|
||||
set_compact_header_recipients();
|
||||
break;
|
||||
|
||||
case PresentationMode.CLOSED:
|
||||
case PresentationMode.NONE:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
|
||||
update_from_field();
|
||||
|
|
|
|||
|
|
@ -174,6 +174,10 @@ public class ConversationListView : Gtk.TreeView, Geary.BaseInterface {
|
|||
this.get_window().beep();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
|
||||
set_cursor(target_path, null, false);
|
||||
|
|
|
|||
|
|
@ -568,6 +568,9 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
|
|||
composer.focus(DOWN);
|
||||
handled = true;
|
||||
break;
|
||||
default:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -595,6 +598,9 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
|
|||
case Gtk.ScrollType.END:
|
||||
value = adj.get_upper();
|
||||
break;
|
||||
default:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
adj.set_value(value);
|
||||
this.mark_read_timer.start();
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@ public class Plugin.SpecialFolders :
|
|||
target, get_folder_info_bar(target), PRIORITY
|
||||
);
|
||||
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) {
|
||||
switch(clock_format) {
|
||||
case ClockFormat.TWELVE_HOURS:
|
||||
/// 12 hours format for datetime that a message being replied to was received
|
||||
/// See http://developer.gnome.org/glib/2.32/glib-GDateTime.html#g-date-time-format
|
||||
return _("%a, %b %-e, %Y at %l:%M %P");
|
||||
case ClockFormat.TWENTY_FOUR_HOURS:
|
||||
/// 24 hours 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
|
||||
return _("%a, %b %-e, %Y at %H:%M");
|
||||
case ClockFormat.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
|
||||
return _("%a, %b %-e, %Y at %X");
|
||||
var value = "";
|
||||
switch (clock_format) {
|
||||
case TWELVE_HOURS:
|
||||
/// 12 hours format for 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 %l:%M %P");
|
||||
break;
|
||||
case TWENTY_FOUR_HOURS:
|
||||
/// 24 hours 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 %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 "";
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,6 +131,8 @@ public class Geary.AccountInformation : BaseObject {
|
|||
case OUTLOOK:
|
||||
save = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return save;
|
||||
}
|
||||
|
|
@ -433,6 +435,9 @@ public class Geary.AccountInformation : BaseObject {
|
|||
case CUSTOM:
|
||||
outgoing = this.outgoing.credentials;
|
||||
break;
|
||||
case NONE:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
return outgoing;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,6 +348,9 @@ public class Geary.Engine : BaseObject {
|
|||
case CUSTOM:
|
||||
credentials = service.credentials;
|
||||
break;
|
||||
case NONE:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
|
||||
Geary.Smtp.ClientSession client = new Geary.Smtp.ClientSession(endpoint);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ public enum Geary.ServiceProvider {
|
|||
case OUTLOOK:
|
||||
ImapEngine.OutlookAccount.setup_account(service);
|
||||
break;
|
||||
case OTHER:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -54,6 +57,9 @@ public enum Geary.ServiceProvider {
|
|||
case OUTLOOK:
|
||||
ImapEngine.OutlookAccount.setup_service(service);
|
||||
break;
|
||||
case OTHER:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1781,6 +1781,15 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
|
|||
case Geary.Email.Field.PROPERTIES:
|
||||
append = "internaldate, internaldate_time_t, rfc822_size";
|
||||
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");
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
// no-op
|
||||
break;
|
||||
}
|
||||
|
||||
loc_names.add_all(unloc_names);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue