Code

Several icon name fixes
authortweenk <tweenk@users.sourceforge.net>
Thu, 26 Feb 2009 02:52:45 +0000 (02:52 +0000)
committertweenk <tweenk@users.sourceforge.net>
Thu, 26 Feb 2009 02:52:45 +0000 (02:52 +0000)
share/icons/hicolor/scalable/actions/Makefile.am
share/icons/hicolor/scalable/actions/window-new.svg [new file with mode: 0644]
share/icons/hicolor/update-makefiles.sh
src/main.cpp
src/ui/icon-names.h
src/ui/widget/layer-selector.cpp
src/widgets/desktop-widget.cpp
src/widgets/toolbox.cpp

index 213a6ddc7743959b388ea525338c0053d7eeb81b..b1cca3d10649fb257a51840d76759e55ee1dc3d6 100644 (file)
@@ -173,6 +173,7 @@ icons_DATA = \
        transform-scale-vertical.svg \
        transform-skew-horizontal.svg \
        transform-skew-vertical.svg \
+       window-new.svg \
        window-next.svg \
        window-previous.svg \
        xml-attribute-delete.svg \
diff --git a/share/icons/hicolor/scalable/actions/window-new.svg b/share/icons/hicolor/scalable/actions/window-new.svg
new file mode 100644 (file)
index 0000000..99f56a2
--- /dev/null
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg8286"
+   sodipodi:version="0.32"
+   inkscape:version="0.46+devel r20741 custom"
+   sodipodi:docname="window-new.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs8288">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 24 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="48 : 24 : 1"
+       inkscape:persp3d-origin="24 : 16 : 1"
+       id="perspective8294" />
+    <inkscape:perspective
+       id="perspective8304"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1887"
+       id="linearGradient6026"
+       x1="118.54871"
+       y1="306.54694"
+       x2="124.80454"
+       y2="313.38208"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.991519,0,2.569281)" />
+    <linearGradient
+       id="linearGradient1887">
+      <stop
+         id="stop1888"
+         offset="0.0000000"
+         style="stop-color:#fffdf8;stop-opacity:1.0000000;" />
+      <stop
+         id="stop1889"
+         offset="1.0000000"
+         style="stop-color:#cdccc7;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5740"
+       id="linearGradient13477"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.868799,0,0,0.896064,-239.3931,260.4497)"
+       x1="404.67871"
+       y1="46.338985"
+       x2="415.20053"
+       y2="46.339008" />
+    <linearGradient
+       id="linearGradient5740">
+      <stop
+         id="stop5742"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5744"
+         offset="1.0000000"
+         style="stop-color:#98b6d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1887"
+       id="linearGradient6034"
+       x1="114.09267"
+       y1="311.00522"
+       x2="119.9323"
+       y2="316"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient8317">
+      <stop
+         id="stop8319"
+         offset="0.0000000"
+         style="stop-color:#fffdf8;stop-opacity:1.0000000;" />
+      <stop
+         id="stop8321"
+         offset="1.0000000"
+         style="stop-color:#cdccc7;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5740"
+       id="linearGradient13473"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.666914,0,0,0.896427,-159.6137,266.4372)"
+       x1="404.67871"
+       y1="46.338985"
+       x2="415.16632"
+       y2="46.339054" />
+    <linearGradient
+       id="linearGradient8324">
+      <stop
+         id="stop8326"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop8328"
+         offset="1.0000000"
+         style="stop-color:#98b6d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       y2="46.339054"
+       x2="415.16632"
+       y1="46.338985"
+       x1="404.67871"
+       gradientTransform="matrix(0.666914,0,0,0.896427,-159.6137,266.4372)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient8335"
+       xlink:href="#linearGradient5740"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="3.5"
+     inkscape:cx="25.979695"
+     inkscape:cy="23.480653"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="679"
+     inkscape:window-height="436"
+     inkscape:window-x="335"
+     inkscape:window-y="77" />
+  <metadata
+     id="metadata8291">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       id="window-new"
+       transform="matrix(2.9970346,0,0,2.9970346,-329.6897,-899.06283)"
+       inkscape:label="#view_new">
+      <rect
+         y="303.45721"
+         x="112.4954"
+         height="10.03091"
+         width="13.00704"
+         id="rect13445"
+         style="color:#000000;fill:url(#linearGradient6026);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline" />
+      <rect
+         y="300.48401"
+         x="112.4954"
+         height="2.976774"
+         width="13.00705"
+         id="rect13447"
+         style="color:#000000;fill:url(#linearGradient13477);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999952;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline" />
+      <rect
+         y="309.32901"
+         x="110.5057"
+         height="6.1709552"
+         width="9.9836187"
+         id="rect13433"
+         style="color:#000000;fill:url(#linearGradient6034);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline" />
+      <rect
+         y="306.48792"
+         x="110.5053"
+         height="2.977982"
+         width="9.9845524"
+         id="rect13435"
+         style="color:#000000;fill:url(#linearGradient8335);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline" />
+    </g>
+  </g>
+</svg>
index b802df0539e54a9fa59fdfb6fef63c8e6f302789..50f7f966aff912e070946ae314e833a5503b6e59 100755 (executable)
@@ -13,14 +13,14 @@ if test -d $dir_size; then
 
 for dir in $dir_size/*; do
 if test -d $dir; then
-       ICONS_DATA=$(find $dir -name '*.svg' -and -not -name '*.svn*' -printf '\t%f \\\n' \
+       ICONS_DATA=$(find $dir \( -name '*.svg' -o -name '*.png' \) -printf '\t%f \\\n' \
                | sort \
                | sed -e '$s|\\||')
-SIZE=$(echo $dir_size | sed -e 's|x.*||')
+#SIZE=$(echo $dir_size | sed -e 's|x.*||')
 CONTEXT=$(echo $dir | sed -e 's|^.*/||')
 echo \
 'themedir = $(pkgdatadir)/icons/hicolor
-size = '$SIZE'
+size = '$dir_size'
 context = '$CONTEXT'
 
 iconsdir = $(themedir)/$(size)/$(context)
@@ -32,7 +32,7 @@ icons_DATA = \
 '$ICONS_DATA'
 
 EXTRA_DIST = $(icons_DATA)' > $dir/Makefile.am
-       fi
+fi
 done
 
 fi
index 9da8c304858fc1c65a4eeebb67c82f25d387273b..bfee432ba920f7e0b7e9457ed4bfeac5d4f08935 100644 (file)
@@ -836,7 +836,10 @@ sp_main_gui(int argc, char const **argv)
     g_return_val_if_fail(retVal == 0, 1);
 
     // Add our icon directory to the search path for icon theme lookups.
+    gchar *usericondir = profile_path("icons");
+    gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), usericondir);
     gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), INKSCAPE_PIXMAPDIR);
+    g_free(usericondir);
 
     gdk_event_handler_set((GdkEventFunc)snooper, NULL, NULL);
     Inkscape::Debug::log_display_config();
index 00341c4dde7877c0345939c9ea38a9caa4170958..535b147958b8252009b58f722c9cd07a6c91b670 100644 (file)
 #define INKSCAPE_ICON_VIEW_FULLSCREEN \
     "view-fullscreen"
 #define INKSCAPE_ICON_WINDOW_NEW \
-    "window-neW"
+    "window-new"
 #define INKSCAPE_ICON_WINDOW_NEXT \
     "window-next"
 #define INKSCAPE_ICON_WINDOW_PREVIOUS \
index 51084b127c8603bfeda0cf4c16f33cb06a4e8f65..f25192b2a301605b979af42c051636ec1a299729 100644 (file)
@@ -23,6 +23,7 @@
 #include "layer-manager.h"
 #include "sp-item.h"
 #include "ui/dialog/layer-properties.h"
+#include "ui/icon-names.h"
 #include "ui/widget/layer-selector.h"
 #include "util/filter-list.h"
 #include "util/reverse-list.h"
@@ -92,7 +93,8 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
 {
     AlternateIcons *label;
 
-    label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION, "visible", "hidden"));
+    label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION,
+        INKSCAPE_ICON_OBJECT_VISIBLE, INKSCAPE_ICON_OBJECT_HIDDEN));
     _visibility_toggle.add(*label);
     _visibility_toggle.signal_toggled().connect(
         sigc::compose(
@@ -112,7 +114,8 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
     _tooltips.set_tip(_visibility_toggle, _("Toggle current layer visibility"));
     pack_start(_visibility_toggle, Gtk::PACK_EXPAND_PADDING);
 
-    label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION, "lock_unlocked", "width_height_lock"));
+    label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION,
+        INKSCAPE_ICON_OBJECT_UNLOCKED, INKSCAPE_ICON_OBJECT_LOCKED));
     _lock_toggle.add(*label);
     _lock_toggle.signal_toggled().connect(
         sigc::compose(
index 356a09418de9439c8661762afcec391cfb44d1d4..6550ca0cdb99fd286c8d136f3f221053c087b6cb 100644 (file)
@@ -51,6 +51,7 @@
 #include "toolbox.h"
 #include "ui/dialog/dialog-manager.h"
 #include "ui/dialog/swatches.h"
+#include "ui/icon-names.h"
 #include "ui/widget/dock.h"
 #include "ui/widget/layer-selector.h"
 #include "ui/widget/selected-style.h"
@@ -374,7 +375,7 @@ sp_desktop_widget_init (SPDesktopWidget *dtw)
     dtw->sticky_zoom = sp_button_new_from_data ( Inkscape::ICON_SIZE_DECORATION,
                                                  SP_BUTTON_TYPE_TOGGLE,
                                                  NULL,
-                                                 "sticky_zoom",
+                                                 INKSCAPE_ICON_ZOOM,
                                                  _("Zoom drawing if window size changes"),
                                                  dtw->tt);
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dtw->sticky_zoom), prefs->getBool("/options/stickyzoom/value"));
@@ -396,7 +397,7 @@ sp_desktop_widget_init (SPDesktopWidget *dtw)
     dtw->cms_adjust = sp_button_new_from_data( Inkscape::ICON_SIZE_DECORATION,
                                                SP_BUTTON_TYPE_TOGGLE,
                                                NULL,
-                                               "color_management",
+                                               INKSCAPE_ICON_COLOR_MANAGEMENT,
                                                tip,
                                                dtw->tt );
 #if ENABLE_LCMS
index 3049d53e7f9dee784f33a96fccdddc04ae8b07a6..690b434e4af316015bcc7aa724d0ce135e938e4c 100644 (file)
@@ -4352,7 +4352,7 @@ static void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction
         InkToggleAction* act = ink_toggle_action_new( "TweakPressureAction",
                                                       _("Pressure"),
                                                       _("Use the pressure of the input device to alter the force of tweak action"),
-                                                      "use_pressure",
+                                                      INKSCAPE_ICON_DRAW_USE_PRESSURE,
                                                       Inkscape::ICON_SIZE_DECORATION );
         gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
         g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(sp_tweak_pressure_state_changed), NULL);