[dia] [gdk-deprecated] Remove GdkPixmap, GtkBitmap from color area interface
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [gdk-deprecated] Remove GdkPixmap, GtkBitmap from color area interface
- Date: Sun, 19 Aug 2012 17:36:50 +0000 (UTC)
commit b95704c087eb0b545e935d6b8e96c2cdcf66ec5a
Author: Hans Breuer <hans breuer org>
Date: Mon Jul 30 18:21:11 2012 +0200
[gdk-deprecated] Remove GdkPixmap, GtkBitmap from color area interface
app/color_area.c | 21 +++++++++++++--------
app/color_area.h | 7 +------
app/toolbox.c | 15 +--------------
3 files changed, 15 insertions(+), 28 deletions(-)
---
diff --git a/app/color_area.c b/app/color_area.c
index 1373194..fd5ebf5 100644
--- a/app/color_area.c
+++ b/app/color_area.c
@@ -459,17 +459,26 @@ color_area_events (GtkWidget *widget,
return FALSE;
}
+#include "pixmaps/swap.xpm"
+#include "pixmaps/default.xpm"
GtkWidget *
color_area_create (int width,
int height,
- GdkPixmap *default_pmap,
- GdkBitmap *default_msk,
- GdkPixmap *swap_pmap,
- GdkBitmap *swap_msk)
+ GtkWidget *parent,
+ GtkStyle *style)
{
GtkWidget *event_box;
+ default_pixmap =
+ gdk_pixmap_colormap_create_from_xpm_d(NULL,
+ gtk_widget_get_colormap(parent), &default_mask,
+ &style->bg[GTK_STATE_NORMAL], default_xpm);
+ swap_pixmap =
+ gdk_pixmap_colormap_create_from_xpm_d(NULL,
+ gtk_widget_get_colormap(parent), &swap_mask,
+ &style->bg[GTK_STATE_NORMAL], swap_xpm);
+
attributes_set_foreground(persistence_register_color("fg_color", &color_black));
attributes_set_background(persistence_register_color("bg_color", &color_white));
@@ -480,10 +489,6 @@ color_area_create (int width,
g_signal_connect (G_OBJECT (color_area), "event",
G_CALLBACK(color_area_events),
NULL);
- default_pixmap = default_pmap;
- default_mask = default_msk;
- swap_pixmap = swap_pmap;
- swap_mask = swap_msk;
gtk_widget_show(color_area);
gtk_container_add(GTK_CONTAINER(event_box), color_area);
diff --git a/app/color_area.h b/app/color_area.h
index 3495454..56f753f 100644
--- a/app/color_area.h
+++ b/app/color_area.h
@@ -20,11 +20,6 @@
#include <gtk/gtk.h>
-GtkWidget *color_area_create (int width,
- int height,
- GdkPixmap *default_pmap,
- GdkBitmap *default_msk,
- GdkPixmap *swap_pmap,
- GdkBitmap *swap_msk);
+GtkWidget *color_area_create (int width, int height, GtkWidget *parent, GtkStyle *style);
#endif /* COLOR_AREA_H */
diff --git a/app/toolbox.c b/app/toolbox.c
index ce5d756..2ed88f3 100644
--- a/app/toolbox.c
+++ b/app/toolbox.c
@@ -40,8 +40,6 @@
#include "toolbox.h"
-#include "pixmaps/swap.xpm"
-#include "pixmaps/default.xpm"
#include "pixmaps/missing.xpm"
#include <gdk-pixbuf/gdk-pixbuf.h>
@@ -492,15 +490,6 @@ create_color_area (GtkWidget *parent)
gtk_widget_ensure_style(parent);
style = gtk_widget_get_style(parent);
- default_pixmap =
- gdk_pixmap_colormap_create_from_xpm_d(NULL,
- gtk_widget_get_colormap(parent), &default_mask,
- &style->bg[GTK_STATE_NORMAL], default_xpm);
- swap_pixmap =
- gdk_pixmap_colormap_create_from_xpm_d(NULL,
- gtk_widget_get_colormap(parent), &swap_mask,
- &style->bg[GTK_STATE_NORMAL], swap_xpm);
-
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
gtk_wrap_box_pack_wrapped(GTK_WRAP_BOX(parent), frame, TRUE, TRUE, FALSE, FALSE, TRUE);
@@ -513,9 +502,7 @@ create_color_area (GtkWidget *parent)
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_set_border_width (GTK_CONTAINER (alignment), 3);
- col_area = color_area_create (54, 42,
- default_pixmap, default_mask,
- swap_pixmap, swap_mask);
+ col_area = color_area_create (54, 42, parent, style);
gtk_container_add (GTK_CONTAINER (alignment), col_area);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]