From 0f830027a3ee9c02bced30b8acdbb31a01296615 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sun, 25 Jan 2009 17:04:57 +0000 Subject: [PATCH] * GuiApplication.cpp: - use the first command in sequence as icon name for command-alternatives. * lib/ui/stdtoolbars.inc: - use command-alternatives for the alignment buttons in the tabular toolbar (bug 5709). * lib/images/tabular-feature_align-*.png: * lib/images/tabular-feature_valign-*.png: - rename to tabular-feature_m-[v]align-*.png: git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28280 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/scons/scons_manifest.py | 12 ++++++------ lib/Makefile.am | 12 ++++++------ ...enter.png => tabular-feature_m-align-center.png} | Bin ...gn-left.png => tabular-feature_m-align-left.png} | Bin ...-right.png => tabular-feature_m-align-right.png} | Bin ...ttom.png => tabular-feature_m-valign-bottom.png} | Bin ...ddle.png => tabular-feature_m-valign-middle.png} | Bin ...ign-top.png => tabular-feature_m-valign-top.png} | Bin lib/ui/stdtoolbars.inc | 12 ++++++------ src/frontends/qt4/GuiApplication.cpp | 8 ++++++++ 10 files changed, 26 insertions(+), 18 deletions(-) rename lib/images/{tabular-feature_align-center.png => tabular-feature_m-align-center.png} (100%) rename lib/images/{tabular-feature_align-left.png => tabular-feature_m-align-left.png} (100%) rename lib/images/{tabular-feature_align-right.png => tabular-feature_m-align-right.png} (100%) rename lib/images/{tabular-feature_valign-bottom.png => tabular-feature_m-valign-bottom.png} (100%) rename lib/images/{tabular-feature_valign-middle.png => tabular-feature_m-valign-middle.png} (100%) rename lib/images/{tabular-feature_valign-top.png => tabular-feature_m-valign-top.png} (100%) diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index 3362433b23..6815e591b8 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -1444,9 +1444,9 @@ lib_images_files = Split(''' split-view_horizontal.png split-view_vertical.png standard.png - tabular-feature_align-center.png - tabular-feature_align-left.png - tabular-feature_align-right.png + tabular-feature_m-align-center.png + tabular-feature_m-align-left.png + tabular-feature_m-align-right.png tabular-feature_append-column.png tabular-feature_append-row.png tabular-feature_delete-column.png @@ -1464,9 +1464,9 @@ lib_images_files = Split(''' tabular-feature_toggle-rotate-cell.png tabular-feature_toggle-rotate-tabular.png tabular-feature_unset-all-lines.png - tabular-feature_valign-bottom.png - tabular-feature_valign-middle.png - tabular-feature_valign-top.png + tabular-feature_m-valign-bottom.png + tabular-feature_m-valign-middle.png + tabular-feature_m-valign-top.png tabular-insert.png thesaurus-entry.png toolbar-toggle_math.png diff --git a/lib/Makefile.am b/lib/Makefile.am index 4531383192..5ad02e30ad 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -366,9 +366,9 @@ dist_images_DATA = \ images/split-view_horizontal.png \ images/split-view_vertical.png \ images/standard.png \ - images/tabular-feature_align-center.png \ - images/tabular-feature_align-left.png \ - images/tabular-feature_align-right.png \ + images/tabular-feature_m-align-center.png \ + images/tabular-feature_m-align-left.png \ + images/tabular-feature_m-align-right.png \ images/tabular-feature_append-column.png \ images/tabular-feature_append-row.png \ images/tabular-feature_delete-column.png \ @@ -386,9 +386,9 @@ dist_images_DATA = \ images/tabular-feature_toggle-rotate-cell.png \ images/tabular-feature_toggle-rotate-tabular.png \ images/tabular-feature_unset-all-lines.png \ - images/tabular-feature_valign-bottom.png \ - images/tabular-feature_valign-middle.png \ - images/tabular-feature_valign-top.png \ + images/tabular-feature_m-valign-bottom.png \ + images/tabular-feature_m-valign-middle.png \ + images/tabular-feature_m-valign-top.png \ images/tabular-insert.png \ images/thesaurus-entry.png \ images/toolbar-toggle_math.png \ diff --git a/lib/images/tabular-feature_align-center.png b/lib/images/tabular-feature_m-align-center.png similarity index 100% rename from lib/images/tabular-feature_align-center.png rename to lib/images/tabular-feature_m-align-center.png diff --git a/lib/images/tabular-feature_align-left.png b/lib/images/tabular-feature_m-align-left.png similarity index 100% rename from lib/images/tabular-feature_align-left.png rename to lib/images/tabular-feature_m-align-left.png diff --git a/lib/images/tabular-feature_align-right.png b/lib/images/tabular-feature_m-align-right.png similarity index 100% rename from lib/images/tabular-feature_align-right.png rename to lib/images/tabular-feature_m-align-right.png diff --git a/lib/images/tabular-feature_valign-bottom.png b/lib/images/tabular-feature_m-valign-bottom.png similarity index 100% rename from lib/images/tabular-feature_valign-bottom.png rename to lib/images/tabular-feature_m-valign-bottom.png diff --git a/lib/images/tabular-feature_valign-middle.png b/lib/images/tabular-feature_m-valign-middle.png similarity index 100% rename from lib/images/tabular-feature_valign-middle.png rename to lib/images/tabular-feature_m-valign-middle.png diff --git a/lib/images/tabular-feature_valign-top.png b/lib/images/tabular-feature_m-valign-top.png similarity index 100% rename from lib/images/tabular-feature_valign-top.png rename to lib/images/tabular-feature_m-valign-top.png diff --git a/lib/ui/stdtoolbars.inc b/lib/ui/stdtoolbars.inc index 889a8a622e..a76e02011f 100644 --- a/lib/ui/stdtoolbars.inc +++ b/lib/ui/stdtoolbars.inc @@ -126,13 +126,13 @@ ToolbarSet Item "Set all lines" "tabular-feature set-all-lines" Item "Unset all lines" "tabular-feature unset-all-lines" Separator - Item "Align left" "tabular-feature align-left" - Item "Align center" "tabular-feature align-center" - Item "Align right" "tabular-feature align-right" + Item "Align left" "command-alternatives tabular-feature m-align-left;tabular-feature align-left" + Item "Align center" "command-alternatives tabular-feature m-align-center;tabular-feature align-center" + Item "Align right" "command-alternatives tabular-feature m-align-right;tabular-feature align-right" Separator - Item "Align top" "tabular-feature valign-top" - Item "Align middle" "tabular-feature valign-middle" - Item "Align bottom" "tabular-feature valign-bottom" + Item "Align top" "command-alternatives tabular-feature m-valign-top;tabular-feature valign-top" + Item "Align middle" "command-alternatives tabular-feature m-valign-middle;tabular-feature valign-middle" + Item "Align bottom" "command-alternatives tabular-feature m-valign-bottom;tabular-feature valign-bottom" Separator Item "Rotate cell" "tabular-feature toggle-rotate-cell" Item "Rotate table" "tabular-feature toggle-rotate-tabular" diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index d3ca5d9d9c..786fd1404f 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -312,6 +312,14 @@ QString iconName(FuncRequest const & f, bool unknown) path = "commands/"; name1 = toqstr(f.argument()); break; + case LFUN_COMMAND_ALTERNATIVES: { + // use the first of the alternative commands + docstring firstcom; + docstring dummy = split(f.argument(), firstcom, ';'); + name1 = toqstr(firstcom); + name1.replace(' ', '_'); + break; + } default: name2 = toqstr(lyxaction.getActionName(f.action)); name1 = name2; -- 2.39.2