summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-02-18 05:05:40 +0100
committerBenjamin Otte <otte@redhat.com>2018-03-16 06:04:44 +0100
commitccb6b8585ccd3a228446e0ac5e7da487dcec0f39 (patch)
treed53496d2246b47ee746d402e9d4bac07b40b828f
parent2b35332fd691f5e42db2760018554993b063103e (diff)
downloadgtk+-ccb6b8585ccd3a228446e0ac5e7da487dcec0f39.tar.gz
aboutdialog: Make logo a paintable
No reason to limit this to textures anymore.
-rw-r--r--gtk/gtkaboutdialog.c30
-rw-r--r--gtk/gtkaboutdialog.h4
2 files changed, 17 insertions, 17 deletions
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index b1d4c29113..03a17325b7 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -557,7 +557,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
g_param_spec_object ("logo",
P_("Logo"),
P_("A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list()"),
- GDK_TYPE_TEXTURE,
+ GDK_TYPE_PAINTABLE,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
@@ -941,8 +941,8 @@ gtk_about_dialog_get_property (GObject *object,
g_value_set_boxed (value, priv->artists);
break;
case PROP_LOGO:
- if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_TEXTURE)
- g_value_set_object (value, gtk_image_get_texture (GTK_IMAGE (priv->logo_image)));
+ if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_PAINTABLE)
+ g_value_set_object (value, gtk_image_get_paintable (GTK_IMAGE (priv->logo_image)));
else
g_value_set_object (value, NULL);
break;
@@ -1729,13 +1729,13 @@ gtk_about_dialog_set_translator_credits (GtkAboutDialog *about,
* gtk_about_dialog_get_logo:
* @about: a #GtkAboutDialog
*
- * Returns the texture displayed as logo in the about dialog.
+ * Returns the paintable displayed as logo in the about dialog.
*
- * Returns: (transfer none): the texture displayed as logo. The
- * texture is owned by the about dialog. If you want to keep a
+ * Returns: (transfer none): the paintable displayed as logo. The
+ * paintable is owned by the about dialog. If you want to keep a
* reference to it, you have to call g_object_ref() on it.
*/
-GdkTexture *
+GdkPaintable *
gtk_about_dialog_get_logo (GtkAboutDialog *about)
{
GtkAboutDialogPrivate *priv;
@@ -1744,8 +1744,8 @@ gtk_about_dialog_get_logo (GtkAboutDialog *about)
priv = about->priv;
- if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_TEXTURE)
- return gtk_image_get_texture (GTK_IMAGE (priv->logo_image));
+ if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_PAINTABLE)
+ return gtk_image_get_paintable (GTK_IMAGE (priv->logo_image));
else
return NULL;
}
@@ -1753,7 +1753,7 @@ gtk_about_dialog_get_logo (GtkAboutDialog *about)
/**
* gtk_about_dialog_set_logo:
* @about: a #GtkAboutDialog
- * @logo: (allow-none): a #GdkTexture, or %NULL
+ * @logo: (allow-none): a #GdkPaintable, or %NULL
*
* Sets the surface to be displayed as logo in the about dialog.
* If it is %NULL, the default window icon set with
@@ -1761,7 +1761,7 @@ gtk_about_dialog_get_logo (GtkAboutDialog *about)
*/
void
gtk_about_dialog_set_logo (GtkAboutDialog *about,
- GdkTexture *logo)
+ GdkPaintable *logo)
{
GtkAboutDialogPrivate *priv;
@@ -1776,15 +1776,15 @@ gtk_about_dialog_set_logo (GtkAboutDialog *about,
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LOGO_ICON_NAME]);
if (logo != NULL)
- gtk_image_set_from_texture (GTK_IMAGE (priv->logo_image), logo);
+ gtk_image_set_from_paintable (GTK_IMAGE (priv->logo_image), logo);
else
{
GList *surfaces = gtk_window_get_default_icon_list ();
if (surfaces != NULL)
{
- gtk_image_set_from_texture (GTK_IMAGE (priv->logo_image),
- GDK_TEXTURE (surfaces->data));
+ gtk_image_set_from_paintable (GTK_IMAGE (priv->logo_image),
+ GDK_PAINTABLE (surfaces->data));
g_list_free (surfaces);
}
@@ -1842,7 +1842,7 @@ gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about,
g_object_freeze_notify (G_OBJECT (about));
- if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_TEXTURE)
+ if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_PAINTABLE)
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LOGO]);
if (icon_name)
diff --git a/gtk/gtkaboutdialog.h b/gtk/gtkaboutdialog.h
index 2d2cb7f4cd..fd003b91c0 100644
--- a/gtk/gtkaboutdialog.h
+++ b/gtk/gtkaboutdialog.h
@@ -198,10 +198,10 @@ GDK_AVAILABLE_IN_ALL
void gtk_about_dialog_set_translator_credits (GtkAboutDialog *about,
const gchar *translator_credits);
GDK_AVAILABLE_IN_ALL
-GdkTexture *gtk_about_dialog_get_logo (GtkAboutDialog *about);
+GdkPaintable *gtk_about_dialog_get_logo (GtkAboutDialog *about);
GDK_AVAILABLE_IN_ALL
void gtk_about_dialog_set_logo (GtkAboutDialog *about,
- GdkTexture *logo);
+ GdkPaintable *logo);
GDK_AVAILABLE_IN_ALL
const gchar * gtk_about_dialog_get_logo_icon_name (GtkAboutDialog *about);
GDK_AVAILABLE_IN_ALL