aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-10-13 21:00:29 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-10-13 21:00:29 +0800
commitd00adf45ea54086a8d1d29090639b5beb3f88b34 (patch)
tree9cc7756b93e51e5c9ba250e82164316e8778e3f3 /libempathy
parent0ab84cc3ffe6129ae40ad436eb62fccbd52b00ad (diff)
downloadgsoc2013-empathy-d00adf45ea54086a8d1d29090639b5beb3f88b34.tar
gsoc2013-empathy-d00adf45ea54086a8d1d29090639b5beb3f88b34.tar.gz
gsoc2013-empathy-d00adf45ea54086a8d1d29090639b5beb3f88b34.tar.bz2
gsoc2013-empathy-d00adf45ea54086a8d1d29090639b5beb3f88b34.tar.lz
gsoc2013-empathy-d00adf45ea54086a8d1d29090639b5beb3f88b34.tar.xz
gsoc2013-empathy-d00adf45ea54086a8d1d29090639b5beb3f88b34.tar.zst
gsoc2013-empathy-d00adf45ea54086a8d1d29090639b5beb3f88b34.zip
Don't use deprecated GtkTooltips API. Add commented out lines in
2007-10-13 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-chat-view.h: * libempathy-gtk/empathy-main-window.c: * libempathy-gtk/empathy-chat.c: * libempathy-gtk/empathy-chat-window.c: * libempathy-gtk/empathy-chat-view.c: * libempathy/empathy-log-manager.c: * libempathy/empathy-time.c: * libempathy/empathy-tp-chat.c: * libempathy/empathy-time.h: * libempathy/empathy-message.c: * libempathy/empathy-message.h: * libempathy/empathy-presence.c: * configure.ac: Don't use deprecated GtkTooltips API. Add commented out lines in configure.ac to disable GLib and GTK deprecated symbols. Replace EmpathyTime by time_t which is more appropriate for timestamps. * doc/*: Updated. svn path=/trunk/; revision=371
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-log-manager.c8
-rw-r--r--libempathy/empathy-message.c6
-rw-r--r--libempathy/empathy-message.h4
-rw-r--r--libempathy/empathy-presence.c2
-rw-r--r--libempathy/empathy-time.c12
-rw-r--r--libempathy/empathy-time.h21
-rw-r--r--libempathy/empathy-tp-chat.c2
7 files changed, 26 insertions, 29 deletions
diff --git a/libempathy/empathy-log-manager.c b/libempathy/empathy-log-manager.c
index efdbae86b..e5ff2b777 100644
--- a/libempathy/empathy-log-manager.c
+++ b/libempathy/empathy-log-manager.c
@@ -329,7 +329,7 @@ empathy_log_manager_get_messages_for_file (EmpathyLogManager *manager,
EmpathyMessage *message;
EmpathyContact *sender;
gchar *time;
- EmpathyTime t;
+ time_t t;
gchar *sender_id;
gchar *sender_name;
gchar *body;
@@ -527,7 +527,7 @@ empathy_log_manager_search_free (GList *hits)
gchar *
empathy_log_manager_get_date_readable (const gchar *date)
{
- EmpathyTime t;
+ time_t t;
t = empathy_time_parse (date);
@@ -703,7 +703,7 @@ log_manager_get_filename_for_date (EmpathyLogManager *manager,
static gchar *
log_manager_get_timestamp_filename (void)
{
- EmpathyTime t;
+ time_t t;
gchar *time_str;
gchar *filename;
@@ -719,7 +719,7 @@ log_manager_get_timestamp_filename (void)
static gchar *
log_manager_get_timestamp_from_message (EmpathyMessage *message)
{
- EmpathyTime t;
+ time_t t;
t = empathy_message_get_timestamp (message);
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index ceecd5d55..5c2028bd0 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -38,7 +38,7 @@ struct _EmpathyMessagePriv {
EmpathyContact *sender;
EmpathyContact *receiver;
gchar *body;
- EmpathyTime timestamp;
+ time_t timestamp;
};
static void empathy_message_class_init (EmpathyMessageClass *class);
@@ -385,7 +385,7 @@ empathy_message_set_body (EmpathyMessage *message,
g_object_notify (G_OBJECT (message), "body");
}
-EmpathyTime
+time_t
empathy_message_get_timestamp (EmpathyMessage *message)
{
EmpathyMessagePriv *priv;
@@ -399,7 +399,7 @@ empathy_message_get_timestamp (EmpathyMessage *message)
void
empathy_message_set_timestamp (EmpathyMessage *message,
- EmpathyTime timestamp)
+ time_t timestamp)
{
EmpathyMessagePriv *priv;
diff --git a/libempathy/empathy-message.h b/libempathy/empathy-message.h
index 5baddd6bb..af19d364c 100644
--- a/libempathy/empathy-message.h
+++ b/libempathy/empathy-message.h
@@ -72,9 +72,9 @@ void empathy_message_set_receiver (EmpathyMessage *message,
const gchar * empathy_message_get_body (EmpathyMessage *message);
void empathy_message_set_body (EmpathyMessage *message,
const gchar *body);
-EmpathyTime empathy_message_get_timestamp (EmpathyMessage *message);
+time_t empathy_message_get_timestamp (EmpathyMessage *message);
void empathy_message_set_timestamp (EmpathyMessage *message,
- EmpathyTime timestamp);
+ time_t timestamp);
EmpathyMessageType empathy_message_type_from_str (const gchar *type_str);
const gchar * empathy_message_type_to_str (EmpathyMessageType type);
diff --git a/libempathy/empathy-presence.c b/libempathy/empathy-presence.c
index b30fa6151..b7beb3900 100644
--- a/libempathy/empathy-presence.c
+++ b/libempathy/empathy-presence.c
@@ -38,7 +38,7 @@ typedef struct _EmpathyPresencePriv EmpathyPresencePriv;
struct _EmpathyPresencePriv {
McPresence state;
gchar *status;
- EmpathyTime timestamp;
+ time_t timestamp;
};
static void presence_finalize (GObject *object);
diff --git a/libempathy/empathy-time.c b/libempathy/empathy-time.c
index 0851add49..9eec8adc0 100644
--- a/libempathy/empathy-time.c
+++ b/libempathy/empathy-time.c
@@ -30,7 +30,7 @@
/* Note: EmpathyTime is always in UTC. */
-EmpathyTime
+time_t
empathy_time_get_current (void)
{
return time (NULL);
@@ -63,7 +63,7 @@ empathy_time_get_local_time (struct tm *tm)
/* The format is: "20021209T23:51:30" and is in UTC. 0 is returned on
* failure. The alternative format "20021209" is also accepted.
*/
-EmpathyTime
+time_t
empathy_time_parse (const gchar *str)
{
struct tm tm;
@@ -88,8 +88,8 @@ empathy_time_parse (const gchar *str)
/* Converts the UTC timestamp to a string, also in UTC. Returns NULL on failure. */
gchar *
-empathy_time_to_string_utc (EmpathyTime t,
- const gchar *format)
+empathy_time_to_string_utc (time_t t,
+ const gchar *format)
{
gchar stamp[128];
struct tm *tm;
@@ -106,8 +106,8 @@ empathy_time_to_string_utc (EmpathyTime t,
/* Converts the UTC timestamp to a string, in local time. Returns NULL on failure. */
gchar *
-empathy_time_to_string_local (EmpathyTime t,
- const gchar *format)
+empathy_time_to_string_local (time_t t,
+ const gchar *format)
{
gchar stamp[128];
struct tm *tm;
diff --git a/libempathy/empathy-time.h b/libempathy/empathy-time.h
index debf784c0..560b4655a 100644
--- a/libempathy/empathy-time.h
+++ b/libempathy/empathy-time.h
@@ -33,18 +33,15 @@ G_BEGIN_DECLS
#define EMPATHY_TIME_FORMAT_DISPLAY_SHORT "%H:%M"
#define EMPATHY_TIME_FORMAT_DISPLAY_LONG "%a %d %b %Y"
-/* Note: Always in UTC. */
-typedef long EmpathyTime;
-
-EmpathyTime empathy_time_get_current (void);
-time_t empathy_time_get_local_time (struct tm *tm);
-EmpathyTime empathy_time_parse (const gchar *str);
-EmpathyTime empathy_time_parse_format (const gchar *str,
- const gchar *format);
-gchar *empathy_time_to_string_utc (EmpathyTime t,
- const gchar *format);
-gchar *empathy_time_to_string_local (EmpathyTime t,
- const gchar *format);
+time_t empathy_time_get_current (void);
+time_t empathy_time_get_local_time (struct tm *tm);
+time_t empathy_time_parse (const gchar *str);
+time_t empathy_time_parse_format (const gchar *str,
+ const gchar *format);
+gchar *empathy_time_to_string_utc (time_t t,
+ const gchar *format);
+gchar *empathy_time_to_string_local (time_t t,
+ const gchar *format);
G_END_DECLS
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index feba273bd..98b82e138 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -940,7 +940,7 @@ tp_chat_build_message (EmpathyTpChat *chat,
empathy_message_set_type (message, type);
empathy_message_set_sender (message, sender);
empathy_message_set_receiver (message, priv->user);
- empathy_message_set_timestamp (message, (EmpathyTime) timestamp);
+ empathy_message_set_timestamp (message, timestamp);
g_object_unref (sender);