[anjuta] #582961 – Replace SexyIconEntry by GtkEntry icon functionality (available in GTK+ 2.16)
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjuta] #582961 – Replace SexyIconEntry by GtkEntry icon functionality (available in GTK+ 2.16)
- Date: Sat, 20 Jun 2009 15:42:57 -0400 (EDT)
commit 5a16f7e292083eb2e79f1d996da4eb177bfbae83
Author: Javier Jardón <javierjc1982 gmail com>
Date: Sat Jun 20 21:42:12 2009 +0200
#582961 â?? Replace SexyIconEntry by GtkEntry icon functionality (available in GTK+ 2.16)
SexyIconEntry is still used if compiled with GTK 2.14
plugins/debug-manager/data_view.c | 7 +++++++
plugins/debug-manager/sparse_view.c | 7 +++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/plugins/debug-manager/data_view.c b/plugins/debug-manager/data_view.c
index 7b41a61..ead9aed 100644
--- a/plugins/debug-manager/data_view.c
+++ b/plugins/debug-manager/data_view.c
@@ -268,11 +268,18 @@ dma_data_view_goto_activate (GtkWidget *menu_item,
gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
/* add entry */
+#if GTK_CHECK_VERSION(2,16,0)
+ view->goto_entry = gtk_entry_new ();
+ gtk_entry_set_icon_from_stock (GTK_ENTRY (view->goto_entry),
+ GTK_ENTRY_ICON_PRIMARY,
+ GTK_STOCK_JUMP_TO);
+#else
view->goto_entry = sexy_icon_entry_new ();
icon = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_MENU);
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY(view->goto_entry),
SEXY_ICON_ENTRY_PRIMARY,
GTK_IMAGE (icon));
+#endif
gtk_widget_show (view->goto_entry);
gtk_container_add (GTK_CONTAINER (vbox),
view->goto_entry);
diff --git a/plugins/debug-manager/sparse_view.c b/plugins/debug-manager/sparse_view.c
index 606ffbe..783d8aa 100644
--- a/plugins/debug-manager/sparse_view.c
+++ b/plugins/debug-manager/sparse_view.c
@@ -259,11 +259,18 @@ dma_sparse_view_goto_activate (GtkWidget *menu_item,
gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
/* add entry */
+#if GTK_CHECK_VERSION(2,16,0)
+ view->priv->goto_entry = gtk_entry_new ();
+ gtk_entry_set_icon_from_stock (GTK_ENTRY (view->priv->goto_entry),
+ GTK_ENTRY_ICON_PRIMARY,
+ GTK_STOCK_JUMP_TO);
+#else
view->priv->goto_entry = sexy_icon_entry_new ();
icon = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_MENU);
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY(view->priv->goto_entry),
SEXY_ICON_ENTRY_PRIMARY,
GTK_IMAGE (icon));
+#endif
gtk_widget_show (view->priv->goto_entry);
gtk_container_add (GTK_CONTAINER (vbox),
view->priv->goto_entry);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]