This commit also changes the licence of the moved code from GPL to LGPL.
See GOSSIP-RELICENSING.txt for details.
https://bugzilla.gnome.org/show_bug.cgi?id=699492
#include "empathy-account-chooser.h"
#include <glib/gi18n-lib.h>
-
-#include "empathy-ui-utils.h"
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include "empathy-debug.h"
store = GTK_LIST_STORE (gtk_combo_box_get_model (combobox));
icon_name = tp_account_get_icon_name (account);
- pixbuf = empathy_pixbuf_from_icon_name (icon_name,
+ pixbuf = tpaw_pixbuf_from_icon_name (icon_name,
GTK_ICON_SIZE_BUTTON);
gtk_list_store_set (store, iter,
#include <glib/gi18n-lib.h>
#include <gdk/gdkx.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
return TRUE;
}
- pixbuf = empathy_pixbuf_scale_down_if_necessary (priv->pixbuf, MAX_LARGE);
+ pixbuf = tpaw_pixbuf_scale_down_if_necessary (priv->pixbuf, MAX_LARGE);
popup_width = gdk_pixbuf_get_width (pixbuf);
popup_height = gdk_pixbuf_get_height (pixbuf);
}
if (avatar) {
- priv->pixbuf = empathy_pixbuf_from_data ((gchar *) avatar->data,
+ priv->pixbuf = tpaw_pixbuf_from_data ((gchar *) avatar->data,
avatar->len);
}
return;
}
- scaled_pixbuf = empathy_pixbuf_scale_down_if_necessary (priv->pixbuf, MAX_SMALL);
+ scaled_pixbuf = tpaw_pixbuf_scale_down_if_necessary (priv->pixbuf, MAX_SMALL);
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), scaled_pixbuf);
if (scaled_pixbuf != priv->pixbuf) {
#include "config.h"
#include "empathy-individual-store-channel.h"
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
+
#include "empathy-utils.h"
#include "empathy-ui-utils.h"
#include "empathy-images.h"
if (state == TP_CHANNEL_CHAT_STATE_COMPOSING)
{
gchar *icon_filename =
- empathy_filename_from_icon_name (EMPATHY_IMAGE_TYPING,
+ tpaw_filename_from_icon_name (EMPATHY_IMAGE_TYPING,
GTK_ICON_SIZE_MENU);
pixbuf = gdk_pixbuf_new_from_file (icon_filename, NULL);
#include "empathy-individual-view.h"
#include <glib/gi18n-lib.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-cell-renderer-activatable.h"
if (!tp_strdiff (name, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
{
- pixbuf = empathy_pixbuf_from_icon_name ("emblem-favorite",
+ pixbuf = tpaw_pixbuf_from_icon_name ("emblem-favorite",
GTK_ICON_SIZE_MENU);
}
else if (!tp_strdiff (name, EMPATHY_INDIVIDUAL_STORE_PEOPLE_NEARBY))
{
- pixbuf = empathy_pixbuf_from_icon_name ("im-local-xmpp",
+ pixbuf = tpaw_pixbuf_from_icon_name ("im-local-xmpp",
GTK_ICON_SIZE_MENU);
}
#include <glib/gi18n-lib.h>
#include <tp-account-widgets/tpaw-account-widget.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-ui-utils.h"
gtk_grid_attach (GTK_GRID (self), w, 0, 0, 1, 1);
gtk_widget_show (w);
- pix = empathy_pixbuf_from_icon_name_sized ("im-local-xmpp", 48);
+ pix = tpaw_pixbuf_from_icon_name_sized ("im-local-xmpp", 48);
if (pix != NULL)
{
w = gtk_image_new_from_pixbuf (pix);
#include "empathy-notify-manager.h"
#include <libnotify/notify.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include "empathy-gsettings.h"
#include "empathy-ui-utils.h"
pixbuf = empathy_pixbuf_avatar_from_contact_scaled (contact, 48, 48);
if (pixbuf == NULL)
- pixbuf = empathy_pixbuf_from_icon_name_sized (icon_name, 48);
+ pixbuf = tpaw_pixbuf_from_icon_name_sized (icon_name, 48);
return pixbuf;
}
#include <glib/gi18n-lib.h>
#include <tp-account-widgets/tpaw-connection-managers.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-ui-utils.h"
g_strdup (proto_name), g_strdup (cm_name));
icon_name = tpaw_protocol_icon_name (proto_name);
- pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
+ pixbuf = tpaw_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
display_name = tpaw_protocol_name_to_display_name (proto_name);
!tp_strdiff (cm_name, "gabble"))
{
display_name = tpaw_service_name_to_display_name ("google-talk");
- pixbuf = empathy_pixbuf_from_icon_name ("im-google-talk",
+ pixbuf = tpaw_pixbuf_from_icon_name ("im-google-talk",
GTK_ICON_SIZE_BUTTON);
gtk_list_store_insert_with_values (priv->store,
g_clear_object (&pixbuf);
display_name = tpaw_service_name_to_display_name ("facebook");
- pixbuf = empathy_pixbuf_from_icon_name ("im-facebook",
+ pixbuf = tpaw_pixbuf_from_icon_name ("im-facebook",
GTK_ICON_SIZE_BUTTON);
gtk_list_store_insert_with_values (priv->store,
#include <glib/gi18n-lib.h>
#include <tp-account-widgets/tpaw-images.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
if (pixbuf == NULL)
{
- pixbuf = empathy_pixbuf_from_icon_name_sized (
+ pixbuf = tpaw_pixbuf_from_icon_name_sized (
TPAW_IMAGE_AVATAR_DEFAULT, AVATAR_SIZE);
}
#include "config.h"
#include "empathy-smiley-manager.h"
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-ui-utils.h"
g_return_if_fail (!TPAW_STR_EMPTY (icon_name));
g_return_if_fail (!TPAW_STR_EMPTY (first_str));
- pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
+ pixbuf = tpaw_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
if (pixbuf) {
gchar *path;
va_start (var_args, first_str);
- path = empathy_filename_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
+ path = tpaw_filename_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
smiley_manager_add_valist (manager, pixbuf, path, first_str, var_args);
va_end (var_args);
g_object_unref (pixbuf);
#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"
{
if (!self->priv->data->default_avatar_filename)
self->priv->data->default_avatar_filename =
- empathy_filename_from_icon_name (TPAW_IMAGE_AVATAR_DEFAULT,
+ tpaw_filename_from_icon_name (TPAW_IMAGE_AVATAR_DEFAULT,
GTK_ICON_SIZE_DIALOG);
avatar_filename = self->priv->data->default_avatar_filename;
#include <glib/gi18n-lib.h>
#include <gio/gdesktopappinfo.h>
#include <tp-account-widgets/tpaw-live-search.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-ft-factory.h"
return tp_account_get_icon_name (account);
}
-GdkPixbuf *
-empathy_pixbuf_from_data (gchar *data,
- gsize data_size)
-{
- return empathy_pixbuf_from_data_and_mime (data, data_size, NULL);
-}
-
-GdkPixbuf *
-empathy_pixbuf_from_data_and_mime (gchar *data,
- gsize data_size,
- gchar **mime_type)
-{
- GdkPixbufLoader *loader;
- GdkPixbufFormat *format;
- GdkPixbuf *pixbuf = NULL;
- gchar **mime_types;
- GError *error = NULL;
-
- if (!data)
- return NULL;
-
- loader = gdk_pixbuf_loader_new ();
- if (!gdk_pixbuf_loader_write (loader, (guchar *) data, data_size, &error))
- {
- DEBUG ("Failed to write to pixbuf loader: %s",
- error ? error->message : "No error given");
- goto out;
- }
-
- if (!gdk_pixbuf_loader_close (loader, &error))
- {
- DEBUG ("Failed to close pixbuf loader: %s",
- error ? error->message : "No error given");
- goto out;
- }
-
- pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- if (pixbuf)
- {
- g_object_ref (pixbuf);
-
- if (mime_type != NULL)
- {
- format = gdk_pixbuf_loader_get_format (loader);
- mime_types = gdk_pixbuf_format_get_mime_types (format);
-
- *mime_type = g_strdup (*mime_types);
- if (mime_types[1] != NULL)
- DEBUG ("Loader supports more than one mime "
- "type! Picking the first one, %s",
- *mime_type);
-
- g_strfreev (mime_types);
- }
- }
-
-out:
- g_clear_error (&error);
- g_object_unref (loader);
-
- return pixbuf;
-}
-
struct SizeData
{
gint width;
numerator = 3;
denominator = 4;
- icon_filename = empathy_filename_from_icon_name (icon_name,
+ icon_filename = tpaw_filename_from_icon_name (icon_name,
GTK_ICON_SIZE_MENU);
if (icon_filename == NULL)
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
account = empathy_contact_get_account (contact);
- filename = empathy_filename_from_icon_name (
+ filename = tpaw_filename_from_icon_name (
tp_account_get_icon_name (account), GTK_ICON_SIZE_MENU);
if (filename != NULL)
return pixbuf;
}
-GdkPixbuf *
-empathy_pixbuf_scale_down_if_necessary (GdkPixbuf *pixbuf,
- gint max_size)
-{
- gint width, height;
- gdouble factor;
-
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
-
- if (width > 0 && (width > max_size || height > max_size))
- {
- factor = (gdouble) max_size / MAX (width, height);
-
- width = width * factor;
- height = height * factor;
-
- return gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_HYPER);
- }
-
- return g_object_ref (pixbuf);
-}
-
-GdkPixbuf *
-empathy_pixbuf_from_icon_name_sized (const gchar *icon_name,
- gint size)
-{
- GtkIconTheme *theme;
- GdkPixbuf *pixbuf;
- GError *error = NULL;
-
- if (!icon_name)
- return NULL;
-
- theme = gtk_icon_theme_get_default ();
-
- pixbuf = gtk_icon_theme_load_icon (theme, icon_name, size, 0, &error);
-
- if (error)
- {
- DEBUG ("Error loading icon: %s", error->message);
- g_clear_error (&error);
- }
-
- return pixbuf;
-}
-
-GdkPixbuf *
-empathy_pixbuf_from_icon_name (const gchar *icon_name,
- GtkIconSize icon_size)
-{
- gint w, h;
- gint size = 48;
-
- if (!icon_name)
- return NULL;
-
- if (gtk_icon_size_lookup (icon_size, &w, &h))
- size = (w + h) / 2;
-
- return empathy_pixbuf_from_icon_name_sized (icon_name, size);
-}
-
-gchar *
-empathy_filename_from_icon_name (const gchar *icon_name,
- GtkIconSize icon_size)
-{
- GtkIconTheme *icon_theme;
- GtkIconInfo *icon_info;
- gint w, h;
- gint size = 48;
- gchar *ret;
-
- icon_theme = gtk_icon_theme_get_default ();
-
- if (gtk_icon_size_lookup (icon_size, &w, &h))
- size = (w + h) / 2;
-
- icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon_name, size, 0);
- if (icon_info == NULL)
- return NULL;
-
- ret = g_strdup (gtk_icon_info_get_filename (icon_info));
- gtk_icon_info_free (icon_info);
-
- return ret;
-}
-
void
empathy_url_show (GtkWidget *parent,
const char *url)
const gchar * empathy_icon_name_for_contact (EmpathyContact *contact);
const gchar * empathy_icon_name_for_individual (FolksIndividual *individual);
const gchar * empathy_protocol_name_for_contact (EmpathyContact *contact);
-GdkPixbuf * empathy_pixbuf_from_data (gchar *data,
- gsize data_size);
-GdkPixbuf * empathy_pixbuf_from_data_and_mime (gchar *data,
- gsize data_size,
- gchar **mime_type);
void empathy_pixbuf_avatar_from_individual_scaled_async (
FolksIndividual *individual,
gint width,
EmpathyContact *contact,
const gchar *icon_name,
gboolean show_protocol);
-GdkPixbuf * empathy_pixbuf_scale_down_if_necessary (GdkPixbuf *pixbuf,
- gint max_size);
-GdkPixbuf * empathy_pixbuf_from_icon_name (const gchar *icon_name,
- GtkIconSize icon_size);
-GdkPixbuf * empathy_pixbuf_from_icon_name_sized (const gchar *icon_name,
- gint size);
-gchar * empathy_filename_from_icon_name (const gchar *icon_name,
- GtkIconSize icon_size);
void empathy_move_to_window_desktop (GtkWindow *window,
guint32 timestamp);
#include <tp-account-widgets/tpaw-account-widget.h>
#include <tp-account-widgets/tpaw-builder.h>
#include <tp-account-widgets/tpaw-user-info.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-accounts-common.h"
pixbuf = g_hash_table_lookup (priv->icons_cache, icon_name);
if (pixbuf == NULL)
{
- pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
+ pixbuf = tpaw_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
if (pixbuf == NULL)
return NULL;
#include <tp-account-widgets/tpaw-builder.h>
#include <tp-account-widgets/tpaw-camera-monitor.h>
#include <tp-account-widgets/tpaw-images.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-about-dialog.h"
if (pixbuf_avatar == NULL)
{
- pixbuf_avatar = empathy_pixbuf_from_icon_name_sized (
+ pixbuf_avatar = tpaw_pixbuf_from_icon_name_sized (
TPAW_IMAGE_AVATAR_DEFAULT, size);
}
tpaw-irc-network.c \
tpaw-irc-server.c \
tpaw-live-search.c \
+ tpaw-pixbuf-utils.c \
tpaw-string-parser.c \
tpaw-time.c \
tpaw-user-info.c \
tpaw-irc-network.h \
tpaw-irc-server.h \
tpaw-live-search.h \
+ tpaw-pixbuf-utils.h \
tpaw-string-parser.h \
tpaw-time.h \
tpaw-user-info.h \
#include <tp-account-widgets/tpaw-camera-monitor.h>
#include <tp-account-widgets/tpaw-gsettings.h>
#include <tp-account-widgets/tpaw-images.h>
+#include <tp-account-widgets/tpaw-pixbuf-utils.h>
#include <tp-account-widgets/tpaw-utils.h>
#ifdef HAVE_CHEESE
goto out;
}
- pixbuf = empathy_pixbuf_from_data_and_mime ((gchar *) avatar->data,
+ pixbuf = tpaw_pixbuf_from_data_and_mime ((gchar *) avatar->data,
avatar->len, &mime_type);
if (pixbuf == NULL)
{
self->priv->changed = TRUE;
- pixbuf_view = empathy_pixbuf_scale_down_if_necessary (pixbuf,
+ pixbuf_view = tpaw_pixbuf_scale_down_if_necessary (pixbuf,
AVATAR_SIZE_VIEW);
image = gtk_image_new_from_pixbuf (pixbuf_view);
return;
}
- pixbuf = empathy_pixbuf_from_data_and_mime (data, size, &mime_type);
+ pixbuf = tpaw_pixbuf_from_data_and_mime (data, size, &mime_type);
if (pixbuf == NULL)
{
g_free (data);
if (pixbuf != NULL)
{
- scaled_pixbuf = empathy_pixbuf_scale_down_if_necessary (pixbuf,
+ scaled_pixbuf = tpaw_pixbuf_scale_down_if_necessary (pixbuf,
AVATAR_SIZE_SAVE);
gtk_image_set_from_pixbuf (GTK_IMAGE (image), scaled_pixbuf);
--- /dev/null
+/*
+ * Copyright (C) 2002-2007 Imendio AB
+ * Copyright (C) 2007-2013 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ * Xavier Claessens <xclaesse@gmail.com>
+ * Travis Reitter <travis.reitter@collabora.co.uk>
+ */
+
+#include "config.h"
+#include "tpaw-pixbuf-utils.h"
+
+#include <gdk/gdkx.h>
+
+#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
+#include "empathy-debug.h"
+
+GdkPixbuf *
+tpaw_pixbuf_from_data (gchar *data,
+ gsize data_size)
+{
+ return tpaw_pixbuf_from_data_and_mime (data, data_size, NULL);
+}
+
+GdkPixbuf *
+tpaw_pixbuf_from_data_and_mime (gchar *data,
+ gsize data_size,
+ gchar **mime_type)
+{
+ GdkPixbufLoader *loader;
+ GdkPixbufFormat *format;
+ GdkPixbuf *pixbuf = NULL;
+ gchar **mime_types;
+ GError *error = NULL;
+
+ if (!data)
+ return NULL;
+
+ loader = gdk_pixbuf_loader_new ();
+ if (!gdk_pixbuf_loader_write (loader, (guchar *) data, data_size, &error))
+ {
+ DEBUG ("Failed to write to pixbuf loader: %s",
+ error ? error->message : "No error given");
+ goto out;
+ }
+
+ if (!gdk_pixbuf_loader_close (loader, &error))
+ {
+ DEBUG ("Failed to close pixbuf loader: %s",
+ error ? error->message : "No error given");
+ goto out;
+ }
+
+ pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
+ if (pixbuf)
+ {
+ g_object_ref (pixbuf);
+
+ if (mime_type != NULL)
+ {
+ format = gdk_pixbuf_loader_get_format (loader);
+ mime_types = gdk_pixbuf_format_get_mime_types (format);
+
+ *mime_type = g_strdup (*mime_types);
+ if (mime_types[1] != NULL)
+ DEBUG ("Loader supports more than one mime "
+ "type! Picking the first one, %s",
+ *mime_type);
+
+ g_strfreev (mime_types);
+ }
+ }
+
+out:
+ g_clear_error (&error);
+ g_object_unref (loader);
+
+ return pixbuf;
+}
+
+GdkPixbuf *
+tpaw_pixbuf_scale_down_if_necessary (GdkPixbuf *pixbuf,
+ gint max_size)
+{
+ gint width, height;
+ gdouble factor;
+
+ width = gdk_pixbuf_get_width (pixbuf);
+ height = gdk_pixbuf_get_height (pixbuf);
+
+ if (width > 0 && (width > max_size || height > max_size))
+ {
+ factor = (gdouble) max_size / MAX (width, height);
+
+ width = width * factor;
+ height = height * factor;
+
+ return gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_HYPER);
+ }
+
+ return g_object_ref (pixbuf);
+}
+
+GdkPixbuf *
+tpaw_pixbuf_from_icon_name_sized (const gchar *icon_name,
+ gint size)
+{
+ GtkIconTheme *theme;
+ GdkPixbuf *pixbuf;
+ GError *error = NULL;
+
+ if (!icon_name)
+ return NULL;
+
+ theme = gtk_icon_theme_get_default ();
+
+ pixbuf = gtk_icon_theme_load_icon (theme, icon_name, size, 0, &error);
+
+ if (error)
+ {
+ DEBUG ("Error loading icon: %s", error->message);
+ g_clear_error (&error);
+ }
+
+ return pixbuf;
+}
+
+GdkPixbuf *
+tpaw_pixbuf_from_icon_name (const gchar *icon_name,
+ GtkIconSize icon_size)
+{
+ gint w, h;
+ gint size = 48;
+
+ if (!icon_name)
+ return NULL;
+
+ if (gtk_icon_size_lookup (icon_size, &w, &h))
+ size = (w + h) / 2;
+
+ return tpaw_pixbuf_from_icon_name_sized (icon_name, size);
+}
+
+gchar *
+tpaw_filename_from_icon_name (const gchar *icon_name,
+ GtkIconSize icon_size)
+{
+ GtkIconTheme *icon_theme;
+ GtkIconInfo *icon_info;
+ gint w, h;
+ gint size = 48;
+ gchar *ret;
+
+ icon_theme = gtk_icon_theme_get_default ();
+
+ if (gtk_icon_size_lookup (icon_size, &w, &h))
+ size = (w + h) / 2;
+
+ icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon_name, size, 0);
+ if (icon_info == NULL)
+ return NULL;
+
+ ret = g_strdup (gtk_icon_info_get_filename (icon_info));
+ gtk_icon_info_free (icon_info);
+
+ return ret;
+}
--- /dev/null
+/*
+ * Copyright (C) 2002-2007 Imendio AB
+ * Copyright (C) 2007-2013 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ * Xavier Claessens <xclaesse@gmail.com>
+ * Travis Reitter <travis.reitter@collabora.co.uk>
+ */
+
+#ifndef __TPAW_UI_UTILS_H__
+#define __TPAW_UI_UTILS_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+GdkPixbuf * tpaw_pixbuf_from_data (gchar *data,
+ gsize data_size);
+GdkPixbuf * tpaw_pixbuf_from_data_and_mime (gchar *data,
+ gsize data_size,
+ gchar **mime_type);
+GdkPixbuf * tpaw_pixbuf_scale_down_if_necessary (GdkPixbuf *pixbuf,
+ gint max_size);
+GdkPixbuf * tpaw_pixbuf_from_icon_name (const gchar *icon_name,
+ GtkIconSize icon_size);
+GdkPixbuf * tpaw_pixbuf_from_icon_name_sized (const gchar *icon_name,
+ gint size);
+gchar * tpaw_filename_from_icon_name (const gchar *icon_name,
+ GtkIconSize icon_size);
+
+G_END_DECLS
+
+#endif /* __TPAW_UI_UTILS_H__ */