From 245308c38ca8a49f1335f6dac25b2abe870bfefa Mon Sep 17 00:00:00 2001 From: Jody Goldberg Date: Tue, 20 Jan 2004 16:32:54 +0000 Subject: [PATCH] add stock indent, unindent I would have prefered outdent, but 2004-01-05 Jody Goldberg * 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 * 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. --- ChangeLog | 20 ++++++++++++ ChangeLog.pre-2-10 | 20 ++++++++++++ ChangeLog.pre-2-4 | 20 ++++++++++++ ChangeLog.pre-2-6 | 20 ++++++++++++ ChangeLog.pre-2-8 | 20 ++++++++++++ gtk/gtkiconfactory.c | 8 +++++ gtk/gtkicontheme.c | 34 +++++++++++++++++++-- gtk/gtkstock.c | 2 ++ gtk/gtkstock.h | 2 ++ gtk/stock-icons/Makefile.am | 8 +++++ gtk/stock-icons/stock_text_indent_16.png | Bin 0 -> 420 bytes gtk/stock-icons/stock_text_indent_24.png | Bin 0 -> 582 bytes gtk/stock-icons/stock_text_unindent_16.png | Bin 0 -> 425 bytes gtk/stock-icons/stock_text_unindent_24.png | Bin 0 -> 599 bytes 14 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 gtk/stock-icons/stock_text_indent_16.png create mode 100644 gtk/stock-icons/stock_text_indent_24.png create mode 100644 gtk/stock-icons/stock_text_unindent_16.png create mode 100644 gtk/stock-icons/stock_text_unindent_24.png diff --git a/ChangeLog b/ChangeLog index cca738a2f0..dce4593625 100644 --- a/ChangeLog +++ b/ChangeLog @@ -508,6 +508,19 @@ Wed Jan 7 02:50:55 2004 Matthias Clasen * gdk/gdkimage.h: Added documentation to the struct, as suggested by Owen Taylor. +2004-01-05 Jody Goldberg + + * 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 + Sun Jan 4 15:29:04 2004 Soeren Sandmann * gtk/gtkradiotoolbutton.[ch] @@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003 Matthias Clasen * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate() instead of gtk_action_activate(). +2003-12-18 Jody Goldberg + + * 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. + Thu Dec 18 19:13:12 2003 Kristian Rietveld Fixes #110249, reworked patch from Joshua N Pritikin. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index cca738a2f0..dce4593625 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -508,6 +508,19 @@ Wed Jan 7 02:50:55 2004 Matthias Clasen * gdk/gdkimage.h: Added documentation to the struct, as suggested by Owen Taylor. +2004-01-05 Jody Goldberg + + * 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 + Sun Jan 4 15:29:04 2004 Soeren Sandmann * gtk/gtkradiotoolbutton.[ch] @@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003 Matthias Clasen * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate() instead of gtk_action_activate(). +2003-12-18 Jody Goldberg + + * 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. + Thu Dec 18 19:13:12 2003 Kristian Rietveld Fixes #110249, reworked patch from Joshua N Pritikin. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index cca738a2f0..dce4593625 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -508,6 +508,19 @@ Wed Jan 7 02:50:55 2004 Matthias Clasen * gdk/gdkimage.h: Added documentation to the struct, as suggested by Owen Taylor. +2004-01-05 Jody Goldberg + + * 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 + Sun Jan 4 15:29:04 2004 Soeren Sandmann * gtk/gtkradiotoolbutton.[ch] @@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003 Matthias Clasen * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate() instead of gtk_action_activate(). +2003-12-18 Jody Goldberg + + * 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. + Thu Dec 18 19:13:12 2003 Kristian Rietveld Fixes #110249, reworked patch from Joshua N Pritikin. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index cca738a2f0..dce4593625 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -508,6 +508,19 @@ Wed Jan 7 02:50:55 2004 Matthias Clasen * gdk/gdkimage.h: Added documentation to the struct, as suggested by Owen Taylor. +2004-01-05 Jody Goldberg + + * 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 + Sun Jan 4 15:29:04 2004 Soeren Sandmann * gtk/gtkradiotoolbutton.[ch] @@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003 Matthias Clasen * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate() instead of gtk_action_activate(). +2003-12-18 Jody Goldberg + + * 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. + Thu Dec 18 19:13:12 2003 Kristian Rietveld Fixes #110249, reworked patch from Joshua N Pritikin. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index cca738a2f0..dce4593625 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -508,6 +508,19 @@ Wed Jan 7 02:50:55 2004 Matthias Clasen * gdk/gdkimage.h: Added documentation to the struct, as suggested by Owen Taylor. +2004-01-05 Jody Goldberg + + * 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 + Sun Jan 4 15:29:04 2004 Soeren Sandmann * gtk/gtkradiotoolbutton.[ch] @@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003 Matthias Clasen * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate() instead of gtk_action_activate(). +2003-12-18 Jody Goldberg + + * 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. + Thu Dec 18 19:13:12 2003 Kristian Rietveld Fixes #110249, reworked patch from Joshua N Pritikin. 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 new file mode 100644 index 0000000000000000000000000000000000000000..4292a2d9b857dbbad998a762b890dd4139d654fe GIT binary patch literal 420 zcmV;V0bBlwP)h0 zvRqnggS9p|=Yn%Cc<+PvKFsIy0E`3(#u&ESEh3W3^?FUW+s$E0sY~5xG`JAVX0rl; zhyYy0d%Yg@di_L@Wf{BO?yAZ?tX8X0;ycdZX0xH)ZX+U0CX?LVxdzZ$pU!6o`~4oJ z6s=Z^IF2tQ_uN#g)gOW=iufH#k`TvnLHSIgwWd<3oCvJ791aIWgl4nJbUI}?9R4|n zD2j?RNRot3r-O(v9*=X%TI=G5fZ&|tcsxF|0i_h>a{1&yL|Cm>1$L#>&37;u41OGV z?=i*{6c&pG{eJ(ZlTxXK0zT3-y=wVhbDE|A?*Pxh=)s>DzI&eeZ+rp4wXFESgw+-R O0000838FQ0U5yB8a|(&ZY1=mI^_pU__yza?{1U)H*L8GV_rO7)&1O_8l_SD9 zHw=S9p#bn2_@MwOigNNJms|*O7OSeNEATn+MD@#^&*w)OMr9i;jsIS)R{bTs0Tk5_ zESJlP%5V{>1@IH}`~ArB1iPu#YJ~y_;9wXAyWP$s9*@V=>-9t`f=Z;6 zXqpC41HMNpXf~S+1_Lihuh)xJ;Lo_-ZbvIHO_NkAMbL)BA&o}kK}w{Qj_9BCA$R;!(!WcRU3swC>s3z`D3-|r)TmV2K} zCb0oroNKGqDx~1kVzGFa&1TUw4coRu8J0>Vq?Bjtz1?oz0N()HS)sfHK3{Pse+AwG zZ-9(&mh&?p?`$E}Y2W{~-+%$!0Y8O9b^|3>b|@ zR{$Xdz|DN4(V$!|CxAGPIUEi*RUYL^r4kvACWK(UUK0etxnM9Dq$W7U07|Lke41c3 zo6&B!*=#nyDxY%2Vle?MmrH838b58f+tKg$uar*^r4)riApsa;7!HSYIvuv#?Vs-< zpU+-zJQ4~G30VyTfY&O|~5Q6!9ezkuo<=uDC zYPBv~aL%E%zEYS>CN!JPyOU%x86@x-hT+YTA2o+z2=D<=1-eiEM1Sn5@?ZM~MFF%4 TtwlnZ00000NkvXXu0mjfxahRy literal 0 HcmV?d00001 diff --git a/gtk/stock-icons/stock_text_unindent_24.png b/gtk/stock-icons/stock_text_unindent_24.png new file mode 100644 index 0000000000000000000000000000000000000000..06ce30de218551d161271aaaf4c9de7268198923 GIT binary patch literal 599 zcmV-d0;v6oP)6oVk5u8cOgnQSi8X8x}3YC+L`_`0gT>iW6?UIW*_-G%%M z@D_Lq2mxGACX-K@Oa{LRAx_?_)pcEFvl;n({yXp)xDmkJdc9`7ULU|=9}b6qGVx~^jw2CnNyDl8NVNGXr@d$n4r z1U~`S`$BmGe7oSE`~&y^yazJE`%N@opUOfN+002ovPDHLkV1hDo2T}k4 literal 0 HcmV?d00001