[gnome-control-center] background: Use GTK widget types
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Use GTK widget types
- Date: Mon, 30 Mar 2020 02:10:40 +0000 (UTC)
commit 7e0a66226b165edee07d7edb55d5bc82a0a65728
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Nov 20 14:43:01 2019 +1300
background: Use GTK widget types
panels/background/cc-background-panel.c | 4 ++--
panels/background/cc-background-preview.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 9d5aa92a0..0eb366d7a 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -59,7 +59,7 @@ struct _CcBackgroundPanel
CcBackgroundItem *current_background;
CcBackgroundChooser *background_chooser;
- GtkWidget *add_picture_button;
+ GtkButton *add_picture_button;
CcBackgroundPreview *desktop_preview;
};
@@ -228,7 +228,7 @@ cc_background_panel_constructed (GObject *object)
self = CC_BACKGROUND_PANEL (object);
shell = cc_panel_get_shell (CC_PANEL (self));
- cc_shell_embed_widget_in_header (shell, self->add_picture_button, GTK_POS_RIGHT);
+ cc_shell_embed_widget_in_header (shell, GTK_WIDGET (self->add_picture_button), GTK_POS_RIGHT);
G_OBJECT_CLASS (cc_background_panel_parent_class)->constructed (object);
}
diff --git a/panels/background/cc-background-preview.c b/panels/background/cc-background-preview.c
index fa2bc90f8..17b47d6e4 100644
--- a/panels/background/cc-background-preview.c
+++ b/panels/background/cc-background-preview.c
@@ -26,9 +26,9 @@ struct _CcBackgroundPreview
{
GtkBox parent;
- GtkWidget *animated_background_icon;
+ GtkImage *animated_background_icon;
GtkLabel *desktop_clock_label;
- GtkWidget *drawing_area;
+ GtkDrawingArea *drawing_area;
GtkLabel *lock_screen_label;
GtkStack *stack;
@@ -161,8 +161,8 @@ on_preview_draw_cb (CcBackgroundPreview *self,
if (!self->item)
return FALSE;
- scale_factor = gtk_widget_get_scale_factor (self->drawing_area);
- gtk_widget_get_allocation (self->drawing_area, &allocation);
+ scale_factor = gtk_widget_get_scale_factor (GTK_WIDGET (self->drawing_area));
+ gtk_widget_get_allocation (GTK_WIDGET (self->drawing_area), &allocation);
pixbuf = cc_background_item_get_frame_thumbnail (self->item,
self->thumbnail_factory,
allocation.width,
@@ -369,10 +369,10 @@ cc_background_preview_set_item (CcBackgroundPreview *self,
if (!g_set_object (&self->item, item))
return;
- gtk_widget_set_visible (self->animated_background_icon,
+ gtk_widget_set_visible (GTK_WIDGET (self->animated_background_icon),
cc_background_item_changes_with_time (item));
- gtk_widget_queue_draw (self->drawing_area);
+ gtk_widget_queue_draw (GTK_WIDGET (self->drawing_area));
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_ITEM]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]