[gnumeric] compilation: feed the dead kittens.



commit b82df4c6cd8f9759fae2963ecda1749d51f9fad5
Author: Morten Welinder <terra gnome org>
Date:   Tue Apr 12 09:37:52 2011 -0400

    compilation: feed the dead kittens.

 configure.in                       |    2 +-
 src/dead-kittens.h                 |    4 ++++
 src/dialogs/dialog-cell-format.c   |   14 +++++++-------
 src/dialogs/dialog-cell-sort.c     |   11 +++++------
 src/dialogs/dialog-consolidate.c   |    7 ++++---
 src/dialogs/dialog-define-names.c  |   30 ++++++++++++------------------
 src/dialogs/dialog-doc-metadata.c  |    7 ++++---
 src/dialogs/dialog-hyperlink.c     |    6 ++++--
 src/dialogs/dialog-preferences.c   |    5 ++---
 src/dialogs/dialog-printer-setup.c |    4 ++--
 src/dialogs/dialog-sheet-order.c   |   27 ++++++++++++---------------
 src/dialogs/dialog-workbook-attr.c |    6 +++---
 12 files changed, 60 insertions(+), 63 deletions(-)
---
diff --git a/configure.in b/configure.in
index b80be09..dc23a68 100644
--- a/configure.in
+++ b/configure.in
@@ -698,7 +698,7 @@ AC_CHECK_FUNCS(gtk_orientable_set_orientation)
 AC_CHECK_FUNCS(gtk_selection_data_get_data gtk_selection_data_get_length gtk_selection_data_get_target)
 AC_CHECK_FUNCS(gtk_table_get_size)
 AC_CHECK_FUNCS(gtk_tree_view_column_get_button)
-AC_CHECK_FUNCS(gtk_widget_get_visible gtk_widget_set_visible gtk_widget_get_state gtk_widget_is_toplevel gtk_widget_get_window gtk_widget_get_can_focus gtk_widget_has_focus gtk_widget_get_style gtk_widget_get_allocation gtk_widget_is_sensitive gtk_widget_set_can_focus gtk_widget_set_can_default gtk_widget_get_realized)
+AC_CHECK_FUNCS(gtk_widget_get_visible gtk_widget_set_visible gtk_widget_get_state gtk_widget_is_toplevel gtk_widget_get_window gtk_widget_get_can_focus gtk_widget_has_focus gtk_widget_get_style gtk_widget_get_allocation gtk_widget_is_sensitive gtk_widget_set_can_focus gtk_widget_set_can_default gtk_widget_get_realized gtk_widget_render_icon_pixbuf)
 AC_CHECK_FUNCS(gtk_window_get_default_widget)
 AC_CHECK_FUNCS(gsf_infile_msvba_steal_modules gsf_open_pkg_foreach_rel )
 AC_CHECK_FUNCS(pango_font_map_create_context)
diff --git a/src/dead-kittens.h b/src/dead-kittens.h
index 2b64b79..f81c16b 100644
--- a/src/dead-kittens.h
+++ b/src/dead-kittens.h
@@ -87,6 +87,10 @@
 #define gtk_selection_data_get_target(_s_) ((_s_)->target)
 #endif
 
+#ifndef HAVE_GTK_WIDGET_RENDER_ICON_PIXBUF
+#define gtk_widget_render_icon_pixbuf(_w_,_sid_,_size_) gtk_widget_render_icon((_w_),(_sid_),(_size_),NULL)
+#endif
+
 #ifndef HAVE_GTK_WIDGET_SET_VISIBLE
 #define gtk_widget_set_visible(_w_,_v_) do { if (_v_) gtk_widget_show (_w_); else gtk_widget_hide (_w_); } while (0)
 #endif
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index 1b68cfa..f4f3306 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -272,7 +272,7 @@ static int fmt_dialog_currency = 0;
  */
 static void
 cb_page_select (G_GNUC_UNUSED GtkNotebook *notebook,
-		G_GNUC_UNUSED GtkNotebookPage *page,
+		G_GNUC_UNUSED GtkWidget *page,
 		gint page_num,
 		G_GNUC_UNUSED	gpointer user_data)
 {
@@ -1776,26 +1776,26 @@ build_validation_error_combo (GtkComboBox *box)
 			    1, _("None          (silently accept invalid input)"),
 			    -1);
 
-	pixbuf = gtk_widget_render_icon (GTK_WIDGET (box), GTK_STOCK_STOP,
-					 GTK_ICON_SIZE_BUTTON, NULL);
+	pixbuf = gtk_widget_render_icon_pixbuf (GTK_WIDGET (box), GTK_STOCK_STOP,
+					 GTK_ICON_SIZE_BUTTON);
 	gtk_list_store_append (store, &iter);
 	gtk_list_store_set (store, &iter,
 			    0, pixbuf,
 			    1, _("Stop            (never allow invalid input)"),
 			    -1);
 
-	pixbuf = gtk_widget_render_icon (GTK_WIDGET (box),
+	pixbuf = gtk_widget_render_icon_pixbuf (GTK_WIDGET (box),
 					 GTK_STOCK_DIALOG_WARNING,
-					 GTK_ICON_SIZE_BUTTON, NULL);
+					 GTK_ICON_SIZE_BUTTON);
 	gtk_list_store_append (store, &iter);
 	gtk_list_store_set (store, &iter,
 			    0, pixbuf,
 			    1, _("Warning     (accept/discard invalid input)"),
 			    -1);
 
-	pixbuf = gtk_widget_render_icon (GTK_WIDGET (box),
+	pixbuf = gtk_widget_render_icon_pixbuf (GTK_WIDGET (box),
 					 GTK_STOCK_DIALOG_INFO,
-					 GTK_ICON_SIZE_BUTTON, NULL);
+					 GTK_ICON_SIZE_BUTTON);
 	gtk_list_store_append (store, &iter);
 	gtk_list_store_set (store, &iter,
 			    0, pixbuf,
diff --git a/src/dialogs/dialog-cell-sort.c b/src/dialogs/dialog-cell-sort.c
index b3c4cbf..f5b9d6e 100644
--- a/src/dialogs/dialog-cell-sort.c
+++ b/src/dialogs/dialog-cell-sort.c
@@ -50,6 +50,7 @@
 #include <gsf/gsf-impl-utils.h>
 #include <gdk/gdkkeysyms.h>
 #include <goffice/goffice.h>
+#include <dead-kittens.h>
 
 #define CELL_SORT_KEY "cell-sort-dialog"
 
@@ -1176,15 +1177,13 @@ dialog_cell_sort (WBCGtk *wbcg)
         state->dialog = go_gtk_builder_get_widget (state->gui, "CellSort");
 
 	state->image_ascending =
-		gtk_widget_render_icon (state->dialog,
+		gtk_widget_render_icon_pixbuf (state->dialog,
 					GTK_STOCK_SORT_ASCENDING,
-					GTK_ICON_SIZE_LARGE_TOOLBAR,
-					"Gnumeric-Cell-Sort");
+					GTK_ICON_SIZE_LARGE_TOOLBAR);
 	state->image_descending =
-		gtk_widget_render_icon (state->dialog,
+		gtk_widget_render_icon_pixbuf (state->dialog,
 					GTK_STOCK_SORT_DESCENDING,
-					GTK_ICON_SIZE_LARGE_TOOLBAR,
-					"Gnumeric-Cell-Sort");
+					GTK_ICON_SIZE_LARGE_TOOLBAR);
 	dialog_init (state);
 
 	gnumeric_keyed_dialog (state->wbcg, GTK_WINDOW (state->dialog),
diff --git a/src/dialogs/dialog-consolidate.c b/src/dialogs/dialog-consolidate.c
index 8fa9e88..b3b0c2d 100644
--- a/src/dialogs/dialog-consolidate.c
+++ b/src/dialogs/dialog-consolidate.c
@@ -45,6 +45,8 @@
 
 #include <string.h>
 
+#include <dead-kittens.h>
+
 #define CONSOLIDATE_KEY            "consolidate-dialog"
 
 enum {
@@ -503,11 +505,10 @@ dialog_consolidate_tool_init (ConsolidateState *state)
 	state->areas_index = -1;
 
 	setup_widgets (state, state->base.gui);
-	state->pixmap =  gtk_widget_render_icon
+	state->pixmap =  gtk_widget_render_icon_pixbuf
 		(GTK_WIDGET(state->base.dialog),
 		 "Gnumeric_ExprEntry",
-		 GTK_ICON_SIZE_LARGE_TOOLBAR,
-		 "Gnumeric-Consolidate-Dialog");
+		 GTK_ICON_SIZE_LARGE_TOOLBAR);
 
 	/* Dynamic initialization */
 	cb_source_changed (NULL, state);
diff --git a/src/dialogs/dialog-define-names.c b/src/dialogs/dialog-define-names.c
index b9f6ca9..c5dfdb4 100644
--- a/src/dialogs/dialog-define-names.c
+++ b/src/dialogs/dialog-define-names.c
@@ -1183,11 +1183,10 @@ name_guru_init (NameGuruState *state, WBCGtk *wbcg, gboolean is_paste_dialog)
 				  "changed",
 				  G_CALLBACK (name_guru_update_sensitivity),
 				  state);
-		state->image_paste = gtk_widget_render_icon
+		state->image_paste = gtk_widget_render_icon_pixbuf
 			(state->dialog,
 			 GTK_STOCK_PASTE,
-			 GTK_ICON_SIZE_SMALL_TOOLBAR,
-			 "Gnumeric-Define-Names-Dialog");
+			 GTK_ICON_SIZE_SMALL_TOOLBAR);
 		state->image_add    = NULL;
 		state->image_delete = NULL;
 		state->image_lock   = NULL;
@@ -1195,31 +1194,26 @@ name_guru_init (NameGuruState *state, WBCGtk *wbcg, gboolean is_paste_dialog)
 		state->image_down   = NULL;
 	} else {
 		state->image_paste = NULL;
-		state->image_add =  gtk_widget_render_icon
+		state->image_add =  gtk_widget_render_icon_pixbuf
 			(state->dialog,
 			 GTK_STOCK_ADD,
-			 GTK_ICON_SIZE_SMALL_TOOLBAR,
-			 "Gnumeric-Define-Names-Dialog");
-		state->image_delete =  gtk_widget_render_icon
+			 GTK_ICON_SIZE_SMALL_TOOLBAR);
+		state->image_delete =  gtk_widget_render_icon_pixbuf
 			(state->dialog,
 			 GTK_STOCK_REMOVE,
-			 GTK_ICON_SIZE_SMALL_TOOLBAR,
-			 "Gnumeric-Define-Names-Dialog");
-		state->image_lock =  gtk_widget_render_icon
+			 GTK_ICON_SIZE_SMALL_TOOLBAR);
+		state->image_lock =  gtk_widget_render_icon_pixbuf
 			(state->dialog,
 			 "Gnumeric_Protection_Yes",
-			 GTK_ICON_SIZE_SMALL_TOOLBAR,
-			 "Gnumeric-Define-Names-Dialog");
-		state->image_up =  gtk_widget_render_icon
+			 GTK_ICON_SIZE_SMALL_TOOLBAR);
+		state->image_up =  gtk_widget_render_icon_pixbuf
 			(state->dialog,
 			 GTK_STOCK_GO_UP,
-			 GTK_ICON_SIZE_SMALL_TOOLBAR,
-			 "Gnumeric-Define-Names-Dialog");
-		state->image_down =  gtk_widget_render_icon
+			 GTK_ICON_SIZE_SMALL_TOOLBAR);
+		state->image_down =  gtk_widget_render_icon_pixbuf
 			(state->dialog,
 			 GTK_STOCK_GO_DOWN,
-			 GTK_ICON_SIZE_SMALL_TOOLBAR,
-			 "Gnumeric-Define-Names-Dialog");
+			 GTK_ICON_SIZE_SMALL_TOOLBAR);
 	}
 
 	state->search_entry = go_gtk_builder_get_widget (state->gui,
diff --git a/src/dialogs/dialog-doc-metadata.c b/src/dialogs/dialog-doc-metadata.c
index c31f843..d41246f 100644
--- a/src/dialogs/dialog-doc-metadata.c
+++ b/src/dialogs/dialog-doc-metadata.c
@@ -48,6 +48,8 @@
 
 #include <string.h>
 
+#include <dead-kittens.h>
+
 #define DOC_METADATA_KEY "dialog-doc-metadata"
 
 enum {
@@ -1567,9 +1569,8 @@ dialog_doc_meta_data_add_item (DialogDocMetaData *state, char const *page_name,
 	GdkPixbuf * icon = NULL;
 
 	if (icon_name != NULL)
-		icon = gtk_widget_render_icon (state->dialog, icon_name,
-					       GTK_ICON_SIZE_MENU,
-					       DOC_METADATA_KEY);
+		icon = gtk_widget_render_icon_pixbuf (state->dialog, icon_name,
+					       GTK_ICON_SIZE_MENU);
 	if ((parent_path != NULL) && gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (state->store),
 									  &parent, parent_path))
 		gtk_tree_store_append (state->store, &iter, &parent);
diff --git a/src/dialogs/dialog-hyperlink.c b/src/dialogs/dialog-hyperlink.c
index 1679845..4d31e6e 100644
--- a/src/dialogs/dialog-hyperlink.c
+++ b/src/dialogs/dialog-hyperlink.c
@@ -44,6 +44,8 @@
 
 #include <string.h>
 
+#include <dead-kittens.h>
+
 typedef struct {
 	WBCGtk  *wbcg;
 	Workbook  *wb;
@@ -516,8 +518,8 @@ dhl_init (HyperlinkState *state)
 	g_object_unref (store);
 
 	for (i = 0 ; i < G_N_ELEMENTS (type); i++) {
-		pixbuf = gtk_widget_render_icon (w, type[i].image_name,
-						 GTK_ICON_SIZE_MENU, NULL);
+		pixbuf = gtk_widget_render_icon_pixbuf (w, type[i].image_name,
+						 GTK_ICON_SIZE_MENU);
 		gtk_list_store_append (store, &iter);
 		gtk_list_store_set (store, &iter,
 				    0, pixbuf,
diff --git a/src/dialogs/dialog-preferences.c b/src/dialogs/dialog-preferences.c
index c7dc3e1..b64c347 100644
--- a/src/dialogs/dialog-preferences.c
+++ b/src/dialogs/dialog-preferences.c
@@ -87,9 +87,8 @@ dialog_pref_add_item (PrefState *state, char const *page_name,
 	GdkPixbuf * icon = NULL;
 
 	if (icon_name != NULL)
-		icon = gtk_widget_render_icon (state->dialog, icon_name,
-					       GTK_ICON_SIZE_MENU,
-					       "Gnumeric-Preference-Dialog");
+		icon = gtk_widget_render_icon_pixbuf (state->dialog, icon_name,
+					       GTK_ICON_SIZE_MENU);
 	if ((parent_path != NULL) && gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (state->store),
 									  &parent, parent_path))
 		gtk_tree_store_append (state->store, &iter, &parent);
diff --git a/src/dialogs/dialog-printer-setup.c b/src/dialogs/dialog-printer-setup.c
index 12fd1a4..c9d0a9b 100644
--- a/src/dialogs/dialog-printer-setup.c
+++ b/src/dialogs/dialog-printer-setup.c
@@ -1139,9 +1139,9 @@ hf_insert_hf_stock_tag (HFCustomizeState *hf_state, GtkTextBuffer *buffer,
 		gtk_text_buffer_get_iter_at_mark
 			(buffer, &iter, gtk_text_buffer_get_insert (buffer));
 
-		pix = gtk_widget_render_icon (GTK_WIDGET (hf_state->dialog),
+		pix = gtk_widget_render_icon_pixbuf (GTK_WIDGET (hf_state->dialog),
 					      stock_id,
-					      GTK_ICON_SIZE_MENU, NULL);
+					      GTK_ICON_SIZE_MENU);
 		gtk_text_buffer_insert_pixbuf (buffer, &iter, pix);
 		gtk_text_iter_backward_char (&iter);
 		new_mark = gtk_text_buffer_create_mark (buffer, NULL,
diff --git a/src/dialogs/dialog-sheet-order.c b/src/dialogs/dialog-sheet-order.c
index f87a209..b0e99cb 100644
--- a/src/dialogs/dialog-sheet-order.c
+++ b/src/dialogs/dialog-sheet-order.c
@@ -49,6 +49,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 
+#include <dead-kittens.h>
+
 #define SHEET_ORDER_KEY          "sheet-order-dialog"
 
 typedef struct {
@@ -1469,26 +1471,21 @@ dialog_sheet_order (WBCGtk *wbcg)
 	state->cancel_btn  = go_gtk_builder_get_widget (gui, "cancel_button");
 	state->advanced_check  = go_gtk_builder_get_widget (gui, "advanced-check");
 	state->initial_colors_set = FALSE;
-	state->image_padlock =  gtk_widget_render_icon (state->dialog,
+	state->image_padlock =  gtk_widget_render_icon_pixbuf (state->dialog,
                                              "Gnumeric_Protection_Yes",
-                                             GTK_ICON_SIZE_LARGE_TOOLBAR,
-                                             "Gnumeric-Sheet-Manager");
-	state->image_padlock_no =  gtk_widget_render_icon (state->dialog,
+                                             GTK_ICON_SIZE_LARGE_TOOLBAR);
+	state->image_padlock_no =  gtk_widget_render_icon_pixbuf (state->dialog,
                                              "Gnumeric_Protection_No",
-                                             GTK_ICON_SIZE_LARGE_TOOLBAR,
-                                             "Gnumeric-Sheet-Manager");
-	state->image_visible = gtk_widget_render_icon (state->dialog,
+                                             GTK_ICON_SIZE_LARGE_TOOLBAR);
+	state->image_visible = gtk_widget_render_icon_pixbuf (state->dialog,
                                              "Gnumeric_Visible",
-                                             GTK_ICON_SIZE_LARGE_TOOLBAR,
-                                             "Gnumeric-Sheet-Manager");
-	state->image_ltr =  gtk_widget_render_icon (state->dialog,
+                                             GTK_ICON_SIZE_LARGE_TOOLBAR);
+	state->image_ltr =  gtk_widget_render_icon_pixbuf (state->dialog,
                                              "gtk-go-forward",
-                                             GTK_ICON_SIZE_LARGE_TOOLBAR,
-                                             "Gnumeric-Sheet-Manager");
-	state->image_rtl =  gtk_widget_render_icon (state->dialog,
+                                             GTK_ICON_SIZE_LARGE_TOOLBAR);
+	state->image_rtl =  gtk_widget_render_icon_pixbuf (state->dialog,
                                              "gtk-go-back",
-                                             GTK_ICON_SIZE_LARGE_TOOLBAR,
-                                             "Gnumeric-Sheet-Manager");
+                                             GTK_ICON_SIZE_LARGE_TOOLBAR);
 	/* Listen for changes in the sheet order. */
 	state->sheet_order_changed_listener = g_signal_connect (G_OBJECT (wb),
 		"sheet_order_changed", G_CALLBACK (cb_sheet_order_changed),
diff --git a/src/dialogs/dialog-workbook-attr.c b/src/dialogs/dialog-workbook-attr.c
index a90d9d0..5f773a4 100644
--- a/src/dialogs/dialog-workbook-attr.c
+++ b/src/dialogs/dialog-workbook-attr.c
@@ -31,6 +31,7 @@
 #include <wbc-gtk.h>
 #include <workbook-priv.h>
 #include <gtk/gtk.h>
+#include <dead-kittens.h>
 
 #define WORKBOOK_ATTRIBUTE_KEY "workbook-attribute-dialog"
 
@@ -164,9 +165,8 @@ attr_dialog_add_item (AttrState *state, char const *page_name,
 	GdkPixbuf * icon = NULL;
 
 	if (icon_name != NULL)
-		icon = gtk_widget_render_icon (state->dialog, icon_name,
-					       GTK_ICON_SIZE_MENU,
-					       WORKBOOK_ATTRIBUTE_KEY);
+		icon = gtk_widget_render_icon_pixbuf (state->dialog, icon_name,
+					       GTK_ICON_SIZE_MENU);
 	if ((parent_path != NULL) && gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (state->store),
 									  &parent, parent_path))
 		gtk_tree_store_append (state->store, &iter, &parent);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]