diff options
author | Jody Goldberg <jody@gnome.org> | 2004-01-20 16:32:54 +0000 |
---|---|---|
committer | Jody Goldberg <jody@src.gnome.org> | 2004-01-20 16:32:54 +0000 |
commit | 245308c38ca8a49f1335f6dac25b2abe870bfefa (patch) | |
tree | 80a5cc6ce14ba0acd3a1536658bfe41b907a6830 /gtk | |
parent | 28e71dcba63d1dacb4882c7c14f3657f52f55920 (diff) | |
download | gtk+-245308c38ca8a49f1335f6dac25b2abe870bfefa.tar.gz |
add stock indent, unindent I would have prefered outdent, but
2004-01-05 Jody Goldberg <jody@gnome.org>
* gtk/gtkiconfactory.c (get_default_icons) : add stock indent, unindent
I would have prefered outdent, but compatibility seems more
important.
* gtk/gtkstock.c (builtin_items) : ditto.
* gtk/gtkstock.h : ditto.
* gtk/stock-icons/Makefile.am : ditto.
* gtk/stock-icons/stock_text_indent_16.png :
* gtk/stock-icons/stock_text_indent_24.png :
* gtk/stock-icons/stock_text_unindent_16.png :
* gtk/stock-icons/stock_text_unindent_24.png : from gnome-icon-theme
2003-12-18 Jody Goldberg <jody@gnome.org>
* gtk/gtkicontheme.c (gtk_icon_theme_lookup_icon)) : Add a sanity test
to ensure that the base hicolor theme is installed. Silently
failing to produce icons that apps assume exist in the theme seems
like a bad idea.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkiconfactory.c | 8 | ||||
-rw-r--r-- | gtk/gtkicontheme.c | 34 | ||||
-rw-r--r-- | gtk/gtkstock.c | 2 | ||||
-rw-r--r-- | gtk/gtkstock.h | 2 | ||||
-rw-r--r-- | gtk/stock-icons/Makefile.am | 8 | ||||
-rw-r--r-- | gtk/stock-icons/stock_text_indent_16.png | bin | 0 -> 420 bytes | |||
-rw-r--r-- | gtk/stock-icons/stock_text_indent_24.png | bin | 0 -> 582 bytes | |||
-rw-r--r-- | gtk/stock-icons/stock_text_unindent_16.png | bin | 0 -> 425 bytes | |||
-rw-r--r-- | gtk/stock-icons/stock_text_unindent_24.png | bin | 0 -> 599 bytes |
9 files changed, 52 insertions, 2 deletions
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c index 504ce81350..240ade234e 100644 --- a/gtk/gtkiconfactory.c +++ b/gtk/gtkiconfactory.c @@ -662,6 +662,14 @@ get_default_icons (GtkIconFactory *factory) 16, stock_text_underline_16, 24, stock_text_underline_24); + add_icon2 (factory, GTK_STOCK_INDENT, + 16, stock_text_indent_16, + 24, stock_text_indent_24); + + add_icon2 (factory, GTK_STOCK_UNINDENT, + 16, stock_text_unindent_16, + 24, stock_text_unindent_24); + add_icon2 (factory, GTK_STOCK_GOTO_TOP, 16, stock_top_16, 24, stock_top_24); diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index bd0dc97e68..85752d7d74 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -630,8 +630,8 @@ gtk_icon_theme_finalize (GObject *object) * the right name is found directly in one of the elements of * @path, then that image will be used for the icon name. * (This is legacy feature, and new icons should be put - * into the default icon theme, which is called "hicolor", rather than - * directly on the icon path.) + * into the default icon theme, which is called DEFAULT_THEME_NAME, + * rather than directly on the icon path.) * * Since: 2.4 **/ @@ -1157,6 +1157,36 @@ gtk_icon_theme_lookup_icon (GtkIconTheme *icon_theme, out: if (icon_info) icon_info->desired_size = size; + else + { + static gboolean check_for_default_theme = TRUE; + char *default_theme_path; + gboolean found = FALSE; + unsigned i; + + if (check_for_default_theme) + { + check_for_default_theme = FALSE; + + for (i = 0; !found && i < priv->search_path_len; i++) + { + default_theme_path = g_build_filename (priv->search_path[i], + DEFAULT_THEME_NAME, + "index.theme", + NULL); + found = g_file_test (default_theme_path, G_FILE_TEST_IS_REGULAR); + g_free (default_theme_path); + } + if (!found) + { + g_warning (_("Could not find the icon '%s'. The '" DEFAULT_THEME_NAME "' theme\n" + "was not found either, perhaps you need to install it.\n" + "You can get a copy from :\n" + "\thttp://freedesktop.org/Software/icon-theme/releases"), + icon_name); + } + } + } return icon_info; } diff --git a/gtk/gtkstock.c b/gtk/gtkstock.c index cd5caed17a..7b00641f67 100644 --- a/gtk/gtkstock.c +++ b/gtk/gtkstock.c @@ -298,6 +298,8 @@ static const GtkStockItem builtin_items [] = { GTK_STOCK_HARDDISK, N_("_Harddisk"), 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_INDENT, N_("Increase Indent"), 0, 0, GETTEXT_PACKAGE }, + { GTK_STOCK_UNINDENT, N_("Decrease Indent"), 0, 0, GETTEXT_PACKAGE }, { GTK_STOCK_INDEX, N_("_Index"), 0, 0, GETTEXT_PACKAGE }, { GTK_STOCK_ITALIC, N_("_Italic"), 0, 0, GETTEXT_PACKAGE }, { GTK_STOCK_JUMP_TO, N_("_Jump to"), 0, 0, GETTEXT_PACKAGE }, diff --git a/gtk/gtkstock.h b/gtk/gtkstock.h index 9985a18b73..575818c9be 100644 --- a/gtk/gtkstock.h +++ b/gtk/gtkstock.h @@ -100,6 +100,8 @@ void gtk_stock_item_free (GtkStockItem *item); #define GTK_STOCK_HELP "gtk-help" #define GTK_STOCK_HOME "gtk-home" #define GTK_STOCK_INDEX "gtk-index" +#define GTK_STOCK_INDENT "gtk-indent" /* since gtk-2.4 */ +#define GTK_STOCK_UNINDENT "gtk-unindent" /* since gtk-2.4 */ #define GTK_STOCK_ITALIC "gtk-italic" #define GTK_STOCK_JUMP_TO "gtk-jump-to" #define GTK_STOCK_JUSTIFY_CENTER "gtk-justify-center" diff --git a/gtk/stock-icons/Makefile.am b/gtk/stock-icons/Makefile.am index 68aca14ad4..5e6dcf01fd 100644 --- a/gtk/stock-icons/Makefile.am +++ b/gtk/stock-icons/Makefile.am @@ -114,6 +114,10 @@ IMAGES = \ stock_text_strikethrough_24.png \ stock_text_underline_16.png \ stock_text_underline_24.png \ + stock_text_indent_16.png \ + stock_text_indent_24.png \ + stock_text_unindent_16.png \ + stock_text_unindent_24.png \ stock_top_16.png \ stock_top_24.png \ stock_trash_16.png \ @@ -255,6 +259,10 @@ VARIABLES6 = \ stock_text_strikethrough_24 $(srcdir)/stock_text_strikethrough_24.png \ stock_text_underline_16 $(srcdir)/stock_text_underline_16.png \ stock_text_underline_24 $(srcdir)/stock_text_underline_24.png \ + stock_text_indent_16 $(srcdir)/stock_text_indent_16.png \ + stock_text_indent_24 $(srcdir)/stock_text_indent_24.png \ + stock_text_unindent_16 $(srcdir)/stock_text_unindent_16.png \ + stock_text_unindent_24 $(srcdir)/stock_text_unindent_24.png \ stock_top_16 $(srcdir)/stock_top_16.png \ stock_top_24 $(srcdir)/stock_top_24.png \ stock_trash_16 $(srcdir)/stock_trash_16.png \ diff --git a/gtk/stock-icons/stock_text_indent_16.png b/gtk/stock-icons/stock_text_indent_16.png Binary files differnew file mode 100644 index 0000000000..4292a2d9b8 --- /dev/null +++ b/gtk/stock-icons/stock_text_indent_16.png diff --git a/gtk/stock-icons/stock_text_indent_24.png b/gtk/stock-icons/stock_text_indent_24.png Binary files differnew file mode 100644 index 0000000000..cbca4d627f --- /dev/null +++ b/gtk/stock-icons/stock_text_indent_24.png diff --git a/gtk/stock-icons/stock_text_unindent_16.png b/gtk/stock-icons/stock_text_unindent_16.png Binary files differnew file mode 100644 index 0000000000..ed0f45ebd1 --- /dev/null +++ b/gtk/stock-icons/stock_text_unindent_16.png diff --git a/gtk/stock-icons/stock_text_unindent_24.png b/gtk/stock-icons/stock_text_unindent_24.png Binary files differnew file mode 100644 index 0000000000..06ce30de21 --- /dev/null +++ b/gtk/stock-icons/stock_text_unindent_24.png |