summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-05-25 20:41:46 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-05-25 20:41:46 +0000
commit87684f9549a8ea4e2fa7b4c6ab69ded73b34b991 (patch)
tree6d8f80c793761bd48f38aadbf6dae7c7f45b75fb /gtk
parentb5db5d514d7ffd829c6e97a4630cf95d7b8fef3d (diff)
downloadgtk+-87684f9549a8ea4e2fa7b4c6ab69ded73b34b991.tar.gz
get sizes an icon set can render without falling back to missing image
2001-05-25 Havoc Pennington <hp@redhat.com> * gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon set can render without falling back to missing image icon * gtk/gtktextview.c (gtk_text_view_size_request): request full size of text, instead of random values * gtk/gtktreeview.c (gtk_tree_view_size_request): request full size of tree view, instead of random values * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): render fallback image in an appropriate size * gtk/gtkstock.h: Rename the stock items including _BUTTON_, etc. not to include that. i.e. s/GTK_STOCK_BUTTON_OK/GTK_STOCK_OK/ Throughout: fix GTK_STOCK_BUTTON_ instances * gtk/gtkstock.h, gtk/gtkstock.c, gtk/gtkiconfactory.h, gtk/gtkiconfactory.c, gtk/stock-icons/Makefile.am: Add a bunch of new stock items/icons * gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func): new function, convenience for inserting columns with a data func * gtk/gtkiconfactory.c: keep a list of all existing icon factories (_gtk_icon_factory_list_ids): use list of all factories to generate a list of all known IDs * gtk/gtkstock.c (gtk_stock_list_ids): replace gtk_stock_list_items() with a function that returns all IDs known including those for GtkIconFactory.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkbutton.c4
-rw-r--r--gtk/gtkcolorseldialog.c4
-rw-r--r--gtk/gtkdialog.c6
-rw-r--r--gtk/gtkfilesel.c4
-rw-r--r--gtk/gtkfontsel.c6
-rw-r--r--gtk/gtkiconfactory.c314
-rw-r--r--gtk/gtkiconfactory.h4
-rw-r--r--gtk/gtkmessagedialog.c14
-rw-r--r--gtk/gtkstock.c111
-rw-r--r--gtk/gtkstock.h72
-rw-r--r--gtk/gtktextview.c3
-rw-r--r--gtk/gtktreeview.c47
-rw-r--r--gtk/gtktreeview.h7
-rw-r--r--gtk/gtkwidget.c2
-rw-r--r--gtk/stock-icons/Makefile.am176
-rw-r--r--gtk/stock-icons/stock_add.pngbin0 -> 505 bytes
-rw-r--r--gtk/stock-icons/stock_add_24.pngbin0 -> 505 bytes
-rw-r--r--gtk/stock-icons/stock_align_center.pngbin0 -> 259 bytes
-rw-r--r--gtk/stock-icons/stock_align_center_24.pngbin0 -> 259 bytes
-rw-r--r--gtk/stock-icons/stock_align_justify.pngbin0 -> 283 bytes
-rw-r--r--gtk/stock-icons/stock_align_justify_24.pngbin0 -> 283 bytes
-rw-r--r--gtk/stock-icons/stock_align_left.pngbin0 -> 260 bytes
-rw-r--r--gtk/stock-icons/stock_align_left_24.pngbin0 -> 260 bytes
-rw-r--r--gtk/stock-icons/stock_align_right.pngbin0 -> 260 bytes
-rw-r--r--gtk/stock-icons/stock_align_right_24.pngbin0 -> 260 bytes
-rw-r--r--gtk/stock-icons/stock_bottom.pngbin0 -> 540 bytes
-rw-r--r--gtk/stock-icons/stock_bottom_24.pngbin0 -> 540 bytes
-rw-r--r--gtk/stock-icons/stock_cdrom.pngbin0 -> 806 bytes
-rw-r--r--gtk/stock-icons/stock_cdrom_24.pngbin0 -> 806 bytes
-rw-r--r--gtk/stock-icons/stock_clear.pngbin0 -> 791 bytes
-rw-r--r--gtk/stock-icons/stock_clear_24.pngbin0 -> 791 bytes
-rw-r--r--gtk/stock-icons/stock_colorselector.pngbin0 -> 592 bytes
-rw-r--r--gtk/stock-icons/stock_colorselector_24.pngbin0 -> 592 bytes
-rw-r--r--gtk/stock-icons/stock_convert.pngbin0 -> 619 bytes
-rw-r--r--gtk/stock-icons/stock_convert_24.pngbin0 -> 619 bytes
-rw-r--r--gtk/stock-icons/stock_copy.pngbin0 -> 603 bytes
-rw-r--r--gtk/stock-icons/stock_copy_24.pngbin0 -> 603 bytes
-rw-r--r--gtk/stock-icons/stock_cut.pngbin0 -> 291 bytes
-rw-r--r--gtk/stock-icons/stock_cut_24.pngbin0 -> 291 bytes
-rw-r--r--gtk/stock-icons/stock_down_arrow.pngbin0 -> 448 bytes
-rw-r--r--gtk/stock-icons/stock_down_arrow_24.pngbin0 -> 448 bytes
-rw-r--r--gtk/stock-icons/stock_exec.pngbin0 -> 672 bytes
-rw-r--r--gtk/stock-icons/stock_exec_24.pngbin0 -> 672 bytes
-rw-r--r--gtk/stock-icons/stock_first.pngbin0 -> 591 bytes
-rw-r--r--gtk/stock-icons/stock_first_24.pngbin0 -> 591 bytes
-rw-r--r--gtk/stock-icons/stock_font.pngbin0 -> 648 bytes
-rw-r--r--gtk/stock-icons/stock_font_24.pngbin0 -> 648 bytes
-rw-r--r--gtk/stock-icons/stock_home.pngbin0 -> 555 bytes
-rw-r--r--gtk/stock-icons/stock_home_24.pngbin0 -> 555 bytes
-rw-r--r--gtk/stock-icons/stock_index.pngbin0 -> 554 bytes
-rw-r--r--gtk/stock-icons/stock_index_24.pngbin0 -> 554 bytes
-rw-r--r--gtk/stock-icons/stock_jump_to.pngbin0 -> 611 bytes
-rw-r--r--gtk/stock-icons/stock_jump_to_24.pngbin0 -> 611 bytes
-rw-r--r--gtk/stock-icons/stock_last.pngbin0 -> 576 bytes
-rw-r--r--gtk/stock-icons/stock_last_24.pngbin0 -> 576 bytes
-rw-r--r--gtk/stock-icons/stock_left_arrow.pngbin0 -> 566 bytes
-rw-r--r--gtk/stock-icons/stock_left_arrow_24.pngbin0 -> 566 bytes
-rw-r--r--gtk/stock-icons/stock_menu_print_preview.pngbin0 -> 636 bytes
-rw-r--r--gtk/stock-icons/stock_menu_sort_descending.pngbin0 -> 302 bytes
-rw-r--r--gtk/stock-icons/stock_paste.pngbin0 -> 803 bytes
-rw-r--r--gtk/stock-icons/stock_paste_24.pngbin0 -> 803 bytes
-rw-r--r--gtk/stock-icons/stock_preferences.pngbin0 -> 764 bytes
-rw-r--r--gtk/stock-icons/stock_preferences_24.pngbin0 -> 764 bytes
-rw-r--r--gtk/stock-icons/stock_print.pngbin0 -> 965 bytes
-rw-r--r--gtk/stock-icons/stock_print_24.pngbin0 -> 965 bytes
-rw-r--r--gtk/stock-icons/stock_print_preview.pngbin0 -> 900 bytes
-rw-r--r--gtk/stock-icons/stock_print_preview_16.pngbin0 -> 636 bytes
-rw-r--r--gtk/stock-icons/stock_print_preview_24.pngbin0 -> 900 bytes
-rw-r--r--gtk/stock-icons/stock_properties.pngbin0 -> 932 bytes
-rw-r--r--gtk/stock-icons/stock_properties_24.pngbin0 -> 932 bytes
-rw-r--r--gtk/stock-icons/stock_redo.pngbin0 -> 354 bytes
-rw-r--r--gtk/stock-icons/stock_redo_24.pngbin0 -> 354 bytes
-rw-r--r--gtk/stock-icons/stock_refresh.pngbin0 -> 440 bytes
-rw-r--r--gtk/stock-icons/stock_refresh_24.pngbin0 -> 440 bytes
-rw-r--r--gtk/stock-icons/stock_remove.pngbin0 -> 531 bytes
-rw-r--r--gtk/stock-icons/stock_remove_24.pngbin0 -> 531 bytes
-rw-r--r--gtk/stock-icons/stock_revert.pngbin0 -> 879 bytes
-rw-r--r--gtk/stock-icons/stock_revert_24.pngbin0 -> 879 bytes
-rw-r--r--gtk/stock-icons/stock_right_arrow.pngbin0 -> 551 bytes
-rw-r--r--gtk/stock-icons/stock_right_arrow_24.pngbin0 -> 551 bytes
-rw-r--r--gtk/stock-icons/stock_save_as.pngbin0 -> 879 bytes
-rw-r--r--gtk/stock-icons/stock_save_as_24.pngbin0 -> 879 bytes
-rw-r--r--gtk/stock-icons/stock_search.pngbin0 -> 945 bytes
-rw-r--r--gtk/stock-icons/stock_search_24.pngbin0 -> 945 bytes
-rw-r--r--gtk/stock-icons/stock_search_replace.pngbin0 -> 1004 bytes
-rw-r--r--gtk/stock-icons/stock_search_replace_24.pngbin0 -> 1004 bytes
-rw-r--r--gtk/stock-icons/stock_sort_ascending.pngbin0 -> 353 bytes
-rw-r--r--gtk/stock-icons/stock_sort_ascending_24.pngbin0 -> 353 bytes
-rw-r--r--gtk/stock-icons/stock_sort_descending.pngbin0 -> 371 bytes
-rw-r--r--gtk/stock-icons/stock_sort_descending_16.pngbin0 -> 302 bytes
-rw-r--r--gtk/stock-icons/stock_sort_descending_24.pngbin0 -> 371 bytes
-rw-r--r--gtk/stock-icons/stock_spellcheck.pngbin0 -> 403 bytes
-rw-r--r--gtk/stock-icons/stock_spellcheck_24.pngbin0 -> 403 bytes
-rw-r--r--gtk/stock-icons/stock_stop.pngbin0 -> 850 bytes
-rw-r--r--gtk/stock-icons/stock_stop_24.pngbin0 -> 850 bytes
-rw-r--r--gtk/stock-icons/stock_text_bold.pngbin0 -> 278 bytes
-rw-r--r--gtk/stock-icons/stock_text_bold_24.pngbin0 -> 278 bytes
-rw-r--r--gtk/stock-icons/stock_text_italic.pngbin0 -> 277 bytes
-rw-r--r--gtk/stock-icons/stock_text_italic_24.pngbin0 -> 277 bytes
-rw-r--r--gtk/stock-icons/stock_text_strikeout.pngbin0 -> 289 bytes
-rw-r--r--gtk/stock-icons/stock_text_strikeout_24.pngbin0 -> 289 bytes
-rw-r--r--gtk/stock-icons/stock_text_strikethrough_24.pngbin0 -> 289 bytes
-rw-r--r--gtk/stock-icons/stock_text_underline.pngbin0 -> 270 bytes
-rw-r--r--gtk/stock-icons/stock_text_underline_24.pngbin0 -> 270 bytes
-rw-r--r--gtk/stock-icons/stock_top.pngbin0 -> 455 bytes
-rw-r--r--gtk/stock-icons/stock_top_24.pngbin0 -> 455 bytes
-rw-r--r--gtk/stock-icons/stock_trash.pngbin0 -> 704 bytes
-rw-r--r--gtk/stock-icons/stock_trash_24.pngbin0 -> 704 bytes
-rw-r--r--gtk/stock-icons/stock_undelete.pngbin0 -> 857 bytes
-rw-r--r--gtk/stock-icons/stock_undelete_24.pngbin0 -> 857 bytes
-rw-r--r--gtk/stock-icons/stock_undo.pngbin0 -> 351 bytes
-rw-r--r--gtk/stock-icons/stock_undo_24.pngbin0 -> 351 bytes
-rw-r--r--gtk/stock-icons/stock_up_arrow.pngbin0 -> 384 bytes
-rw-r--r--gtk/stock-icons/stock_up_arrow_24.pngbin0 -> 384 bytes
-rw-r--r--gtk/stock-icons/stock_zoom_1.pngbin0 -> 849 bytes
-rw-r--r--gtk/stock-icons/stock_zoom_1_24.pngbin0 -> 849 bytes
-rw-r--r--gtk/stock-icons/stock_zoom_fit.pngbin0 -> 857 bytes
-rw-r--r--gtk/stock-icons/stock_zoom_fit_24.pngbin0 -> 857 bytes
-rw-r--r--gtk/stock-icons/stock_zoom_in.pngbin0 -> 821 bytes
-rw-r--r--gtk/stock-icons/stock_zoom_in_24.pngbin0 -> 821 bytes
-rw-r--r--gtk/stock-icons/stock_zoom_out.pngbin0 -> 814 bytes
-rw-r--r--gtk/stock-icons/stock_zoom_out_24.pngbin0 -> 814 bytes
122 files changed, 665 insertions, 109 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 8cbe105569..69dc58390a 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -361,8 +361,8 @@ gtk_button_new_with_label (const gchar *label)
* @returns: a new #GtkButton
*
* Creates a new #GtkButton containing the image and text from a stock item.
- * Some stock ids have preprocessor macros like #GTK_STOCK_BUTTON_OK and
- * #GTK_STOCK_BUTTON_APPLY.
+ * Some stock ids have preprocessor macros like #GTK_STOCK_OK and
+ * #GTK_STOCK_APPLY.
**/
GtkWidget*
gtk_button_new_from_stock (const gchar *stock_id)
diff --git a/gtk/gtkcolorseldialog.c b/gtk/gtkcolorseldialog.c
index a80f28e717..7dd1e97e6e 100644
--- a/gtk/gtkcolorseldialog.c
+++ b/gtk/gtkcolorseldialog.c
@@ -97,13 +97,13 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
action_area_button_box = GTK_DIALOG (colorseldiag)->action_area;
colorseldiag->ok_button = gtk_dialog_add_button (GTK_DIALOG (colorseldiag),
- GTK_STOCK_BUTTON_OK,
+ GTK_STOCK_OK,
GTK_RESPONSE_OK);
gtk_widget_grab_default (colorseldiag->ok_button);
colorseldiag->cancel_button = gtk_dialog_add_button (GTK_DIALOG (colorseldiag),
- GTK_STOCK_BUTTON_CANCEL,
+ GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
colorseldiag->help_button = gtk_dialog_add_button (GTK_DIALOG (colorseldiag),
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index c0f0ea1181..9e7e2ae68c 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -359,7 +359,7 @@ gtk_dialog_new_empty (const gchar *title,
* (GTK_DIALOG_DESTROY_WITH_PARENT). After @flags, button
* text/response ID pairs should be listed, with a NULL pointer ending
* the list. Button text can be either a stock ID such as
- * GTK_STOCK_BUTTON_OK, or some arbitrary text. A response ID can be
+ * #GTK_STOCK_OK, or some arbitrary text. A response ID can be
* any positive number, or one of the values in the #GtkResponseType
* enumeration. If the user clicks one of these dialog buttons,
* #GtkDialog will emit the "response" signal with the corresponding
@@ -375,9 +375,9 @@ gtk_dialog_new_empty (const gchar *title,
* GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog",
* main_app_window,
* GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- * GTK_STOCK_BUTTON_OK,
+ * GTK_STOCK_OK,
* GTK_RESPONSE_ACCEPT,
- * GTK_STOCK_BUTTON_CANCEL,
+ * GTK_STOCK_CANCEL,
* GTK_RESPONSE_REJECT,
* NULL);
* </programlisting>
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index 6da7f1eb23..4036bf4519 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -678,14 +678,14 @@ gtk_file_selection_init (GtkFileSelection *filesel)
/* The OK button */
filesel->ok_button = gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_OK,
+ GTK_STOCK_OK,
GTK_RESPONSE_OK);
gtk_widget_grab_default (filesel->ok_button);
/* The Cancel button */
filesel->cancel_button = gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_CANCEL,
+ GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
/* The selection entry widget */
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index c3e169df91..00ea3e9900 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -987,18 +987,18 @@ gtk_font_selection_dialog_init (GtkFontSelectionDialog *fontseldiag)
fontseldiag->action_area = dialog->action_area;
fontseldiag->ok_button = gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_OK,
+ GTK_STOCK_OK,
GTK_RESPONSE_OK);
gtk_widget_grab_default (fontseldiag->ok_button);
fontseldiag->apply_button = gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_APPLY,
+ GTK_STOCK_APPLY,
GTK_RESPONSE_APPLY);
gtk_widget_hide (fontseldiag->apply_button);
fontseldiag->cancel_button = gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_CANCEL,
+ GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
gtk_window_set_title (GTK_WINDOW (fontseldiag),
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index 7a2ddbca46..117faeaace 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -33,6 +33,8 @@
#include <ctype.h>
#include <string.h>
+static GSList *all_icon_factories = NULL;
+
struct _GtkIconSource
{
/* Either filename or pixbuf can be NULL. If both are non-NULL,
@@ -97,6 +99,7 @@ static void
gtk_icon_factory_init (GtkIconFactory *factory)
{
factory->icons = g_hash_table_new (g_str_hash, g_str_equal);
+ all_icon_factories = g_slist_prepend (all_icon_factories, factory);
}
static void
@@ -121,6 +124,8 @@ gtk_icon_factory_finalize (GObject *object)
{
GtkIconFactory *factory = GTK_ICON_FACTORY (object);
+ all_icon_factories = g_slist_remove (all_icon_factories, factory);
+
g_hash_table_foreach (factory->icons, free_icon_set, NULL);
g_hash_table_destroy (factory->icons);
@@ -335,6 +340,42 @@ sized_icon_set_from_inline (const guchar *inline_data,
return set;
}
+
+static GtkIconSet *
+sized_with_fallback_icon_set_from_inline (const guchar *fallback_data,
+ const guchar *inline_data,
+ GtkIconSize size)
+{
+ GtkIconSet *set;
+
+ GtkIconSource source = { NULL, NULL, 0, 0, 0,
+ TRUE, TRUE, FALSE };
+
+ source.size = size;
+
+ set = gtk_icon_set_new ();
+
+ source.pixbuf = gdk_pixbuf_new_from_inline (inline_data, FALSE, -1, NULL);
+
+ g_assert (source.pixbuf);
+
+ gtk_icon_set_add_source (set, &source);
+
+ g_object_unref (G_OBJECT (source.pixbuf));
+
+ source.any_size = TRUE;
+
+ source.pixbuf = gdk_pixbuf_new_from_inline (fallback_data, FALSE, -1, NULL);
+
+ g_assert (source.pixbuf);
+
+ gtk_icon_set_add_source (set, &source);
+
+ g_object_unref (G_OBJECT (source.pixbuf));
+
+ return set;
+}
+
static GtkIconSet *
unsized_icon_set_from_inline (const guchar *inline_data)
{
@@ -373,6 +414,22 @@ add_sized (GtkIconFactory *factory,
}
static void
+add_sized_with_fallback (GtkIconFactory *factory,
+ const guchar *fallback_data,
+ const guchar *inline_data,
+ GtkIconSize size,
+ const gchar *stock_id)
+{
+ GtkIconSet *set;
+
+ set = sized_with_fallback_icon_set_from_inline (fallback_data, inline_data, size);
+
+ gtk_icon_factory_add (factory, stock_id, set);
+
+ gtk_icon_set_unref (set);
+}
+
+static void
add_unsized (GtkIconFactory *factory,
const guchar *inline_data,
const gchar *stock_id)
@@ -391,26 +448,98 @@ get_default_icons (GtkIconFactory *factory)
{
/* KEEP IN SYNC with gtkstock.c */
+ add_unsized (factory, MISSING_IMAGE_INLINE, GTK_STOCK_MISSING_IMAGE);
+
add_sized (factory, dialog_error, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_ERROR);
add_sized (factory, dialog_info, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_INFO);
add_sized (factory, dialog_question, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_QUESTION);
add_sized (factory, dialog_warning, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_WARNING);
-
- add_sized (factory, stock_button_apply, GTK_ICON_SIZE_BUTTON, GTK_STOCK_BUTTON_APPLY);
- add_sized (factory, stock_button_ok, GTK_ICON_SIZE_BUTTON, GTK_STOCK_BUTTON_OK);
- add_sized (factory, stock_button_cancel, GTK_ICON_SIZE_BUTTON, GTK_STOCK_BUTTON_CANCEL);
- add_sized (factory, stock_button_close, GTK_ICON_SIZE_BUTTON, GTK_STOCK_BUTTON_CLOSE);
- add_sized (factory, stock_button_yes, GTK_ICON_SIZE_BUTTON, GTK_STOCK_BUTTON_YES);
- add_sized (factory, stock_button_no, GTK_ICON_SIZE_BUTTON, GTK_STOCK_BUTTON_NO);
-
- add_unsized (factory, stock_close, GTK_STOCK_CLOSE);
+
+ /* Only have button sizes */
+ add_sized (factory, stock_button_apply, GTK_ICON_SIZE_BUTTON, GTK_STOCK_APPLY);
+ add_sized (factory, stock_button_cancel, GTK_ICON_SIZE_BUTTON, GTK_STOCK_CANCEL);
+ add_sized (factory, stock_button_no, GTK_ICON_SIZE_BUTTON, GTK_STOCK_NO);
+ add_sized (factory, stock_button_ok, GTK_ICON_SIZE_BUTTON, GTK_STOCK_OK);
+ add_sized (factory, stock_button_yes, GTK_ICON_SIZE_BUTTON, GTK_STOCK_YES);
+
+ /* Generic + button sizes */
+ add_sized_with_fallback (factory,
+ stock_close,
+ stock_button_close,
+ GTK_ICON_SIZE_BUTTON,
+ GTK_STOCK_CLOSE);
+
+ /* Generic + menu sizes */
+
+ add_sized_with_fallback (factory,
+ stock_print_preview,
+ stock_menu_print_preview,
+ GTK_ICON_SIZE_MENU,
+ GTK_STOCK_PRINT_PREVIEW);
+
+ add_sized_with_fallback (factory,
+ stock_sort_descending,
+ stock_menu_sort_descending,
+ GTK_ICON_SIZE_MENU,
+ GTK_STOCK_SORT_DESCENDING);
+
+ /* Generic size only */
+
+ add_unsized (factory, stock_add, GTK_STOCK_ADD);
+ add_unsized (factory, stock_align_center, GTK_STOCK_JUSTIFY_CENTER);
+ add_unsized (factory, stock_align_justify, GTK_STOCK_JUSTIFY_FILL);
+ add_unsized (factory, stock_align_left, GTK_STOCK_JUSTIFY_LEFT);
+ add_unsized (factory, stock_align_right, GTK_STOCK_JUSTIFY_RIGHT);
+ add_unsized (factory, stock_bottom, GTK_STOCK_GOTO_BOTTOM);
+ add_unsized (factory, stock_cdrom, GTK_STOCK_CDROM);
+ add_unsized (factory, stock_clear, GTK_STOCK_CLEAR);
+ add_unsized (factory, stock_colorselector, GTK_STOCK_SELECT_COLOR);
+ add_unsized (factory, stock_convert, GTK_STOCK_CONVERT);
+ add_unsized (factory, stock_copy, GTK_STOCK_COPY);
+ add_unsized (factory, stock_cut, GTK_STOCK_CUT);
+ add_unsized (factory, stock_down_arrow, GTK_STOCK_GO_DOWN);
+ add_unsized (factory, stock_exec, GTK_STOCK_EXECUTE);
add_unsized (factory, stock_exit, GTK_STOCK_QUIT);
+ add_unsized (factory, stock_first, GTK_STOCK_GOTO_FIRST);
+ add_unsized (factory, stock_font, GTK_STOCK_SELECT_FONT);
add_unsized (factory, stock_help, GTK_STOCK_HELP);
+ add_unsized (factory, stock_home, GTK_STOCK_HOME);
+ add_unsized (factory, stock_index, GTK_STOCK_INDEX);
+ add_unsized (factory, stock_jump_to, GTK_STOCK_JUMP_TO);
+ add_unsized (factory, stock_last, GTK_STOCK_GOTO_LAST);
+ add_unsized (factory, stock_left_arrow, GTK_STOCK_GO_BACK);
add_unsized (factory, stock_new, GTK_STOCK_NEW);
add_unsized (factory, stock_open, GTK_STOCK_OPEN);
+ add_unsized (factory, stock_paste, GTK_STOCK_PASTE);
+ add_unsized (factory, stock_preferences, GTK_STOCK_PREFERENCES);
+ add_unsized (factory, stock_print, GTK_STOCK_PRINT);
+ add_unsized (factory, stock_properties, GTK_STOCK_PROPERTIES);
+ add_unsized (factory, stock_redo, GTK_STOCK_REDO);
+ add_unsized (factory, stock_refresh, GTK_STOCK_REFRESH);
+ add_unsized (factory, stock_remove, GTK_STOCK_REMOVE);
+ add_unsized (factory, stock_revert, GTK_STOCK_REVERT_TO_SAVED);
+ add_unsized (factory, stock_right_arrow, GTK_STOCK_GO_FORWARD);
+ add_unsized (factory, stock_save, GTK_STOCK_FLOPPY);
add_unsized (factory, stock_save, GTK_STOCK_SAVE);
-
- add_unsized (factory, MISSING_IMAGE_INLINE, GTK_STOCK_MISSING_IMAGE);
+ add_unsized (factory, stock_save_as, GTK_STOCK_SAVE_AS);
+ add_unsized (factory, stock_search, GTK_STOCK_FIND);
+ add_unsized (factory, stock_search_replace, GTK_STOCK_FIND_AND_REPLACE);
+ add_unsized (factory, stock_sort_ascending, GTK_STOCK_SORT_ASCENDING);
+ add_unsized (factory, stock_spellcheck, GTK_STOCK_SPELL_CHECK);
+ add_unsized (factory, stock_stop, GTK_STOCK_STOP);
+ add_unsized (factory, stock_text_bold, GTK_STOCK_BOLD);
+ add_unsized (factory, stock_text_italic, GTK_STOCK_ITALIC);
+ add_unsized (factory, stock_text_strikeout, GTK_STOCK_STRIKETHROUGH);
+ add_unsized (factory, stock_text_underline, GTK_STOCK_UNDERLINE);
+ add_unsized (factory, stock_top, GTK_STOCK_GOTO_TOP);
+ add_unsized (factory, stock_trash, GTK_STOCK_DELETE);
+ add_unsized (factory, stock_undelete, GTK_STOCK_UNDELETE);
+ add_unsized (factory, stock_undo, GTK_STOCK_UNDO);
+ add_unsized (factory, stock_up_arrow, GTK_STOCK_GO_UP);
+ add_unsized (factory, stock_zoom_1, GTK_STOCK_ZOOM_100);
+ add_unsized (factory, stock_zoom_fit, GTK_STOCK_ZOOM_FIT);
+ add_unsized (factory, stock_zoom_in, GTK_STOCK_ZOOM_IN);
+ add_unsized (factory, stock_zoom_out, GTK_STOCK_ZOOM_OUT);
}
/* Sizes */
@@ -929,17 +1058,26 @@ find_and_prep_icon_source (GtkIconSet *icon_set,
}
static GdkPixbuf*
-get_fallback_image (void)
+render_fallback_image (GtkStyle *style,
+ GtkTextDirection direction,
+ GtkStateType state,
+ GtkIconSize size,
+ GtkWidget *widget,
+ const char *detail)
{
/* This icon can be used for any direction/state/size */
- static GdkPixbuf *pixbuf = NULL;
-
- if (pixbuf == NULL)
- pixbuf = gdk_pixbuf_new_from_inline (MISSING_IMAGE_INLINE, FALSE, -1, NULL);
- else
- g_object_ref (G_OBJECT (pixbuf));
+ static GtkIconSource fallback_source = { NULL, NULL, 0, 0, 0, TRUE, TRUE, TRUE };
- return pixbuf;
+ if (fallback_source.pixbuf == NULL)
+ fallback_source.pixbuf = gdk_pixbuf_new_from_inline (MISSING_IMAGE_INLINE, FALSE, -1, NULL);
+
+ return gtk_style_render_icon (style,
+ &fallback_source,
+ direction,
+ state,
+ size,
+ widget,
+ detail);
}
/**
@@ -977,7 +1115,7 @@ gtk_icon_set_render_icon (GtkIconSet *icon_set,
g_return_val_if_fail (GTK_IS_STYLE (style), NULL);
if (icon_set->sources == NULL)
- return get_fallback_image ();
+ return render_fallback_image (style, direction, state, size, widget, detail);
icon = find_in_cache (icon_set, style, direction,
state, size);
@@ -992,7 +1130,7 @@ gtk_icon_set_render_icon (GtkIconSet *icon_set,
source = find_and_prep_icon_source (icon_set, direction, state, size);
if (source == NULL)
- return get_fallback_image ();
+ return render_fallback_image (style, direction, state, size, widget, detail);
g_assert (source->pixbuf != NULL);
@@ -1007,7 +1145,7 @@ gtk_icon_set_render_icon (GtkIconSet *icon_set,
if (icon == NULL)
{
g_warning ("Theme engine failed to render icon");
- return get_fallback_image ();
+ return NULL;
}
add_to_cache (icon_set, style, direction, state, size, icon);
@@ -1094,6 +1232,86 @@ gtk_icon_set_add_source (GtkIconSet *icon_set,
}
/**
+ * gtk_icon_set_get_sizes:
+ * @icon_set: a #GtkIconSet
+ * @sizes: return location for array of sizes
+ * @n_sizes: location to store number of elements in returned array
+ *
+ * Obtains a list of icon sizes this icon set can render. The returned
+ * array must be freed with g_free().
+ *
+ **/
+void
+gtk_icon_set_get_sizes (GtkIconSet *icon_set,
+ GtkIconSize **sizes,
+ gint *n_sizes)
+{
+ GSList *tmp_list;
+ gboolean all_sizes = FALSE;
+ GSList *specifics = NULL;
+
+ g_return_if_fail (icon_set != NULL);
+ g_return_if_fail (sizes != NULL);
+ g_return_if_fail (n_sizes != NULL);
+
+ tmp_list = icon_set->sources;
+ while (tmp_list != NULL)
+ {
+ GtkIconSource *source;
+
+ source = tmp_list->data;
+
+ if (source->any_size)
+ {
+ all_sizes = TRUE;
+ break;
+ }
+ else
+ specifics = g_slist_prepend (specifics, GINT_TO_POINTER (source->size));
+
+ tmp_list = g_slist_next (tmp_list);
+ }
+
+ if (all_sizes)
+ {
+ /* Need to find out what sizes exist */
+ gint i;
+
+ init_icon_sizes ();
+
+ *sizes = g_new (GtkIconSize, icon_sizes_used);
+ *n_sizes = icon_sizes_used;
+
+ i = 0;
+ while (i < icon_sizes_used)
+ {
+ (*sizes)[i] = icon_sizes[i].size;
+ ++i;
+ }
+ }
+ else
+ {
+ gint i;
+
+ *n_sizes = g_slist_length (specifics);
+ *sizes = g_new (GtkIconSize, *n_sizes);
+
+ i = 0;
+ tmp_list = specifics;
+ while (tmp_list != NULL)
+ {
+ (*sizes)[i] = GPOINTER_TO_INT (tmp_list->data);
+
+ ++i;
+ tmp_list = g_slist_next (tmp_list);
+ }
+ }
+
+ g_slist_free (specifics);
+}
+
+
+/**
* gtk_icon_source_new:
*
* Creates a new #GtkIconSource. A #GtkIconSource contains a #GdkPixbuf (or
@@ -1803,3 +2021,55 @@ _gtk_icon_set_invalidate_caches (void)
{
++cache_serial;
}
+
+static void
+listify_foreach (gpointer key, gpointer value, gpointer data)
+{
+ GSList **list = data;
+
+ *list = g_slist_prepend (*list, key);
+}
+
+static GSList *
+g_hash_table_get_keys (GHashTable *table)
+{
+ GSList *list = NULL;
+
+ g_hash_table_foreach (table, listify_foreach, &list);
+
+ return list;
+}
+
+/**
+ * _gtk_icon_factory_list_ids:
+ *
+ * Gets all known IDs stored in an existing icon factory.
+ * The strings in the returned list aren't copied.
+ * The list itself should be freed.
+ *
+ * Return value: List of ids in icon factories
+ **/
+GSList*
+_gtk_icon_factory_list_ids (void)
+{
+ GSList *tmp_list;
+ GSList *ids;
+
+ ids = NULL;
+
+ tmp_list = all_icon_factories;
+ while (tmp_list != NULL)
+ {
+ GSList *these_ids;
+
+ GtkIconFactory *factory = GTK_ICON_FACTORY (tmp_list->data);
+
+ these_ids = g_hash_table_get_keys (factory->icons);
+
+ ids = g_slist_concat (ids, these_ids);
+
+ tmp_list = g_slist_next (tmp_list);
+ }
+
+ return ids;
+}
diff --git a/gtk/gtkiconfactory.h b/gtk/gtkiconfactory.h
index c4b755af7c..33c965cfcc 100644
--- a/gtk/gtkiconfactory.h
+++ b/gtk/gtkiconfactory.h
@@ -117,6 +117,9 @@ GdkPixbuf* gtk_icon_set_render_icon (GtkIconSet *icon_set,
void gtk_icon_set_add_source (GtkIconSet *icon_set,
const GtkIconSource *source);
+void gtk_icon_set_get_sizes (GtkIconSet *icon_set,
+ GtkIconSize **sizes,
+ gint *n_sizes);
GtkIconSource* gtk_icon_source_new (void);
GtkIconSource* gtk_icon_source_copy (const GtkIconSource *source);
@@ -152,6 +155,7 @@ GtkIconSize gtk_icon_source_get_size (const GtkIconSource *
/* ignore this */
void _gtk_icon_set_invalidate_caches (void);
+GSList* _gtk_icon_factory_list_ids (void);
#ifdef __cplusplus
}
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index f37c96e973..41d135f756 100644
--- a/gtk/gtkmessagedialog.c
+++ b/gtk/gtkmessagedialog.c
@@ -225,37 +225,37 @@ gtk_message_dialog_new (GtkWindow *parent,
case GTK_BUTTONS_OK:
gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_OK,
+ GTK_STOCK_OK,
GTK_RESPONSE_OK);
break;
case GTK_BUTTONS_CLOSE:
gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_CLOSE,
+ GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE);
break;
case GTK_BUTTONS_CANCEL:
gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_CANCEL,
+ GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
break;
case GTK_BUTTONS_YES_NO:
gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_YES,
+ GTK_STOCK_YES,
GTK_RESPONSE_YES);
gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_NO,
+ GTK_STOCK_NO,
GTK_RESPONSE_NO);
break;
case GTK_BUTTONS_OK_CANCEL:
gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_OK,
+ GTK_STOCK_OK,
GTK_RESPONSE_OK);
gtk_dialog_add_button (dialog,
- GTK_STOCK_BUTTON_CANCEL,
+ GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
break;
diff --git a/gtk/gtkstock.c b/gtk/gtkstock.c
index 5f3349dfb3..02613c94c5 100644
--- a/gtk/gtkstock.c
+++ b/gtk/gtkstock.c
@@ -24,7 +24,10 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+#include <string.h>
+
#include "gtkstock.h"
+#include "gtkiconfactory.h"
#include "gtkintl.h"
#include <gdk/gdkkeysyms.h>
@@ -144,11 +147,11 @@ listify_foreach (gpointer key, gpointer value, gpointer data)
{
GSList **list = data;
- *list = g_slist_prepend (*list, value);
+ *list = g_slist_prepend (*list, key);
}
static GSList *
-g_hash_table_get_values (GHashTable *table)
+g_hash_table_get_keys (GHashTable *table)
{
GSList *list = NULL;
@@ -158,20 +161,56 @@ g_hash_table_get_values (GHashTable *table)
}
/**
- * gtk_stock_list_items:
+ * gtk_stock_list_ids:
*
- * Retrieves a list of all known #GtkStockItem. The items are not copied;
- * they should not be freed. However, the list itself must be freed
- * with g_slist_free().
+ * Retrieves a list of all known stock IDs added to a #GtkIconFactory
+ * or registered with gtk_stock_add(). The list must be freed with g_slist_free(),
+ * and each string in the list must be freed with g_free().
*
- * Return value: a list of registered stock items
+ * Return value: a list of known stock IDs
**/
-GSList *
-gtk_stock_list_items (void)
+GSList*
+gtk_stock_list_ids (void)
{
+ GSList *ids;
+ GSList *icon_ids;
+ GSList *retval;
+ GSList *tmp_list;
+ const gchar *last_id;
+
init_stock_hash ();
- return g_hash_table_get_values (stock_hash);
+ ids = g_hash_table_get_keys (stock_hash);
+ icon_ids = _gtk_icon_factory_list_ids ();
+ ids = g_slist_concat (ids, icon_ids);
+
+ ids = g_slist_sort (ids, (GCompareFunc)strcmp);
+
+ last_id = NULL;
+ retval = NULL;
+ tmp_list = ids;
+ while (tmp_list != NULL)
+ {
+ GSList *next;
+
+ next = g_slist_next (tmp_list);
+
+ if (last_id && strcmp (tmp_list->data, last_id) == 0)
+ {
+ /* duplicate, ignore */
+ }
+ else
+ {
+ retval = g_slist_prepend (retval, g_strdup (tmp_list->data));
+ last_id = tmp_list->data;
+ }
+
+ g_slist_free_1 (tmp_list);
+
+ tmp_list = next;
+ }
+
+ return retval;
}
/**
@@ -223,26 +262,58 @@ gtk_stock_item_free (GtkStockItem *item)
static GtkStockItem builtin_items [] =
{
- /* KEEP IN SYNC with gtkiconfactory.c stock icons */
+ /* KEEP IN SYNC with gtkiconfactory.c stock icons, when appropriate */
{ GTK_STOCK_DIALOG_INFO, N_("Information"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_DIALOG_WARNING, N_("Warning"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_DIALOG_ERROR, N_("Error"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_DIALOG_QUESTION, N_("Question"), 0, 0, GETTEXT_PACKAGE },
- { GTK_STOCK_BUTTON_APPLY, N_("_Apply"), 0, 0, GETTEXT_PACKAGE },
- { GTK_STOCK_BUTTON_OK, N_("_OK"), 0, 0, GETTEXT_PACKAGE },
- { GTK_STOCK_BUTTON_CANCEL, N_("_Cancel"), 0, 0, GETTEXT_PACKAGE },
- { GTK_STOCK_BUTTON_CLOSE, N_("_Close"), 0, 0, GETTEXT_PACKAGE },
- { GTK_STOCK_BUTTON_YES, N_("_Yes"), 0, 0, GETTEXT_PACKAGE },
- { GTK_STOCK_BUTTON_NO, N_("_No"), 0, 0, GETTEXT_PACKAGE },
-
+ /* FIXME these need accelerators when appropriate, and
+ * need the mnemonics to be rationalized
+ */
+ { GTK_STOCK_APPLY, N_("_Apply"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_BOLD, N_("_Bold"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_CANCEL, N_("_Cancel"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_CLEAR, N_("_Clear"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_CLOSE, N_("_Close"), GDK_CONTROL_MASK, 'w', GETTEXT_PACKAGE },
- { GTK_STOCK_QUIT, N_("_Quit"), GDK_CONTROL_MASK, 'q', GETTEXT_PACKAGE },
+ { GTK_STOCK_COPY, N_("_Copy"), GDK_CONTROL_MASK, 'c', GETTEXT_PACKAGE },
+ { GTK_STOCK_CUT, N_("C_ut"), GDK_CONTROL_MASK, 'x', GETTEXT_PACKAGE },
+ { GTK_STOCK_FIND, N_("_Find"), GDK_CONTROL_MASK, 'f', GETTEXT_PACKAGE },
+ { GTK_STOCK_FIND_AND_REPLACE, N_("Find and _Replace"), GDK_CONTROL_MASK, 'r', GETTEXT_PACKAGE },
+ { GTK_STOCK_GO_BACK, N_("_Back"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_GO_FORWARD, N_("_Forward"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_HELP, N_("_Help"), GDK_CONTROL_MASK, 'h', GETTEXT_PACKAGE },
+ { GTK_STOCK_HOME, N_("_Home"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_ITALIC, N_("_Italic"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_JUSTIFY_CENTER, N_("_Center"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_JUSTIFY_FILL, N_("_Fill"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_JUSTIFY_LEFT, N_("_Left"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_JUSTIFY_RIGHT, N_("_Right"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_NEW, N_("_New"), GDK_CONTROL_MASK, 'n', GETTEXT_PACKAGE },
+ { GTK_STOCK_NO, N_("_No"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_OK, N_("_OK"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_OPEN, N_("_Open"), GDK_CONTROL_MASK, 'o', GETTEXT_PACKAGE },
- { GTK_STOCK_SAVE, N_("_Save"), GDK_CONTROL_MASK, 's', GETTEXT_PACKAGE }
+ { GTK_STOCK_PASTE, N_("_Paste"), GDK_CONTROL_MASK, 'v', GETTEXT_PACKAGE },
+ { GTK_STOCK_PREFERENCES, N_("_Preferences"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_PRINT, N_("_Print"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_PROPERTIES, N_("_Properties"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_QUIT, N_("_Quit"), GDK_CONTROL_MASK, 'q', GETTEXT_PACKAGE },
+ { GTK_STOCK_REDO, N_("_Redo"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_REVERT_TO_SAVED, N_("_Revert"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_SAVE, N_("_Save"), GDK_CONTROL_MASK, 's', GETTEXT_PACKAGE },
+ { GTK_STOCK_SAVE_AS, N_("Save _As"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_SPELL_CHECK, N_("_Spell Check"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_STOP, N_("_Stop"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_STRIKETHROUGH, N_("_Strikethrough"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_UNDERLINE, N_("_Underline"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_UNDO, N_("_Undo"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_YES, N_("_Yes"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_ZOOM_100, N_("Zoom _100%"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_ZOOM_FIT, N_("Zoom to _Fit"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_ZOOM_IN, N_("Zoom _In"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), 0, 0, GETTEXT_PACKAGE }
};
static void
diff --git a/gtk/gtkstock.h b/gtk/gtkstock.h
index a613446168..fc8b40da66 100644
--- a/gtk/gtkstock.h
+++ b/gtk/gtkstock.h
@@ -52,16 +52,16 @@ void gtk_stock_add_static (const GtkStockItem *items,
gboolean gtk_stock_lookup (const gchar *stock_id,
GtkStockItem *item);
-/* Should free the list, but DO NOT modify the items in the list.
+/* Should free the list (and free each string in it also).
* This function is only useful for GUI builders and such.
*/
-GSList* gtk_stock_list_items (void);
+GSList* gtk_stock_list_ids (void);
GtkStockItem *gtk_stock_item_copy (const GtkStockItem *item);
void gtk_stock_item_free (GtkStockItem *item);
-/* Stock IDs */
+/* Stock IDs (not all are stock items; some are images only) */
#define GTK_STOCK_MISSING_IMAGE "gtk-missing-image"
#define GTK_STOCK_DIALOG_INFO "gtk-dialog-info"
@@ -69,19 +69,69 @@ void gtk_stock_item_free (GtkStockItem *item);
#define GTK_STOCK_DIALOG_ERROR "gtk-dialog-error"
#define GTK_STOCK_DIALOG_QUESTION "gtk-dialog-question"
-#define GTK_STOCK_BUTTON_APPLY "gtk-button-apply"
-#define GTK_STOCK_BUTTON_OK "gtk-button-ok"
-#define GTK_STOCK_BUTTON_CANCEL "gtk-button-cancel"
-#define GTK_STOCK_BUTTON_CLOSE "gtk-button-close"
-#define GTK_STOCK_BUTTON_YES "gtk-button-yes"
-#define GTK_STOCK_BUTTON_NO "gtk-button-no"
-
+#define GTK_STOCK_ADD "gtk-add"
+#define GTK_STOCK_APPLY "gtk-apply"
+#define GTK_STOCK_BOLD "gtk-bold"
+#define GTK_STOCK_CANCEL "gtk-cancel"
+#define GTK_STOCK_CDROM "gtk-cdrom"
+#define GTK_STOCK_CLEAR "gtk-clear"
#define GTK_STOCK_CLOSE "gtk-close"
-#define GTK_STOCK_QUIT "gtk-quit"
+#define GTK_STOCK_CONVERT "gtk-convert"
+#define GTK_STOCK_COPY "gtk-copy"
+#define GTK_STOCK_CUT "gtk-cut"
+#define GTK_STOCK_DELETE "gtk-delete"
+#define GTK_STOCK_EXECUTE "gtk-execute"
+#define GTK_STOCK_FIND "gtk-find"
+#define GTK_STOCK_FIND_AND_REPLACE "gtk-find-and-replace"
+#define GTK_STOCK_FLOPPY "gtk-floppy"
+#define GTK_STOCK_GOTO_BOTTOM "gtk-goto-bottom"
+#define GTK_STOCK_GOTO_FIRST "gtk-goto-first"
+#define GTK_STOCK_GOTO_LAST "gtk-goto-last"
+#define GTK_STOCK_GOTO_TOP "gtk-goto-top"
+#define GTK_STOCK_GO_BACK "gtk-go-back"
+#define GTK_STOCK_GO_DOWN "gtk-go-down"
+#define GTK_STOCK_GO_FORWARD "gtk-go-forward"
+#define GTK_STOCK_GO_UP "gtk-up"
#define GTK_STOCK_HELP "gtk-help"
+#define GTK_STOCK_HOME "gtk-home"
+#define GTK_STOCK_INDEX "gtk-index"
+#define GTK_STOCK_ITALIC "gtk-italic"
+#define GTK_STOCK_JUMP_TO "gtk-jump-to"
+#define GTK_STOCK_JUSTIFY_CENTER "gtk-justify-center"
+#define GTK_STOCK_JUSTIFY_FILL "gtk-justify-fill"
+#define GTK_STOCK_JUSTIFY_LEFT "gtk-justify-left"
+#define GTK_STOCK_JUSTIFY_RIGHT "gtk-justify-right"
#define GTK_STOCK_NEW "gtk-new"
+#define GTK_STOCK_NO "gtk-no"
+#define GTK_STOCK_OK "gtk-ok"
#define GTK_STOCK_OPEN "gtk-open"
+#define GTK_STOCK_PASTE "gtk-paste"
+#define GTK_STOCK_PREFERENCES "gtk-preferences"
+#define GTK_STOCK_PRINT "gtk-print"
+#define GTK_STOCK_PRINT_PREVIEW "gtk-print-preview"
+#define GTK_STOCK_PROPERTIES "gtk-properties"
+#define GTK_STOCK_QUIT "gtk-quit"
+#define GTK_STOCK_REDO "gtk-redo"
+#define GTK_STOCK_REFRESH "gtk-refresh"
+#define GTK_STOCK_REMOVE "gtk-remove"
+#define GTK_STOCK_REVERT_TO_SAVED "gtk-revert-to-saved"
#define GTK_STOCK_SAVE "gtk-save"
+#define GTK_STOCK_SAVE_AS "gtk-save-as"
+#define GTK_STOCK_SELECT_COLOR "gtk-select-color"
+#define GTK_STOCK_SELECT_FONT "gtk-select-font"
+#define GTK_STOCK_SORT_ASCENDING "gtk-sort-ascending"
+#define GTK_STOCK_SORT_DESCENDING "gtk-sort-descending"
+#define GTK_STOCK_SPELL_CHECK "gtk-spell-check"
+#define GTK_STOCK_STOP "gtk-stop"
+#define GTK_STOCK_STRIKETHROUGH "gtk-strikethrough"
+#define GTK_STOCK_UNDELETE "gtk-undelete"
+#define GTK_STOCK_UNDERLINE "gtk-underline"
+#define GTK_STOCK_UNDO "gtk-undo"
+#define GTK_STOCK_YES "gtk-yes"
+#define GTK_STOCK_ZOOM_100 "gtk-zoom-100"
+#define GTK_STOCK_ZOOM_FIT "gtk-zoom-fit"
+#define GTK_STOCK_ZOOM_IN "gtk-zoom-in"
+#define GTK_STOCK_ZOOM_OUT "gtk-zoom-out"
#ifdef __cplusplus
}
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index d0bca99e89..6641f75837 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -2283,6 +2283,9 @@ gtk_text_view_size_request (GtkWidget *widget,
text_view = GTK_TEXT_VIEW (widget);
+ text_view->text_window->requisition.width = text_view->layout->width;
+ text_view->text_window->requisition.height = text_view->layout->height;
+
requisition->width = text_view->text_window->requisition.width + FOCUS_EDGE_WIDTH * 2;
requisition->height = text_view->text_window->requisition.height + FOCUS_EDGE_WIDTH * 2;
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 2895e4fe1e..a6e83137e5 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -1015,8 +1015,8 @@ gtk_tree_view_size_request (GtkWidget *widget,
tree_view = GTK_TREE_VIEW (widget);
- requisition->width = 200;
- requisition->height = 200;
+ requisition->width = tree_view->priv->width;
+ requisition->height = tree_view->priv->height + tree_view->priv->header_height;
tmp_list = tree_view->priv->children;
@@ -6174,6 +6174,49 @@ gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view,
}
/**
+ * gtk_tree_view_insert_column_with_data_func:
+ * @tree_view: a #GtkTreeView
+ * @position: Position to insert, -1 for append
+ * @title: column title
+ * @cell: cell renderer for column
+ * @func: function to set attributes of cell renderer
+ * @data: data for @func
+ * @dnotify: destroy notifier for @data
+ *
+ * Convenience function that inserts a new column into the #GtkTreeView
+ * with the given cell renderer and a #GtkCellDataFunc to set cell renderer
+ * attributes (normally using data from the model). See also
+ * gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_set_cell_renderer().
+ *
+ * Return value: number of columns in the tree view post-insert
+ **/
+gint
+gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view,
+ gint position,
+ gchar *title,
+ GtkCellRenderer *cell,
+ GtkCellDataFunc func,
+ gpointer data,
+ GDestroyNotify dnotify)
+{
+ GtkTreeViewColumn *column;
+
+ g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), -1);
+
+ column = gtk_tree_view_column_new ();
+
+ gtk_tree_view_column_set_title (column, title);
+ gtk_tree_view_column_set_cell_renderer (column, cell);
+ gtk_tree_view_column_set_cell_data_func (column, func, data, dnotify);
+
+ gtk_tree_view_insert_column (tree_view, column, position);
+
+ g_object_unref (column);
+
+ return tree_view->priv->n_columns;
+}
+
+/**
* gtk_tree_view_get_column:
* @tree_view: A #GtkTreeView.
* @n: The position of the column, counting from 0.
diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h
index 432e8e2f09..6568dbd00f 100644
--- a/gtk/gtktreeview.h
+++ b/gtk/gtktreeview.h
@@ -138,6 +138,13 @@ gint gtk_tree_view_insert_column_with_attributes (GtkTreeView
gchar *title,
GtkCellRenderer *cell,
...);
+gint gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view,
+ gint position,
+ gchar *title,
+ GtkCellRenderer *cell,
+ GtkCellDataFunc func,
+ gpointer data,
+ GDestroyNotify dnotify);
GtkTreeViewColumn *gtk_tree_view_get_column (GtkTreeView *tree_view,
gint n);
GList *gtk_tree_view_get_columns (GtkTreeView *tree_view);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 385bc5447a..03d6f8ea31 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4022,7 +4022,7 @@ gtk_widget_create_pango_layout (GtkWidget *widget,
* A convenience function that uses the theme engine and RC file
* settings for @widget to look up @stock_id and render it to
* a pixbuf. @stock_id should be a stock icon ID such as
- * #GTK_STOCK_OPEN or #GTK_STOCK_BUTTON_OK. @size should be a size
+ * #GTK_STOCK_OPEN or #GTK_STOCK_OK. @size should be a size
* such as #GTK_ICON_SIZE_MENU. @detail should be a string that
* identifies the widget or code doing the rendering, so that
* theme engines can special-case rendering for that widget or code.
diff --git a/gtk/stock-icons/Makefile.am b/gtk/stock-icons/Makefile.am
index 61f1d8a3c8..29d5b6e2cf 100644
--- a/gtk/stock-icons/Makefile.am
+++ b/gtk/stock-icons/Makefile.am
@@ -1,40 +1,148 @@
-IMAGES = @STRIP_BEGIN@ \
- dialog_error.png \
- dialog_info.png \
- dialog_question.png \
- dialog_warning.png \
- stock_button_apply.png \
- stock_button_cancel.png \
- stock_button_close.png \
- stock_button_no.png \
- stock_button_ok.png \
- stock_button_yes.png \
- stock_close.png \
- stock_exit.png \
- stock_help.png \
- stock_new.png \
- stock_open.png \
- stock_save.png \
+IMAGES = @STRIP_BEGIN@ \
+ dialog_error.png \
+ dialog_info.png \
+ dialog_question.png \
+ dialog_warning.png \
+ stock_add.png \
+ stock_align_center.png \
+ stock_align_justify.png \
+ stock_align_left.png \
+ stock_align_right.png \
+ stock_bottom.png \
+ stock_button_apply.png \
+ stock_button_cancel.png \
+ stock_button_close.png \
+ stock_button_no.png \
+ stock_button_ok.png \
+ stock_button_yes.png \
+ stock_cdrom.png \
+ stock_clear.png \
+ stock_close.png \
+ stock_close.png \
+ stock_colorselector.png \
+ stock_convert.png \
+ stock_copy.png \
+ stock_cut.png \
+ stock_down_arrow.png \
+ stock_exec.png \
+ stock_exit.png \
+ stock_first.png \
+ stock_font.png \
+ stock_help.png \
+ stock_help.png \
+ stock_home.png \
+ stock_index.png \
+ stock_jump_to.png \
+ stock_last.png \
+ stock_left_arrow.png \
+ stock_menu_print_preview.png \
+ stock_menu_sort_descending.png \
+ stock_new.png \
+ stock_open.png \
+ stock_paste.png \
+ stock_preferences.png \
+ stock_print.png \
+ stock_print_preview.png \
+ stock_properties.png \
+ stock_redo.png \
+ stock_refresh.png \
+ stock_remove.png \
+ stock_revert.png \
+ stock_right_arrow.png \
+ stock_save.png \
+ stock_save_as.png \
+ stock_search.png \
+ stock_search_replace.png \
+ stock_sort_ascending.png \
+ stock_sort_descending.png \
+ stock_spellcheck.png \
+ stock_stop.png \
+ stock_text_bold.png \
+ stock_text_italic.png \
+ stock_text_strikeout.png \
+ stock_text_underline.png \
+ stock_top.png \
+ stock_trash.png \
+ stock_undelete.png \
+ stock_undo.png \
+ stock_up_arrow.png \
+ stock_zoom_1.png \
+ stock_zoom_fit.png \
+ stock_zoom_in.png \
+ stock_zoom_out.png \
@STRIP_END@
-VARIABLES = @STRIP_BEGIN@ \
- dialog_error $(srcdir)/dialog_error.png \
- dialog_info $(srcdir)/dialog_info.png \
- dialog_question $(srcdir)/dialog_question.png \
- dialog_warning $(srcdir)/dialog_warning.png \
- stock_button_apply $(srcdir)/stock_button_apply.png \
- stock_button_cancel $(srcdir)/stock_button_cancel.png \
- stock_button_close $(srcdir)/stock_button_close.png \
- stock_button_no $(srcdir)/stock_button_no.png \
- stock_button_ok $(srcdir)/stock_button_ok.png \
- stock_button_yes $(srcdir)/stock_button_yes.png \
- stock_close $(srcdir)/stock_close.png \
- stock_exit $(srcdir)/stock_exit.png \
- stock_help $(srcdir)/stock_help.png \
- stock_new $(srcdir)/stock_new.png \
- stock_open $(srcdir)/stock_open.png \
- stock_save $(srcdir)/stock_save.png \
+VARIABLES = @STRIP_BEGIN@ \
+ dialog_error $(srcdir)/dialog_error.png \
+ dialog_info $(srcdir)/dialog_info.png \
+ dialog_question $(srcdir)/dialog_question.png \
+ dialog_warning $(srcdir)/dialog_warning.png \
+ stock_add $(srcdir)/stock_add.png \
+ stock_align_justify $(srcdir)/stock_align_justify.png \
+ stock_align_left $(srcdir)/stock_align_left.png \
+ stock_button_apply $(srcdir)/stock_button_apply.png \
+ stock_button_cancel $(srcdir)/stock_button_cancel.png \
+ stock_button_close $(srcdir)/stock_button_close.png \
+ stock_button_no $(srcdir)/stock_button_no.png \
+ stock_button_ok $(srcdir)/stock_button_ok.png \
+ stock_button_yes $(srcdir)/stock_button_yes.png \
+ stock_align_center $(srcdir)/stock_align_center.png \
+ stock_align_right $(srcdir)/stock_align_right.png \
+ stock_bottom $(srcdir)/stock_bottom.png \
+ stock_cdrom $(srcdir)/stock_cdrom.png \
+ stock_clear $(srcdir)/stock_clear.png \
+ stock_close $(srcdir)/stock_close.png \
+ stock_colorselector $(srcdir)/stock_colorselector.png \
+ stock_convert $(srcdir)/stock_convert.png \
+ stock_copy $(srcdir)/stock_copy.png \
+ stock_cut $(srcdir)/stock_cut.png \
+ stock_down_arrow $(srcdir)/stock_down_arrow.png \
+ stock_exec $(srcdir)/stock_exec.png \
+ stock_exit $(srcdir)/stock_exit.png \
+ stock_first $(srcdir)/stock_first.png \
+ stock_font $(srcdir)/stock_font.png \
+ stock_help $(srcdir)/stock_help.png \
+ stock_home $(srcdir)/stock_home.png \
+ stock_index $(srcdir)/stock_index.png \
+ stock_jump_to $(srcdir)/stock_jump_to.png \
+ stock_last $(srcdir)/stock_last.png \
+ stock_left_arrow $(srcdir)/stock_left_arrow.png \
+ stock_menu_print_preview $(srcdir)/stock_menu_print_preview.png \
+ stock_menu_sort_descending $(srcdir)/stock_menu_sort_descending.png \
+ stock_new $(srcdir)/stock_new.png \
+ stock_open $(srcdir)/stock_open.png \
+ stock_paste $(srcdir)/stock_paste.png \
+ stock_preferences $(srcdir)/stock_preferences.png \
+ stock_print $(srcdir)/stock_print.png \
+ stock_print_preview $(srcdir)/stock_print_preview.png \
+ stock_properties $(srcdir)/stock_properties.png \
+ stock_redo $(srcdir)/stock_redo.png \
+ stock_refresh $(srcdir)/stock_refresh.png \
+ stock_remove $(srcdir)/stock_remove.png \
+ stock_revert $(srcdir)/stock_revert.png \
+ stock_right_arrow $(srcdir)/stock_right_arrow.png \
+ stock_save $(srcdir)/stock_save.png \
+ stock_save_as $(srcdir)/stock_save_as.png \
+ stock_search $(srcdir)/stock_search.png \
+ stock_search_replace $(srcdir)/stock_search_replace.png \
+ stock_sort_ascending $(srcdir)/stock_sort_ascending.png \
+ stock_sort_descending $(srcdir)/stock_sort_descending.png \
+ stock_spellcheck $(srcdir)/stock_spellcheck.png \
+ stock_stop $(srcdir)/stock_stop.png \
+ stock_text_bold $(srcdir)/stock_text_bold.png \
+ stock_text_italic $(srcdir)/stock_text_italic.png \
+ stock_text_strikeout $(srcdir)/stock_text_strikeout.png \
+ stock_text_underline $(srcdir)/stock_text_underline.png \
+ stock_top $(srcdir)/stock_top.png \
+ stock_trash $(srcdir)/stock_trash.png \
+ stock_undelete $(srcdir)/stock_undelete.png \
+ stock_undo $(srcdir)/stock_undo.png \
+ stock_up_arrow $(srcdir)/stock_up_arrow.png \
+ stock_zoom_1 $(srcdir)/stock_zoom_1.png \
+ stock_zoom_fit $(srcdir)/stock_zoom_fit.png \
+ stock_zoom_in $(srcdir)/stock_zoom_in.png \
+ stock_zoom_out $(srcdir)/stock_zoom_out.png \
@STRIP_END@
noinst_DATA = gtkstockpixbufs.h
diff --git a/gtk/stock-icons/stock_add.png b/gtk/stock-icons/stock_add.png
new file mode 100644
index 0000000000..62ddebe678
--- /dev/null
+++ b/gtk/stock-icons/stock_add.png
Binary files differ
diff --git a/gtk/stock-icons/stock_add_24.png b/gtk/stock-icons/stock_add_24.png
new file mode 100644
index 0000000000..62ddebe678
--- /dev/null
+++ b/gtk/stock-icons/stock_add_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_align_center.png b/gtk/stock-icons/stock_align_center.png
new file mode 100644
index 0000000000..b11ae62666
--- /dev/null
+++ b/gtk/stock-icons/stock_align_center.png
Binary files differ
diff --git a/gtk/stock-icons/stock_align_center_24.png b/gtk/stock-icons/stock_align_center_24.png
new file mode 100644
index 0000000000..b11ae62666
--- /dev/null
+++ b/gtk/stock-icons/stock_align_center_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_align_justify.png b/gtk/stock-icons/stock_align_justify.png
new file mode 100644
index 0000000000..964a9fb2f7
--- /dev/null
+++ b/gtk/stock-icons/stock_align_justify.png
Binary files differ
diff --git a/gtk/stock-icons/stock_align_justify_24.png b/gtk/stock-icons/stock_align_justify_24.png
new file mode 100644
index 0000000000..964a9fb2f7
--- /dev/null
+++ b/gtk/stock-icons/stock_align_justify_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_align_left.png b/gtk/stock-icons/stock_align_left.png
new file mode 100644
index 0000000000..c125dcc322
--- /dev/null
+++ b/gtk/stock-icons/stock_align_left.png
Binary files differ
diff --git a/gtk/stock-icons/stock_align_left_24.png b/gtk/stock-icons/stock_align_left_24.png
new file mode 100644
index 0000000000..c125dcc322
--- /dev/null
+++ b/gtk/stock-icons/stock_align_left_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_align_right.png b/gtk/stock-icons/stock_align_right.png
new file mode 100644
index 0000000000..8ac863266c
--- /dev/null
+++ b/gtk/stock-icons/stock_align_right.png
Binary files differ
diff --git a/gtk/stock-icons/stock_align_right_24.png b/gtk/stock-icons/stock_align_right_24.png
new file mode 100644
index 0000000000..8ac863266c
--- /dev/null
+++ b/gtk/stock-icons/stock_align_right_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_bottom.png b/gtk/stock-icons/stock_bottom.png
new file mode 100644
index 0000000000..c0d2035273
--- /dev/null
+++ b/gtk/stock-icons/stock_bottom.png
Binary files differ
diff --git a/gtk/stock-icons/stock_bottom_24.png b/gtk/stock-icons/stock_bottom_24.png
new file mode 100644
index 0000000000..c0d2035273
--- /dev/null
+++ b/gtk/stock-icons/stock_bottom_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_cdrom.png b/gtk/stock-icons/stock_cdrom.png
new file mode 100644
index 0000000000..a4f741d1eb
--- /dev/null
+++ b/gtk/stock-icons/stock_cdrom.png
Binary files differ
diff --git a/gtk/stock-icons/stock_cdrom_24.png b/gtk/stock-icons/stock_cdrom_24.png
new file mode 100644
index 0000000000..a4f741d1eb
--- /dev/null
+++ b/gtk/stock-icons/stock_cdrom_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_clear.png b/gtk/stock-icons/stock_clear.png
new file mode 100644
index 0000000000..96b6d57ddf
--- /dev/null
+++ b/gtk/stock-icons/stock_clear.png
Binary files differ
diff --git a/gtk/stock-icons/stock_clear_24.png b/gtk/stock-icons/stock_clear_24.png
new file mode 100644
index 0000000000..96b6d57ddf
--- /dev/null
+++ b/gtk/stock-icons/stock_clear_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_colorselector.png b/gtk/stock-icons/stock_colorselector.png
new file mode 100644
index 0000000000..2876ff2b0a
--- /dev/null
+++ b/gtk/stock-icons/stock_colorselector.png
Binary files differ
diff --git a/gtk/stock-icons/stock_colorselector_24.png b/gtk/stock-icons/stock_colorselector_24.png
new file mode 100644
index 0000000000..2876ff2b0a
--- /dev/null
+++ b/gtk/stock-icons/stock_colorselector_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_convert.png b/gtk/stock-icons/stock_convert.png
new file mode 100644
index 0000000000..e81e11db54
--- /dev/null
+++ b/gtk/stock-icons/stock_convert.png
Binary files differ
diff --git a/gtk/stock-icons/stock_convert_24.png b/gtk/stock-icons/stock_convert_24.png
new file mode 100644
index 0000000000..e81e11db54
--- /dev/null
+++ b/gtk/stock-icons/stock_convert_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_copy.png b/gtk/stock-icons/stock_copy.png
new file mode 100644
index 0000000000..c00e9d462d
--- /dev/null
+++ b/gtk/stock-icons/stock_copy.png
Binary files differ
diff --git a/gtk/stock-icons/stock_copy_24.png b/gtk/stock-icons/stock_copy_24.png
new file mode 100644
index 0000000000..c00e9d462d
--- /dev/null
+++ b/gtk/stock-icons/stock_copy_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_cut.png b/gtk/stock-icons/stock_cut.png
new file mode 100644
index 0000000000..ae8c7ed14b
--- /dev/null
+++ b/gtk/stock-icons/stock_cut.png
Binary files differ
diff --git a/gtk/stock-icons/stock_cut_24.png b/gtk/stock-icons/stock_cut_24.png
new file mode 100644
index 0000000000..ae8c7ed14b
--- /dev/null
+++ b/gtk/stock-icons/stock_cut_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_down_arrow.png b/gtk/stock-icons/stock_down_arrow.png
new file mode 100644
index 0000000000..f181a71311
--- /dev/null
+++ b/gtk/stock-icons/stock_down_arrow.png
Binary files differ
diff --git a/gtk/stock-icons/stock_down_arrow_24.png b/gtk/stock-icons/stock_down_arrow_24.png
new file mode 100644
index 0000000000..f181a71311
--- /dev/null
+++ b/gtk/stock-icons/stock_down_arrow_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_exec.png b/gtk/stock-icons/stock_exec.png
new file mode 100644
index 0000000000..62cb297a8c
--- /dev/null
+++ b/gtk/stock-icons/stock_exec.png
Binary files differ
diff --git a/gtk/stock-icons/stock_exec_24.png b/gtk/stock-icons/stock_exec_24.png
new file mode 100644
index 0000000000..62cb297a8c
--- /dev/null
+++ b/gtk/stock-icons/stock_exec_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_first.png b/gtk/stock-icons/stock_first.png
new file mode 100644
index 0000000000..af9ae0c2bd
--- /dev/null
+++ b/gtk/stock-icons/stock_first.png
Binary files differ
diff --git a/gtk/stock-icons/stock_first_24.png b/gtk/stock-icons/stock_first_24.png
new file mode 100644
index 0000000000..af9ae0c2bd
--- /dev/null
+++ b/gtk/stock-icons/stock_first_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_font.png b/gtk/stock-icons/stock_font.png
new file mode 100644
index 0000000000..de98dc1e70
--- /dev/null
+++ b/gtk/stock-icons/stock_font.png
Binary files differ
diff --git a/gtk/stock-icons/stock_font_24.png b/gtk/stock-icons/stock_font_24.png
new file mode 100644
index 0000000000..de98dc1e70
--- /dev/null
+++ b/gtk/stock-icons/stock_font_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_home.png b/gtk/stock-icons/stock_home.png
new file mode 100644
index 0000000000..0b2e9e6ae7
--- /dev/null
+++ b/gtk/stock-icons/stock_home.png
Binary files differ
diff --git a/gtk/stock-icons/stock_home_24.png b/gtk/stock-icons/stock_home_24.png
new file mode 100644
index 0000000000..0b2e9e6ae7
--- /dev/null
+++ b/gtk/stock-icons/stock_home_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_index.png b/gtk/stock-icons/stock_index.png
new file mode 100644
index 0000000000..1fd0f290b0
--- /dev/null
+++ b/gtk/stock-icons/stock_index.png
Binary files differ
diff --git a/gtk/stock-icons/stock_index_24.png b/gtk/stock-icons/stock_index_24.png
new file mode 100644
index 0000000000..1fd0f290b0
--- /dev/null
+++ b/gtk/stock-icons/stock_index_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_jump_to.png b/gtk/stock-icons/stock_jump_to.png
new file mode 100644
index 0000000000..880cf9a7e4
--- /dev/null
+++ b/gtk/stock-icons/stock_jump_to.png
Binary files differ
diff --git a/gtk/stock-icons/stock_jump_to_24.png b/gtk/stock-icons/stock_jump_to_24.png
new file mode 100644
index 0000000000..880cf9a7e4
--- /dev/null
+++ b/gtk/stock-icons/stock_jump_to_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_last.png b/gtk/stock-icons/stock_last.png
new file mode 100644
index 0000000000..9bd28bfb73
--- /dev/null
+++ b/gtk/stock-icons/stock_last.png
Binary files differ
diff --git a/gtk/stock-icons/stock_last_24.png b/gtk/stock-icons/stock_last_24.png
new file mode 100644
index 0000000000..9bd28bfb73
--- /dev/null
+++ b/gtk/stock-icons/stock_last_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_left_arrow.png b/gtk/stock-icons/stock_left_arrow.png
new file mode 100644
index 0000000000..5a1fe9203a
--- /dev/null
+++ b/gtk/stock-icons/stock_left_arrow.png
Binary files differ
diff --git a/gtk/stock-icons/stock_left_arrow_24.png b/gtk/stock-icons/stock_left_arrow_24.png
new file mode 100644
index 0000000000..5a1fe9203a
--- /dev/null
+++ b/gtk/stock-icons/stock_left_arrow_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_menu_print_preview.png b/gtk/stock-icons/stock_menu_print_preview.png
new file mode 100644
index 0000000000..2949e4c0b8
--- /dev/null
+++ b/gtk/stock-icons/stock_menu_print_preview.png
Binary files differ
diff --git a/gtk/stock-icons/stock_menu_sort_descending.png b/gtk/stock-icons/stock_menu_sort_descending.png
new file mode 100644
index 0000000000..bfb9c0b8da
--- /dev/null
+++ b/gtk/stock-icons/stock_menu_sort_descending.png
Binary files differ
diff --git a/gtk/stock-icons/stock_paste.png b/gtk/stock-icons/stock_paste.png
new file mode 100644
index 0000000000..1f1b94a504
--- /dev/null
+++ b/gtk/stock-icons/stock_paste.png
Binary files differ
diff --git a/gtk/stock-icons/stock_paste_24.png b/gtk/stock-icons/stock_paste_24.png
new file mode 100644
index 0000000000..1f1b94a504
--- /dev/null
+++ b/gtk/stock-icons/stock_paste_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_preferences.png b/gtk/stock-icons/stock_preferences.png
new file mode 100644
index 0000000000..82b3eef0a7
--- /dev/null
+++ b/gtk/stock-icons/stock_preferences.png
Binary files differ
diff --git a/gtk/stock-icons/stock_preferences_24.png b/gtk/stock-icons/stock_preferences_24.png
new file mode 100644
index 0000000000..82b3eef0a7
--- /dev/null
+++ b/gtk/stock-icons/stock_preferences_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_print.png b/gtk/stock-icons/stock_print.png
new file mode 100644
index 0000000000..5213dff9e3
--- /dev/null
+++ b/gtk/stock-icons/stock_print.png
Binary files differ
diff --git a/gtk/stock-icons/stock_print_24.png b/gtk/stock-icons/stock_print_24.png
new file mode 100644
index 0000000000..5213dff9e3
--- /dev/null
+++ b/gtk/stock-icons/stock_print_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_print_preview.png b/gtk/stock-icons/stock_print_preview.png
new file mode 100644
index 0000000000..ca8f64b517
--- /dev/null
+++ b/gtk/stock-icons/stock_print_preview.png
Binary files differ
diff --git a/gtk/stock-icons/stock_print_preview_16.png b/gtk/stock-icons/stock_print_preview_16.png
new file mode 100644
index 0000000000..2949e4c0b8
--- /dev/null
+++ b/gtk/stock-icons/stock_print_preview_16.png
Binary files differ
diff --git a/gtk/stock-icons/stock_print_preview_24.png b/gtk/stock-icons/stock_print_preview_24.png
new file mode 100644
index 0000000000..ca8f64b517
--- /dev/null
+++ b/gtk/stock-icons/stock_print_preview_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_properties.png b/gtk/stock-icons/stock_properties.png
new file mode 100644
index 0000000000..5b638a6908
--- /dev/null
+++ b/gtk/stock-icons/stock_properties.png
Binary files differ
diff --git a/gtk/stock-icons/stock_properties_24.png b/gtk/stock-icons/stock_properties_24.png
new file mode 100644
index 0000000000..5b638a6908
--- /dev/null
+++ b/gtk/stock-icons/stock_properties_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_redo.png b/gtk/stock-icons/stock_redo.png
new file mode 100644
index 0000000000..e359590322
--- /dev/null
+++ b/gtk/stock-icons/stock_redo.png
Binary files differ
diff --git a/gtk/stock-icons/stock_redo_24.png b/gtk/stock-icons/stock_redo_24.png
new file mode 100644
index 0000000000..e359590322
--- /dev/null
+++ b/gtk/stock-icons/stock_redo_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_refresh.png b/gtk/stock-icons/stock_refresh.png
new file mode 100644
index 0000000000..81951b6fb6
--- /dev/null
+++ b/gtk/stock-icons/stock_refresh.png
Binary files differ
diff --git a/gtk/stock-icons/stock_refresh_24.png b/gtk/stock-icons/stock_refresh_24.png
new file mode 100644
index 0000000000..81951b6fb6
--- /dev/null
+++ b/gtk/stock-icons/stock_refresh_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_remove.png b/gtk/stock-icons/stock_remove.png
new file mode 100644
index 0000000000..23cd2d2a46
--- /dev/null
+++ b/gtk/stock-icons/stock_remove.png
Binary files differ
diff --git a/gtk/stock-icons/stock_remove_24.png b/gtk/stock-icons/stock_remove_24.png
new file mode 100644
index 0000000000..23cd2d2a46
--- /dev/null
+++ b/gtk/stock-icons/stock_remove_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_revert.png b/gtk/stock-icons/stock_revert.png
new file mode 100644
index 0000000000..9ef47a89ed
--- /dev/null
+++ b/gtk/stock-icons/stock_revert.png
Binary files differ
diff --git a/gtk/stock-icons/stock_revert_24.png b/gtk/stock-icons/stock_revert_24.png
new file mode 100644
index 0000000000..9ef47a89ed
--- /dev/null
+++ b/gtk/stock-icons/stock_revert_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_right_arrow.png b/gtk/stock-icons/stock_right_arrow.png
new file mode 100644
index 0000000000..d16216cada
--- /dev/null
+++ b/gtk/stock-icons/stock_right_arrow.png
Binary files differ
diff --git a/gtk/stock-icons/stock_right_arrow_24.png b/gtk/stock-icons/stock_right_arrow_24.png
new file mode 100644
index 0000000000..d16216cada
--- /dev/null
+++ b/gtk/stock-icons/stock_right_arrow_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_save_as.png b/gtk/stock-icons/stock_save_as.png
new file mode 100644
index 0000000000..13cc1bffd8
--- /dev/null
+++ b/gtk/stock-icons/stock_save_as.png
Binary files differ
diff --git a/gtk/stock-icons/stock_save_as_24.png b/gtk/stock-icons/stock_save_as_24.png
new file mode 100644
index 0000000000..13cc1bffd8
--- /dev/null
+++ b/gtk/stock-icons/stock_save_as_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_search.png b/gtk/stock-icons/stock_search.png
new file mode 100644
index 0000000000..db208134a3
--- /dev/null
+++ b/gtk/stock-icons/stock_search.png
Binary files differ
diff --git a/gtk/stock-icons/stock_search_24.png b/gtk/stock-icons/stock_search_24.png
new file mode 100644
index 0000000000..db208134a3
--- /dev/null
+++ b/gtk/stock-icons/stock_search_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_search_replace.png b/gtk/stock-icons/stock_search_replace.png
new file mode 100644
index 0000000000..895201d14e
--- /dev/null
+++ b/gtk/stock-icons/stock_search_replace.png
Binary files differ
diff --git a/gtk/stock-icons/stock_search_replace_24.png b/gtk/stock-icons/stock_search_replace_24.png
new file mode 100644
index 0000000000..895201d14e
--- /dev/null
+++ b/gtk/stock-icons/stock_search_replace_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_sort_ascending.png b/gtk/stock-icons/stock_sort_ascending.png
new file mode 100644
index 0000000000..5b9e630448
--- /dev/null
+++ b/gtk/stock-icons/stock_sort_ascending.png
Binary files differ
diff --git a/gtk/stock-icons/stock_sort_ascending_24.png b/gtk/stock-icons/stock_sort_ascending_24.png
new file mode 100644
index 0000000000..5b9e630448
--- /dev/null
+++ b/gtk/stock-icons/stock_sort_ascending_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_sort_descending.png b/gtk/stock-icons/stock_sort_descending.png
new file mode 100644
index 0000000000..37abbf64cd
--- /dev/null
+++ b/gtk/stock-icons/stock_sort_descending.png
Binary files differ
diff --git a/gtk/stock-icons/stock_sort_descending_16.png b/gtk/stock-icons/stock_sort_descending_16.png
new file mode 100644
index 0000000000..bfb9c0b8da
--- /dev/null
+++ b/gtk/stock-icons/stock_sort_descending_16.png
Binary files differ
diff --git a/gtk/stock-icons/stock_sort_descending_24.png b/gtk/stock-icons/stock_sort_descending_24.png
new file mode 100644
index 0000000000..37abbf64cd
--- /dev/null
+++ b/gtk/stock-icons/stock_sort_descending_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_spellcheck.png b/gtk/stock-icons/stock_spellcheck.png
new file mode 100644
index 0000000000..8093dcdbe8
--- /dev/null
+++ b/gtk/stock-icons/stock_spellcheck.png
Binary files differ
diff --git a/gtk/stock-icons/stock_spellcheck_24.png b/gtk/stock-icons/stock_spellcheck_24.png
new file mode 100644
index 0000000000..8093dcdbe8
--- /dev/null
+++ b/gtk/stock-icons/stock_spellcheck_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_stop.png b/gtk/stock-icons/stock_stop.png
new file mode 100644
index 0000000000..b0921187db
--- /dev/null
+++ b/gtk/stock-icons/stock_stop.png
Binary files differ
diff --git a/gtk/stock-icons/stock_stop_24.png b/gtk/stock-icons/stock_stop_24.png
new file mode 100644
index 0000000000..b0921187db
--- /dev/null
+++ b/gtk/stock-icons/stock_stop_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_bold.png b/gtk/stock-icons/stock_text_bold.png
new file mode 100644
index 0000000000..1319debc5e
--- /dev/null
+++ b/gtk/stock-icons/stock_text_bold.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_bold_24.png b/gtk/stock-icons/stock_text_bold_24.png
new file mode 100644
index 0000000000..1319debc5e
--- /dev/null
+++ b/gtk/stock-icons/stock_text_bold_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_italic.png b/gtk/stock-icons/stock_text_italic.png
new file mode 100644
index 0000000000..271233785f
--- /dev/null
+++ b/gtk/stock-icons/stock_text_italic.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_italic_24.png b/gtk/stock-icons/stock_text_italic_24.png
new file mode 100644
index 0000000000..271233785f
--- /dev/null
+++ b/gtk/stock-icons/stock_text_italic_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_strikeout.png b/gtk/stock-icons/stock_text_strikeout.png
new file mode 100644
index 0000000000..9a9a3731da
--- /dev/null
+++ b/gtk/stock-icons/stock_text_strikeout.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_strikeout_24.png b/gtk/stock-icons/stock_text_strikeout_24.png
new file mode 100644
index 0000000000..9a9a3731da
--- /dev/null
+++ b/gtk/stock-icons/stock_text_strikeout_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_strikethrough_24.png b/gtk/stock-icons/stock_text_strikethrough_24.png
new file mode 100644
index 0000000000..9a9a3731da
--- /dev/null
+++ b/gtk/stock-icons/stock_text_strikethrough_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_underline.png b/gtk/stock-icons/stock_text_underline.png
new file mode 100644
index 0000000000..35f5c1fe93
--- /dev/null
+++ b/gtk/stock-icons/stock_text_underline.png
Binary files differ
diff --git a/gtk/stock-icons/stock_text_underline_24.png b/gtk/stock-icons/stock_text_underline_24.png
new file mode 100644
index 0000000000..35f5c1fe93
--- /dev/null
+++ b/gtk/stock-icons/stock_text_underline_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_top.png b/gtk/stock-icons/stock_top.png
new file mode 100644
index 0000000000..7ebb6c88a8
--- /dev/null
+++ b/gtk/stock-icons/stock_top.png
Binary files differ
diff --git a/gtk/stock-icons/stock_top_24.png b/gtk/stock-icons/stock_top_24.png
new file mode 100644
index 0000000000..7ebb6c88a8
--- /dev/null
+++ b/gtk/stock-icons/stock_top_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_trash.png b/gtk/stock-icons/stock_trash.png
new file mode 100644
index 0000000000..1c70b72f7f
--- /dev/null
+++ b/gtk/stock-icons/stock_trash.png
Binary files differ
diff --git a/gtk/stock-icons/stock_trash_24.png b/gtk/stock-icons/stock_trash_24.png
new file mode 100644
index 0000000000..1c70b72f7f
--- /dev/null
+++ b/gtk/stock-icons/stock_trash_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_undelete.png b/gtk/stock-icons/stock_undelete.png
new file mode 100644
index 0000000000..faff910342
--- /dev/null
+++ b/gtk/stock-icons/stock_undelete.png
Binary files differ
diff --git a/gtk/stock-icons/stock_undelete_24.png b/gtk/stock-icons/stock_undelete_24.png
new file mode 100644
index 0000000000..faff910342
--- /dev/null
+++ b/gtk/stock-icons/stock_undelete_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_undo.png b/gtk/stock-icons/stock_undo.png
new file mode 100644
index 0000000000..601a1fa4f4
--- /dev/null
+++ b/gtk/stock-icons/stock_undo.png
Binary files differ
diff --git a/gtk/stock-icons/stock_undo_24.png b/gtk/stock-icons/stock_undo_24.png
new file mode 100644
index 0000000000..601a1fa4f4
--- /dev/null
+++ b/gtk/stock-icons/stock_undo_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_up_arrow.png b/gtk/stock-icons/stock_up_arrow.png
new file mode 100644
index 0000000000..4bb674b4bb
--- /dev/null
+++ b/gtk/stock-icons/stock_up_arrow.png
Binary files differ
diff --git a/gtk/stock-icons/stock_up_arrow_24.png b/gtk/stock-icons/stock_up_arrow_24.png
new file mode 100644
index 0000000000..4bb674b4bb
--- /dev/null
+++ b/gtk/stock-icons/stock_up_arrow_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_zoom_1.png b/gtk/stock-icons/stock_zoom_1.png
new file mode 100644
index 0000000000..10507a8d98
--- /dev/null
+++ b/gtk/stock-icons/stock_zoom_1.png
Binary files differ
diff --git a/gtk/stock-icons/stock_zoom_1_24.png b/gtk/stock-icons/stock_zoom_1_24.png
new file mode 100644
index 0000000000..10507a8d98
--- /dev/null
+++ b/gtk/stock-icons/stock_zoom_1_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_zoom_fit.png b/gtk/stock-icons/stock_zoom_fit.png
new file mode 100644
index 0000000000..26b089cff4
--- /dev/null
+++ b/gtk/stock-icons/stock_zoom_fit.png
Binary files differ
diff --git a/gtk/stock-icons/stock_zoom_fit_24.png b/gtk/stock-icons/stock_zoom_fit_24.png
new file mode 100644
index 0000000000..26b089cff4
--- /dev/null
+++ b/gtk/stock-icons/stock_zoom_fit_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_zoom_in.png b/gtk/stock-icons/stock_zoom_in.png
new file mode 100644
index 0000000000..3a18e6346d
--- /dev/null
+++ b/gtk/stock-icons/stock_zoom_in.png
Binary files differ
diff --git a/gtk/stock-icons/stock_zoom_in_24.png b/gtk/stock-icons/stock_zoom_in_24.png
new file mode 100644
index 0000000000..3a18e6346d
--- /dev/null
+++ b/gtk/stock-icons/stock_zoom_in_24.png
Binary files differ
diff --git a/gtk/stock-icons/stock_zoom_out.png b/gtk/stock-icons/stock_zoom_out.png
new file mode 100644
index 0000000000..f398bbcd75
--- /dev/null
+++ b/gtk/stock-icons/stock_zoom_out.png
Binary files differ
diff --git a/gtk/stock-icons/stock_zoom_out_24.png b/gtk/stock-icons/stock_zoom_out_24.png
new file mode 100644
index 0000000000..f398bbcd75
--- /dev/null
+++ b/gtk/stock-icons/stock_zoom_out_24.png
Binary files differ