pidgin/pidgin

564fcabca6d9
Parents c69c52a5ffe7
Children e374a2cf0611
Rename purple_get_month -> purple_time_parse_month
--- a/ChangeLog.API Sat Nov 09 22:05:20 2019 +0300
+++ b/ChangeLog.API Sun Nov 10 14:47:44 2019 +0300
@@ -124,6 +124,7 @@
* purple_roomlist_room_set_expanded_once
* purple_roomlist_set_proto_data
* purple_roomlist_set_ui_data
+ * purple_time_parse_month
* purple_whiteboard_get_account
* purple_whiteboard_get_draw_list
* purple_whiteboard_set_draw_list
--- a/libpurple/log.c Sat Nov 09 22:05:20 2019 +0300
+++ b/libpurple/log.c Sun Nov 10 14:47:44 2019 +0300
@@ -1704,7 +1704,7 @@
purple_debug_warning("log", "invalid date format\n");
}
/* Ugly hack, in case current locale is not English */
- month = purple_get_month(month_str);
+ month = purple_time_parse_month(month_str);
if (lasttime)
g_date_time_unref(lasttime);
lasttime = g_date_time_new_local(year, month, day,
--- a/libpurple/plugins/log_reader.c Sat Nov 09 22:05:20 2019 +0300
+++ b/libpurple/plugins/log_reader.c Sun Nov 10 14:47:44 2019 +0300
@@ -1209,7 +1209,7 @@
} else {
PurpleLog *log;
- month = purple_get_month(month_str);
+ month = purple_time_parse_month(month_str);
data = g_new0(
struct trillian_logger_data, 1);
@@ -2013,7 +2013,7 @@
"Error parsing start date for %s\n",
filename);
} else {
- month = purple_get_month(month_str);
+ month = purple_time_parse_month(month_str);
found_start = TRUE;
offset = c - contents;
--- a/libpurple/util.c Sat Nov 09 22:05:20 2019 +0300
+++ b/libpurple/util.c Sun Nov 10 14:47:44 2019 +0300
@@ -561,7 +561,7 @@
return retval;
}
-gint purple_get_month(const char *month_abbr)
+gint purple_time_parse_month(const char *month_abbr)
{
const char *months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
--- a/libpurple/util.h Sat Nov 09 22:05:20 2019 +0300
+++ b/libpurple/util.h Sun Nov 10 14:47:44 2019 +0300
@@ -315,15 +315,17 @@
GDateTime *purple_str_to_date_time(const char *timestamp, gboolean utc);
/**
- * purple_get_month:
+ * purple_time_parse_month:
* @month_abbr: The 3-letter month abbreviation
*
* Get month number suitable for GDateTime. If @month_abbr is unknown,
* returns 0.
*
* Returns: A month number or 0.
+ *
+ * Since: 3.0.0
*/
-gint purple_get_month(const char *month_abbr);
+gint purple_time_parse_month(const char *month_abbr);
/**************************************************************************/
/* Markup Functions */