[gnome-software: 52/110] Drop GsPicture in favor of GtkPicture
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 52/110] Drop GsPicture in favor of GtkPicture
- Date: Tue, 5 Oct 2021 20:32:37 +0000 (UTC)
commit b0056ed64b77a3ddc2fafacc1ea2c2ab11f02e5b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Aug 24 19:18:26 2021 -0300
Drop GsPicture in favor of GtkPicture
GtkPicture does effectively the same that GsPicture, so let's just
use it now that it exists.
po/POTFILES.in | 1 -
src/gs-picture.c | 408 ---------------------------------------------
src/gs-picture.h | 27 ---
src/gs-screenshot-image.c | 10 +-
src/gs-screenshot-image.ui | 4 +-
src/meson.build | 1 -
6 files changed, 6 insertions(+), 445 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 201e07183..d9105d846 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -61,7 +61,6 @@ src/gs-overview-page.c
src/gs-overview-page.ui
lib/gs-plugin-loader.c
src/gs-page.c
-src/gs-picture.c
src/gs-prefs-dialog.ui
src/gs-removal-dialog.c
src/gs-removal-dialog.ui
diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
index 3ddd289b7..21ce662e9 100644
--- a/src/gs-screenshot-image.c
+++ b/src/gs-screenshot-image.c
@@ -14,7 +14,6 @@
#include "gs-screenshot-image.h"
#include "gs-common.h"
-#include "gs-picture.h"
#define SPINNER_TIMEOUT_SECS 2
@@ -99,13 +98,13 @@ as_screenshot_show_image (GsScreenshotImage *ssimg)
/* show icon */
if (g_strcmp0 (ssimg->current_image, "image1") == 0) {
if (pixbuf != NULL) {
- gs_picture_set_pixbuf (GS_PICTURE (ssimg->image2), pixbuf);
+ gtk_picture_set_pixbuf (GTK_PICTURE (ssimg->image2), pixbuf);
}
gtk_stack_set_visible_child_name (GTK_STACK (ssimg->stack), "image2");
ssimg->current_image = "image2";
} else {
if (pixbuf != NULL) {
- gs_picture_set_pixbuf (GS_PICTURE (ssimg->image1), pixbuf);
+ gtk_picture_set_pixbuf (GTK_PICTURE (ssimg->image1), pixbuf);
}
gtk_stack_set_visible_child_name (GTK_STACK (ssimg->stack), "image1");
ssimg->current_image = "image1";
@@ -223,9 +222,9 @@ gs_screenshot_image_show_blurred (GsScreenshotImage *ssimg,
return;
if (g_strcmp0 (ssimg->current_image, "image1") == 0) {
- gs_picture_set_pixbuf (GS_PICTURE (ssimg->image1), pb);
+ gtk_picture_set_pixbuf (GTK_PICTURE (ssimg->image1), pb);
} else {
- gs_picture_set_pixbuf (GS_PICTURE (ssimg->image2), pb);
+ gtk_picture_set_pixbuf (GTK_PICTURE (ssimg->image2), pb);
}
}
@@ -682,7 +681,6 @@ gs_screenshot_image_init (GsScreenshotImage *ssimg)
ssimg->settings = g_settings_new ("org.gnome.software");
ssimg->showing_image = FALSE;
- g_type_ensure (GS_TYPE_PICTURE);
gtk_widget_init_template (GTK_WIDGET (ssimg));
}
diff --git a/src/gs-screenshot-image.ui b/src/gs-screenshot-image.ui
index 579e718f7..92063db4f 100644
--- a/src/gs-screenshot-image.ui
+++ b/src/gs-screenshot-image.ui
@@ -30,7 +30,7 @@
<property name="visible">True</property>
<property name="transition-type">crossfade</property>
<child>
- <object class="GsPicture" id="image1">
+ <object class="GtkPicture" id="image1">
<property name="visible">True</property>
<style>
<class name="image1"/>
@@ -41,7 +41,7 @@
</packing>
</child>
<child>
- <object class="GsPicture" id="image2">
+ <object class="GtkPicture" id="image2">
<property name="visible">True</property>
<style>
<class name="image2"/>
diff --git a/src/meson.build b/src/meson.build
index 3044342b4..1f59c4218 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -60,7 +60,6 @@ gnome_software_sources = [
'gs-origin-popover-row.c',
'gs-os-update-page.c',
'gs-page.c',
- 'gs-picture.c',
'gs-prefs-dialog.c',
'gs-progress-button.c',
'gs-removal-dialog.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]