#include "empathy-theme-adium.h"
#include <glib/gi18n-lib.h>
+#include <tp-account-widgets/tpaw-images.h>
+#include <tp-account-widgets/tpaw-time.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-gsettings.h"
#include "empathy-images.h"
#include "empathy-plist.h"
#include "empathy-smiley-manager.h"
-#include "empathy-time.h"
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
#include "empathy-webkit-utils.h"
const gchar *text,
const gchar *token)
{
- EmpathyStringParser *parsers;
+ TpawStringParser *parsers;
GString *string;
/* Check if we have to parse smileys */
"<span id=\"message-token-%s\">",
token);
- empathy_string_parser_substr (text, -1, parsers, string);
+ tpaw_string_parser_substr (text, -1, parsers, string);
if (!tp_str_empty (token))
g_string_append (string, "</span>");
strftime_format = nsdate_to_strftime (self->priv->data, format);
if (is_backlog)
- dup_replace = empathy_time_to_string_local (timestamp,
+ dup_replace = tpaw_time_to_string_local (timestamp,
strftime_format ? strftime_format :
- EMPATHY_TIME_DATE_FORMAT_DISPLAY_SHORT);
+ TPAW_TIME_DATE_FORMAT_DISPLAY_SHORT);
else
- dup_replace = empathy_time_to_string_local (timestamp,
+ dup_replace = tpaw_time_to_string_local (timestamp,
strftime_format ? strftime_format :
- EMPATHY_TIME_FORMAT_DISPLAY_SHORT);
+ TPAW_TIME_FORMAT_DISPLAY_SHORT);
replace = dup_replace;
}
else if (theme_adium_match (&cur, "%shortTime%"))
{
- dup_replace = empathy_time_to_string_local (timestamp,
- EMPATHY_TIME_FORMAT_DISPLAY_SHORT);
+ dup_replace = tpaw_time_to_string_local (timestamp,
+ TPAW_TIME_FORMAT_DISPLAY_SHORT);
replace = dup_replace;
}
else if (theme_adium_match (&cur, "%service%"))
bytes = g_resources_lookup_data ("/org/gnome/Empathy/Chat/empathy-chat.js",
G_RESOURCE_LOOKUP_FLAGS_NONE,
NULL);
- js = (const gchar *) g_bytes_get_data (bytes, NULL);
- g_string_prepend (string, js);
- g_bytes_unref (bytes);
+
+ if (bytes != NULL)
+ {
+ js = (const gchar *) g_bytes_get_data (bytes, NULL);
+ g_string_prepend (string, js);
+ g_bytes_unref (bytes);
+ }
script = g_string_free (string, FALSE);
webkit_web_view_execute_script (WEBKIT_WEB_VIEW (self), script);
{
theme_adium_add_html (self, "appendMessage",
self->priv->data->status_html, escaped, NULL, NULL, NULL,
- NULL, "event", empathy_time_get_current (), FALSE, FALSE, direction);
+ NULL, "event", tpaw_time_get_current (), FALSE, FALSE, direction);
/* There is no last contact */
if (self->priv->last_contact)
/* Get information */
sender = empathy_message_get_sender (msg);
account = empathy_contact_get_account (sender);
- service_name = empathy_protocol_name_to_display_name
+ service_name = tpaw_protocol_name_to_display_name
(tp_account_get_protocol_name (account));
if (service_name == NULL)
service_name = tp_account_get_protocol_name (account);
{
if (!self->priv->data->default_avatar_filename)
self->priv->data->default_avatar_filename =
- empathy_filename_from_icon_name (EMPATHY_IMAGE_AVATAR_DEFAULT,
+ tpaw_filename_from_icon_name (TPAW_IMAGE_AVATAR_DEFAULT,
GTK_ICON_SIZE_DIALOG);
avatar_filename = self->priv->data->default_avatar_filename;
}
/* set a tooltip */
- timestamp = empathy_time_to_string_local (
+ timestamp = tpaw_time_to_string_local (
empathy_message_get_timestamp (message),
"%H:%M:%S");
tooltip = g_strdup_printf (_("Message edited at %s"), timestamp);
}
g_free (style);
- gtk_icon_info_free (icon_info);
+ g_object_unref (icon_info);
}
goto finally;