Created
December 20, 2015 22:27
-
-
Save ezequielpereira/120e962e628782b56b3c to your computer and use it in GitHub Desktop.
Patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 3b19bd2b572342560689f732bc595a2f9c64e965 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?Ezequiel=20Pereira=20L=C3=B3pez?= <[email protected]> | |
Date: Sun, 20 Dec 2015 09:40:48 -0300 | |
Subject: [PATCH] Added Merge and Split options as actions | |
* Now the Merge and Split options can be accessed directly as actions | |
--- | |
src/af/xap/cocoa/xap_CocoaTools.h | 12 ++++++------ | |
src/wp/ap/xp/ap_Toolbar_ActionSet.cpp | 15 +++++++++++---- | |
2 files changed, 17 insertions(+), 10 deletions(-) | |
diff --git a/src/af/xap/cocoa/xap_CocoaTools.h b/src/af/xap/cocoa/xap_CocoaTools.h | |
index 7c77b6c..243056c 100644 | |
--- a/src/af/xap/cocoa/xap_CocoaTools.h | |
+++ b/src/af/xap/cocoa/xap_CocoaTools.h | |
@@ -47,12 +47,12 @@ defn(oTB_search, 0, AP_STRING_ID__FIRST__) | |
defn(oTB_search_replace, 0, AP_STRING_ID__FIRST__) | |
defn(oTB_spellcheck, AP_TOOLBAR_ID_SPELLCHECK, AP_STRING_ID_TOOLBAR_TOOLTIP_SPELLCHECK) | |
defn(oTB_split_cells, AP_TOOLBAR_ID_SPLIT_CELLS, AP_STRING_ID_TOOLBAR_TOOLTIP_SPLIT_CELLS) | |
-defn(oTB_SplitAbove, 0, AP_STRING_ID__FIRST__) | |
-defn(oTB_SplitBelow, 0, AP_STRING_ID__FIRST__) | |
-defn(oTB_SplitHoriMid, 0, AP_STRING_ID__FIRST__) | |
-defn(oTB_SplitLeft, 0, AP_STRING_ID__FIRST__) | |
-defn(oTB_SplitRight, 0, AP_STRING_ID__FIRST__) | |
-defn(oTB_SplitVertMid, 0, AP_STRING_ID__FIRST__) | |
+defn(oTB_SplitAbove, AP_TOOLBAR_ID_SPLITABOVE, AP_STRING_ID_TOOLBAR_TOOLTIP_SPLITABOVE) | |
+defn(oTB_SplitBelow, AP_TOOLBAR_ID_SPLITBELOW, AP_STRING_ID_TOOLBAR_TOOLTIP_SPLITBELOW) | |
+defn(oTB_SplitHoriMid, AP_TOOLBAR_ID_SPLITHORIMID, AP_STRING_ID_TOOLBAR_TOOLTIP_SPLITHORIMID) | |
+defn(oTB_SplitLeft, AP_TOOLBAR_ID_SPLITLEFT, AP_STRING_ID_TOOLBAR_TOOLTIP_SPLITLEFT) | |
+defn(oTB_SplitRight, AP_TOOLBAR_ID_SPLITRIGHT, AP_STRING_ID_TOOLBAR_TOOLTIP_SPLITRIGHT) | |
+defn(oTB_SplitVertMid, AP_TOOLBAR_ID_SPLITVERTMID, AP_STRING_ID_TOOLBAR_TOOLTIP_SPLITVERTMID) | |
defn(oTB_stock_paint, AP_TOOLBAR_ID_FMTPAINTER, AP_STRING_ID_TOOLBAR_TOOLTIP_FMTPAINTER) | |
defn(oTB_symbol, AP_TOOLBAR_ID_INSERT_SYMBOL, AP_STRING_ID_TOOLBAR_TOOLTIP_INSERT_SYMBOL) | |
defn(oTB_text_align_left, AP_TOOLBAR_ID_ALIGN_LEFT, AP_STRING_ID_TOOLBAR_TOOLTIP_ALIGN_LEFT) | |
diff --git a/src/wp/ap/xp/ap_Toolbar_ActionSet.cpp b/src/wp/ap/xp/ap_Toolbar_ActionSet.cpp | |
index 02b5c39..16fac31 100644 | |
--- a/src/wp/ap/xp/ap_Toolbar_ActionSet.cpp | |
+++ b/src/wp/ap/xp/ap_Toolbar_ActionSet.cpp | |
@@ -178,10 +178,17 @@ EV_Toolbar_ActionSet * AP_CreateToolbarActionSet(void) | |
_s(AP_TOOLBAR_ID_MERGE_CELLS, EV_TBIT_PushButton, "mergeCells", AV_CHG_ALL, ap_ToolbarGetState_Table); | |
_s(AP_TOOLBAR_ID_SPLIT_CELLS, EV_TBIT_PushButton, "splitCells", AV_CHG_ALL, ap_ToolbarGetState_TableMerged); | |
- _s(AP_TOOLBAR_ID_MERGELEFT, EV_TBIT_PushButton, "mergeCells", AV_CHG_ALL, ap_ToolbarGetState_Table); // FIXME | |
- _s(AP_TOOLBAR_ID_MERGERIGHT, EV_TBIT_PushButton, "mergeCells", AV_CHG_ALL, ap_ToolbarGetState_Table); // FIXME | |
- _s(AP_TOOLBAR_ID_MERGEABOVE, EV_TBIT_PushButton, "mergeCells", AV_CHG_ALL, ap_ToolbarGetState_Table); // FIXME | |
- _s(AP_TOOLBAR_ID_MERGEBELOW, EV_TBIT_PushButton, "mergeCells", AV_CHG_ALL, ap_ToolbarGetState_Table); // FIXME | |
+ _s(AP_TOOLBAR_ID_MERGELEFT, EV_TBIT_PushButton, "mergeCellsLeft", AV_CHG_ALL, ap_ToolbarGetState_Table); | |
+ _s(AP_TOOLBAR_ID_MERGERIGHT, EV_TBIT_PushButton, "mergeCellsRight", AV_CHG_ALL, ap_ToolbarGetState_Table); | |
+ _s(AP_TOOLBAR_ID_MERGEABOVE, EV_TBIT_PushButton, "mergeCellsAbove", AV_CHG_ALL, ap_ToolbarGetState_Table); | |
+ _s(AP_TOOLBAR_ID_MERGEBELOW, EV_TBIT_PushButton, "mergeCellsBelow", AV_CHG_ALL, ap_ToolbarGetState_Table); | |
+ | |
+ _s(AP_TOOLBAR_ID_SPLITABOVE, EV_TBIT_PushButton, "oTB_SplitAbove", AV_CHG_ALL, ap_ToolbarGetState_TableMerged); | |
+ _s(AP_TOOLBAR_ID_SPLITBELOW, EV_TBIT_PushButton, "splitCellsBelow", AV_CHG_ALL, ap_ToolbarGetState_TableMerged); | |
+ _s(AP_TOOLBAR_ID_SPLITHORIMID, EV_TBIT_PushButton, "splitCellsHoriMid", AV_CHG_ALL, ap_ToolbarGetState_TableMerged); | |
+ _s(AP_TOOLBAR_ID_SPLITLEFT, EV_TBIT_PushButton, "splitCellsLeft", AV_CHG_ALL, ap_ToolbarGetState_TableMerged); | |
+ _s(AP_TOOLBAR_ID_SPLITRIGHT, EV_TBIT_PushButton, "splitCellsRight", AV_CHG_ALL, ap_ToolbarGetState_TableMerged); | |
+ _s(AP_TOOLBAR_ID_SPLITVERTMID, EV_TBIT_PushButton, "splitCellsVertMid", AV_CHG_ALL, ap_ToolbarGetState_TableMerged); | |
_s(AP_TOOLBAR_ID_REVISIONS_NEW, EV_TBIT_PushButton, "revisionNew", AV_CHG_NONE, NULL ); | |
_s(AP_TOOLBAR_ID_REVISIONS_SELECT, EV_TBIT_PushButton, "revisionSelect", AV_CHG_ALL, ap_ToolbarGetState_HasRevisions ); | |
-- | |
1.9.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment