[geary: 4/8] util-date: rename namespace Date to Util.Date
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 4/8] util-date: rename namespace Date to Util.Date
- Date: Sat, 23 Mar 2019 03:28:17 +0000 (UTC)
commit 74b8f520c90a1ae55b564ca66838e62d8ea0414d
Author: Konstantin Kharlamov <Hi-Angel yandex ru>
Date: Sun Mar 10 01:26:49 2019 +0300
util-date: rename namespace Date to Util.Date
Will be needed in the next commit to avoid clash with RFC822.Date.
Signed-off-by: Konstantin Kharlamov <Hi-Angel yandex ru>
src/client/application/geary-application.vala | 4 ++--
src/client/application/geary-config.vala | 6 +++---
src/client/conversation-list/formatted-conversation-data.vala | 2 +-
src/client/conversation-viewer/conversation-message.vala | 4 ++--
src/client/util/util-date.vala | 2 +-
src/engine/rfc822/rfc822-message-data.vala | 1 -
6 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/client/application/geary-application.vala b/src/client/application/geary-application.vala
index 76b41def..b891af11 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -198,7 +198,7 @@ public class GearyApplication : Gtk.Application {
Geary.Logging.log_to(stderr);
GLib.Log.set_default_handler(Geary.Logging.default_handler);
- Date.init();
+ Util.Date.init();
// Calls Gtk.init(), amongst other things
base.startup();
@@ -411,7 +411,7 @@ public class GearyApplication : Gtk.Application {
}
quit();
- Date.terminate();
+ Util.Date.terminate();
}
/**
diff --git a/src/client/application/geary-config.vala b/src/client/application/geary-config.vala
index b249cf32..2aef0d2d 100644
--- a/src/client/application/geary-config.vala
+++ b/src/client/application/geary-config.vala
@@ -137,12 +137,12 @@ public class Configuration {
}
private const string CLOCK_FORMAT_KEY = "clock-format";
- public Date.ClockFormat clock_format {
+ public Util.Date.ClockFormat clock_format {
get {
if (gnome_interface.get_string(CLOCK_FORMAT_KEY) == "12h")
- return Date.ClockFormat.TWELVE_HOURS;
+ return Util.Date.ClockFormat.TWELVE_HOURS;
else
- return Date.ClockFormat.TWENTY_FOUR_HOURS;
+ return Util.Date.ClockFormat.TWENTY_FOUR_HOURS;
}
}
diff --git a/src/client/conversation-list/formatted-conversation-data.vala
b/src/client/conversation-list/formatted-conversation-data.vala
index cbb126b6..1fc4c80a 100644
--- a/src/client/conversation-list/formatted-conversation-data.vala
+++ b/src/client/conversation-list/formatted-conversation-data.vala
@@ -129,7 +129,7 @@ public class FormattedConversationData : Geary.BaseObject {
// conversation list store sorts by date-received, so display that instead of sender's
// Date:
- string new_date = Date.pretty_print(latest.properties.date_received,
+ string new_date = Util.Date.pretty_print(latest.properties.date_received,
GearyApplication.instance.config.clock_format);
if (new_date == date)
return false;
diff --git a/src/client/conversation-viewer/conversation-message.vala
b/src/client/conversation-viewer/conversation-message.vala
index e8cd4f27..9331263f 100644
--- a/src/client/conversation-viewer/conversation-message.vala
+++ b/src/client/conversation-viewer/conversation-message.vala
@@ -399,10 +399,10 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface {
string date_text = "";
string date_tooltip = "";
if (date != null) {
- date_text = Date.pretty_print(
+ date_text = Util.Date.pretty_print(
date.value, config.clock_format
);
- date_tooltip = Date.pretty_print_verbose(
+ date_tooltip = Util.Date.pretty_print_verbose(
date.value, config.clock_format
);
}
diff --git a/src/client/util/util-date.vala b/src/client/util/util-date.vala
index 16fab9b3..faf2c966 100644
--- a/src/client/util/util-date.vala
+++ b/src/client/util/util-date.vala
@@ -4,7 +4,7 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-namespace Date {
+namespace Util.Date {
public enum ClockFormat {
TWELVE_HOURS,
diff --git a/src/engine/rfc822/rfc822-message-data.vala b/src/engine/rfc822/rfc822-message-data.vala
index 97be9acd..c25dcd93 100644
--- a/src/engine/rfc822/rfc822-message-data.vala
+++ b/src/engine/rfc822/rfc822-message-data.vala
@@ -430,4 +430,3 @@ public class Geary.RFC822.PreviewText : Geary.RFC822.Text {
base (new Geary.Memory.StringBuffer(preview));
}
}
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]