Skip to content

Commit

Permalink
merge from clipjump-addons
Browse files Browse the repository at this point in the history
  • Loading branch information
aviaryan committed May 21, 2015
1 parent e09212b commit 8aaa52a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Clipjump.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ global VERSION := "12"
global CONFIGURATION_FILE := "settings.ini"

ini_LANG := ini_read("System", "lang")
if !ini_LANG
ini_LANG := "english"
global TXT := Translations_load("languages/" ini_LANG ".txt") ;Load translations

global UPDATE_FILE := "http://sourceforge.net/projects/clipjump/files/version.txt/download"
Expand Down
22 changes: 12 additions & 10 deletions plugins/pformat.commonformats.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
;@Plugin-Description Only works for Text ([Text] or [File/Folder]) type data.
;@Plugin-Author Avi
;@Plugin-Tags pformat
;@Plugin-version 0.6
;@Plugin-version 0.61
;@Plugin-Previewable 0

;@Plugin-Param1 The Input Text
Expand All @@ -21,15 +21,15 @@ plugin_pformat_commonformats_None(zin){
return zin , STORE.ClipboardChanged := 0
}

plugin_pformat_commonformats_htmlList(zin){
plugin_pformat_commonformats_HTMLList(zin){
return RegExReplace( Trim(zin, "`r`n "), "m`a)^", "<li>") , STORE.ClipboardChanged := 1
}

plugin_pformat_commonformats_BBCodeList(zin){
return RegExReplace( Trim(zin, "`r`n "), "m`a)^", "[*]") , STORE.ClipboardChanged := 1
}

plugin_pformat_commonformats_NoFormatting(zin){
plugin_pformat_commonformats_TrimFormatting(zin){
return RTrim(zin, "`r`n") , STORE.ClipboardChanged := 1
}

Expand All @@ -51,8 +51,7 @@ plugin_pformat_commonformats_TrimWhiteSpace(zin){
}

plugin_pformat_commonformats_DeHTML(zin){
STORE["commonformats_DeHTML"] := "Deactivates HTML code. All ("" & < >) are translated to (&quot; &amp; &lt; &gt;) and linefeed \n to <br>. If you don't want <br>, apply changes and "
. "then RegexReplace <br> with none."
STORE["commonformats_DeHTML"] := "Deactivates HTML code. All ("" & < >) are translated to (&quot; &amp; &lt; &gt;) and linefeed \n to <br>."
Transform, o, HTML, % zin
return plugin_pformat_commonformats_TrimWhiteSpace(o)
}
Expand All @@ -64,8 +63,9 @@ plugin_pformat_commonformats_UPPERCASE(zin){

#Include *i %A_ScriptDir%\plugins\pformat.commonformats.lib\unhtml.ahk
plugin_pformat_commonformats_UnHTML(zin){
STORE["commonformats_unhtml"] := "Removes tags from HTML code and converts unicode sequences to characters"
return unhtml(zin) , STORE.ClipboardChanged := 1
STORE["commonformats_unhtml"] := "Converts HTML code to Plain Text. Removes tags from HTML code and converts unicode sequences to characters."
StringReplace, zin, zin, % "<br>", % "`n", All
return Trim(unhtml(zin), "`n`r`t ") , STORE.ClipboardChanged := 1
}

plugin_pformat_commonformats_RegexReplace(zin, zps){
Expand Down Expand Up @@ -99,7 +99,7 @@ plugin_pformat_commonformats(zin){
Gui, Add, Edit, x+10 w500 h200 vzedit +multi, % zin

Gui, Add, GroupBox, xs y+5 h70 w650, Info
Gui, Add, Edit, xp+5 yp+15 w640 h50 +ReadOnly +Disabled -Border vzinfo,
Gui, Add, Edit, xp+5 yp+15 w640 h50 +ReadOnly -Border vzinfo,

Gui, Add, Button, xs y+40 +Default, OK
Gui, Add, Button, x+30 yp gplugin_pformat_commonformats_apply, % TXT.SET_apply
Expand All @@ -108,7 +108,7 @@ plugin_pformat_commonformats(zin){
Gui, Font, s10, Consolas
Gui, Add, Edit, x+10 yp-2 w441 h40 gzinputfield vzinputfield,
Gui, Font
Gui, commonformat:Show,, Choose Format
Gui, commonformat:Show,, % "Choose Format"

if !FileExist(ztF)
{
Expand Down Expand Up @@ -169,8 +169,10 @@ zchosenformat:
zFobj := Func("plugin_pformat_commonformats_" zchosenformat)
if ( zFobj.MaxParams < 2 )
GuiControl, commonformat:Disable, Edit3
else
else {
GuiControl, commonformat:Enable, Edit3
GuiControl, commonformat:Focus, Edit3
}
gosub zinputfield
}
return
Expand Down

0 comments on commit 8aaa52a

Please sign in to comment.