[balsa/gtk3] Deprecation cleanup
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Deprecation cleanup
- Date: Wed, 11 Feb 2015 00:30:06 +0000 (UTC)
commit 87bccd40941184325a87d223860229cf9f03f163
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue Feb 10 19:29:45 2015 -0500
Deprecation cleanup
* src/balsa-mime-widget-image.c (balsa_mime_widget_image_dispose),
(balsa_mime_widget_new_image):
gtk_style_context_get_background_color and
gtk_widget_override_background_color are deprecated; when we
replace the GtkNotebook with a GtkStack, we should get
ChangeLog | 11 +++++++++++
src/balsa-mime-widget-image.c | 8 ++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 373fcb8..6bc7347 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,17 @@
Deprecation cleanup
+ * src/balsa-mime-widget-image.c (balsa_mime_widget_image_dispose),
+ (balsa_mime_widget_new_image):
+ gtk_style_context_get_background_color and
+ gtk_widget_override_background_color are deprecated; when we
+ replace the GtkNotebook with a GtkStack, we should get
+ consistent backgrounds again.
+
+2015-02-10 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Deprecation cleanup
+
* src/balsa-message.c (balsa_message_init):
gtk_style_context_get_background_color and
gtk_widget_override_background_color are deprecated; when we
diff --git a/src/balsa-mime-widget-image.c b/src/balsa-mime-widget-image.c
index febb987..d301422 100644
--- a/src/balsa-mime-widget-image.c
+++ b/src/balsa-mime-widget-image.c
@@ -34,8 +34,10 @@
struct _BalsaMimeWidgetImage {
BalsaMimeWidget parent;
+#if !GTK_CHECK_VERSION(3, 15, 0)
GtkStyleContext *context;
gulong context_changed_handler_id;
+#endif
};
struct _BalsaMimeWidgetImageClass {
@@ -56,11 +58,13 @@ balsa_mime_widget_image_dispose(GObject * obj)
{
BalsaMimeWidgetImage *mwi = BALSA_MIME_WIDGET_IMAGE(obj);
+#if !GTK_CHECK_VERSION(3, 15, 0)
if (mwi->context_changed_handler_id) {
g_signal_handler_disconnect(mwi->context,
mwi->context_changed_handler_id);
mwi->context_changed_handler_id = 0;
}
+#endif
(*G_OBJECT_CLASS(balsa_mime_widget_image_parent_class)->
dispose) (obj);
@@ -81,6 +85,7 @@ static gboolean balsa_image_button_press_cb(GtkWidget * widget, GdkEventButton *
GtkMenu * menu);
static gboolean img_check_size(GtkImage ** widget_p);
+#if !GTK_CHECK_VERSION(3, 15, 0)
static void
bmwi_context_changed_cb(GtkStyleContext * context, BalsaMimeWidget * mw)
{
@@ -91,6 +96,7 @@ bmwi_context_changed_cb(GtkStyleContext * context, BalsaMimeWidget * mw)
gtk_widget_override_background_color(mw->widget,
GTK_STATE_FLAG_NORMAL, &rgba);
}
+#endif
BalsaMimeWidget *
balsa_mime_widget_new_image(BalsaMessage * bm,
@@ -124,12 +130,14 @@ balsa_mime_widget_new_image(BalsaMessage * bm,
g_signal_connect(G_OBJECT(mw->widget), "button-press-event",
G_CALLBACK(balsa_image_button_press_cb), data);
+#if !GTK_CHECK_VERSION(3, 15, 0)
mwi->context =
gtk_widget_get_style_context(GTK_WIDGET(bm->scroll));
bmwi_context_changed_cb(mwi->context, mw);
mwi->context_changed_handler_id =
g_signal_connect(mwi->context, "changed",
G_CALLBACK(bmwi_context_changed_cb), mw);
+#endif
image = gtk_image_new_from_icon_name("image-missing",
GTK_ICON_SIZE_BUTTON);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]