Skip to content

Commit

Permalink
SQLyog GA 12.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
maryamwy committed May 26, 2016
1 parent e650156 commit c7a2d3d
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 19 deletions.
2 changes: 1 addition & 1 deletion include/SQLyog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "Size Griper",IDC_GRIP,390,140,40,10
LTEXT "Use&r",IDC_UM_USER,7,9,16,8
COMBOBOX IDC_USERCOMBO,25,7,112,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_USERCOMBO,25,7,112,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_OBTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,7,29,130,107
CONTROL "",IDC_PRIVOBTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,7,140,130,68
CONTROL "Show only pr&ivileged objects",IDC_PRIVILEGEDCHECK,
Expand Down
2 changes: 2 additions & 0 deletions include/UserManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ class UserManager
*/
void OnUserComboChange();

void OnHandleEditChange();

///Initializes the tree view
/**
@returns void
Expand Down
2 changes: 1 addition & 1 deletion include/Version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MAJOR_VERSION_INT 12
#define MINOR_VERSION_INT 2
#define UPDATE_VERSION_INT 2
#define UPDATE_VERSION_INT 3
#define RELEASE_VERSION_INT 0
#define EXTRAINFO ""
21 changes: 16 additions & 5 deletions src/CopyDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3506,19 +3506,30 @@ CopyDatabase::ExportSP(const wyChar *db, const wyChar *sp, wyBool isproc)
m_newtargettunnel->mysql_free_result(res);
}

else
{
if(isproc)
{
pattern.AddSprintf("PROCEDURE");
extra = 9;
}
else
{
pattern.AddSprintf("FUNCTION");
extra = 8;
}

}

if(isproc)
{
pattern.AddSprintf("PROCEDURE");
extra = 9;
query.Sprintf("show create procedure `%s`.`%s`", db, sp);
}
else
{
pattern.AddSprintf("FUNCTION");
extra = 8;
query.Sprintf("show create function `%s`.`%s`", db, sp);
}

res = SjaExecuteAndGetResult(m_newsrctunnel, &m_newsrcmysql, query);
if(!res)
{
Expand Down
2 changes: 1 addition & 1 deletion src/FrameWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5216,7 +5216,7 @@ FrameWindow::InitCreateObjectDlg(HWND hwnd, wyChar *object)
}
else if(stricmp(object, "createdb") == 0)
{
SendMessage(GetDlgItem(hwnd, IDC_DBEDIT), EM_LIMITTEXT, 64, 0);
SendMessage(GetDlgItem(hwnd, IDC_DBEDIT), EM_LIMITTEXT, 63, 0);
if(GetActiveWin()->m_ismysql41 == wyFalse)
{
EnableWindow((GetDlgItem(hwnd, IDC_CHARSETCOMBO)), FALSE);
Expand Down
16 changes: 11 additions & 5 deletions src/FrameWindowHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ wyChar *
FormatResultSet(Tunnel * tunnel, MYSQL_RES * myres, MYSQL_FIELD * myfield, MySQLDataEx *mdata)
{
wyUInt32 count, ncounter = 0, *pfieldlenarr, nfieldlen = 0, nmaxlen = 0;
wyInt32 dwtitlecount, dwcurrline = 1, dwlinenum, dwlinenumtemp;
wyInt32 dwtitlecount, dwcurrline = 1,dwmaxline = 1, dwlinenum, dwlinenumtemp;
wyUInt32 dwcharpoint;
wyInt32 dwnewlinepoint, dwheapsize, dwlast=0, dwsize;
wyChar sznull[] = STRING_NULL;
Expand Down Expand Up @@ -715,10 +715,14 @@ wyChar *
// now change the initial poition.
dwlinenumtemp++;
dwnewlinepoint = 0;

// first pad up everything in the new line to spaces.
VerifyMemory(&result, &totalsize, (dwlinenumtemp * dwtitlecount) + extrapad + totalpad, dwtitlecount);
memset(result + (dwlinenumtemp * dwtitlecount) + extrapad + totalpad, ' ', dwtitlecount);
if(ncounter==0 || dwmaxline < dwlinenumtemp )
{
VerifyMemory(&result, &totalsize, (dwlinenumtemp * dwtitlecount) + extrapad + totalpad, dwtitlecount);
memset(result + (dwlinenumtemp * dwtitlecount) + extrapad + totalpad, ' ', dwtitlecount);
dwmaxline = dwlinenumtemp;
}
dwcurrline = dwlinenumtemp;

// Now check if there is another \r or \n then we take it as one only.
Expand Down Expand Up @@ -762,7 +766,9 @@ wyChar *
*(result + (dwtitlecount * dwcurrline) + pfieldlenarr[myres->field_count] + totalpad - extrapad) = '\r';
*(result + (dwtitlecount * dwcurrline) + pfieldlenarr[myres->field_count] + 1 + totalpad - extrapad) = '\n';
}
dwlast = (dwtitlecount * dwcurrline) + pfieldlenarr[myres->field_count] + 1 + totalpad - extrapad;


dwlast = (dwtitlecount * dwmaxline) + pfieldlenarr[myres->field_count] + 1 + totalpad - extrapad;
isfirstline = wyTrue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/FrameWindowSplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FrameWindowSplitter::FrameWindowSplitter(HWND hwnd, wyUInt32 pleftortoppercent)
m_lastleftpercent = 0;
m_lasttoppercent = 35;
m_hwndparent = hwnd;
m_width = 2; //GetSystemMetrics(SM_CXSIZEFRAME) + 1;
m_width = 4; //GetSystemMetrics(SM_CXSIZEFRAME) + 1;
m_x = 0;
m_prevstyle = 0;
m_hdc = NULL;
Expand Down
6 changes: 4 additions & 2 deletions src/GUIHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8315,14 +8315,16 @@ ConvertStringToBinary(wyChar *data, wyUInt32 len, wyInt32 colwidth, wyString *s
if(!ascii)
{
isnullchar = wyTrue;
revstr.Replace(0, 0, "00000000");
isnullchar = wyFalse;
continue;
}
//Adding 0s if NULL character inbetween
if(isnullchar == wyTrue)
/*if(isnullchar == wyTrue)
{
revstr.Replace(0, 0, "00000000");
isnullchar = wyFalse;
}
}*/
//For handling the BIT column width
//if(colwidth > 0)
//{
Expand Down
2 changes: 1 addition & 1 deletion src/TabEditorSplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TabEditorSplitter::TabEditorSplitter(HWND hwnd, wyUInt32 ptoppercent)
m_pctabeditor = NULL;
m_ischanged = wyFalse;
m_isdlgsplitter = wyFalse;
m_height = 2; //GetSystemMetrics(SM_CXSIZEFRAME) + 1;
m_height = 4; //GetSystemMetrics(SM_CXSIZEFRAME) + 1;
m_hwndprevfocus = NULL;
m_y = 0;
m_hdc = NULL;
Expand Down
36 changes: 34 additions & 2 deletions src/UserManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,11 @@ UserManager::OnWMCommand(WPARAM wparam, LPARAM lparam)
m_ispasswordchanged = wyTrue;
}

if(LOWORD(wparam)== IDC_USERCOMBO){
OnHandleEditChange();

}

return wyTrue;
}

Expand Down Expand Up @@ -905,8 +910,7 @@ UserManager::OnWMCommand(WPARAM wparam, LPARAM lparam)
break;

case IDC_USERCOMBO:

if(HIWORD(wparam) == CBN_SELCHANGE)
if(HIWORD(wparam) == CBN_SELCHANGE)
{
OnUserComboChange();
}
Expand Down Expand Up @@ -1357,6 +1361,34 @@ UserManager::OnUserComboChange()
OnTreeViewSelChanged();
}

void
UserManager::OnHandleEditChange()
{
int id;
int len = -1,textlen=-1;
wyWChar str[70] = {0};
wyWChar textstr[70] = {0};
HWND hwndusercombo = GetDlgItem(m_hwnd, IDC_USERCOMBO);
len = GetWindowText(hwndusercombo, str, 65);
id = SendMessage(hwndusercombo, CB_SELECTSTRING, -1, (LPARAM)str);
if(id != CB_ERR)
{
if(len==1)
SendMessage(hwndusercombo, CB_SHOWDROPDOWN, FALSE, NULL);

SendMessage(hwndusercombo, CB_SHOWDROPDOWN, TRUE, NULL);
SetCursor(LoadCursor(NULL, IDC_ARROW));
SetWindowText(hwndusercombo,str);
SendMessage(hwndusercombo, CB_SETEDITSEL, NULL, MAKELPARAM(len,len));
}
else
{
SetWindowText(hwndusercombo,str);
SendMessage(hwndusercombo, CB_SETEDITSEL,NULL, MAKELPARAM(len-1,len));
}

}

//function shows/hides the respective tree view
void
UserManager::ShowAllObjects(wyBool show)
Expand Down

0 comments on commit c7a2d3d

Please sign in to comment.