[gnumeric] Sheet drag: load arrow from glib resources.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Sheet drag: load arrow from glib resources.
- Date: Tue, 20 Jan 2015 00:44:53 +0000 (UTC)
commit 2f9903c81bd32bc842460b6a7c13d3f1b0822af8
Author: Morten Welinder <terra gnome org>
Date: Mon Jan 19 19:44:17 2015 -0500
Sheet drag: load arrow from glib resources.
Code is probably dead or at least dormant.
ChangeLog | 3 +++
src/Makefile.am | 3 +--
src/gnm.gresource.xml | 1 +
src/wbc-gtk.c | 22 ++++------------------
4 files changed, 9 insertions(+), 20 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7939248..cb5fec9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2015-01-19 Morten Welinder <terra gnome org>
+ * src/wbc-gtk.c (cb_sheet_label_drag_begin): Load arrow from glib
+ resources.
+
* src/sheet-object-image.c (gnm_soi_new_view): Load unknown-image
from glib resources.
diff --git a/src/Makefile.am b/src/Makefile.am
index 140e6e3..de044e4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -436,8 +436,7 @@ gnumeric_app_libs = \
widgets/libwidgets.la
embedded_imgs = \
- gnumeric.css \
- pixmaps/sheet_move_marker.xpm
+ gnumeric.css
embedded-imgs.c: $(top_srcdir)/tools/embedder $(embedded_imgs) Makefile
diff --git a/src/gnm.gresource.xml b/src/gnm.gresource.xml
index 92d9e53..4847dc7 100644
--- a/src/gnm.gresource.xml
+++ b/src/gnm.gresource.xml
@@ -179,5 +179,6 @@
<file alias="images/down-right.png">src/pixmaps/down-right.png</file>
<file alias="images/gnumeric_splash_1.4.png">src/pixmaps/gnumeric_splash_1.4.png</file>
<file alias="images/unknown_image.png">src/pixmaps/unknown_image.png</file>
+ <file preprocess='to-pixdata'
alias="images/sheet_move_marker.xpm">src/pixmaps/sheet_move_marker.xpm</file>
</gresource>
</gresources>
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 2f45f38..79dbda5 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -666,16 +666,14 @@ cb_sheet_label_drag_data_received (GtkWidget *widget, GdkDragContext *context,
}
}
+/*
+ * Not currently reachable, I believe. We use the notebook's dragging.
+ */
static void
cb_sheet_label_drag_begin (GtkWidget *widget, GdkDragContext *context,
WBCGtk *wbcg)
{
GtkWidget *arrow, *image;
- GdkPixbuf *pixbuf;
-#warning GTK3: how can we mask there?
-#if 0
- GdkBitmap *bitmap;
-#endif
g_return_if_fail (IS_WBC_GTK (wbcg));
@@ -684,21 +682,9 @@ cb_sheet_label_drag_begin (GtkWidget *widget, GdkDragContext *context,
gtk_window_set_screen (GTK_WINDOW (arrow),
gtk_widget_get_screen (widget));
gtk_widget_realize (arrow);
- pixbuf = gtk_icon_theme_load_icon (
- gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget)),
- "sheet_move_marker", 13, 0, NULL);
- image = gtk_image_new_from_pixbuf (pixbuf);
+ image = gtk_image_new_from_resource ("/org/gnumeric/gnumeric/images/sheet_move_marker.xpm");
gtk_widget_show (image);
gtk_container_add (GTK_CONTAINER (arrow), image);
-#if 0
- gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf,
- gtk_widget_get_colormap (widget), NULL, &bitmap, 0x7f);
-#endif
- g_object_unref (pixbuf);
-#if 0
- gtk_widget_shape_combine_mask (arrow, bitmap, 0, 0);
- g_object_unref (bitmap);
-#endif
g_object_ref_sink (arrow);
g_object_set_data (G_OBJECT (widget), "arrow", arrow);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]