Skip to content

Commit

Permalink
SQLyog 12.3.1 GA
Browse files Browse the repository at this point in the history
  • Loading branch information
wyaadarsh committed Nov 4, 2016
1 parent 33c8ed8 commit 0a39ff0
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 74 deletions.
2 changes: 1 addition & 1 deletion include/SQLyog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ BEGIN
GROUPBOX "Transaction Options",IDC_TRANSACTION,4,185,247,36
CONTROL "Prompt when query causing implicit commit is executed",IDC_PROMPTTRANSACTION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,196,197,10
CONTROL "Prompt when closing sessing or program if transaction is active.",IDC_PROMPTCLOSETRANSACTION,
CONTROL "Prompt when closing session or program if transaction is active.",IDC_PROMPTCLOSETRANSACTION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,208,212,10
END

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 3
#define UPDATE_VERSION_INT 0
#define UPDATE_VERSION_INT 1
#define RELEASE_VERSION_INT 0
#define EXTRAINFO ""
141 changes: 72 additions & 69 deletions src/CCustomComboBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,81 +368,84 @@ CCustomComboBox::OnHandleEditChange(){
wyWChar str[70] = {0},*temp=NULL;
wyInt32 id = -1;
wyInt32 len = -1;
int i, status=0,index; //status flag is set when atleast one match found

GetWindowText(m_hwndCombo, str, 65);
len=wcslen(str);
if(len)
{
if(len==1)
SendMessage(m_hwndCombo, CB_SHOWDROPDOWN, FALSE, NULL);

for(i=0;i<m_conncount;i++)
{
if(m_connectionlist[i].m_connectionname.GetLength()==0)
continue;
temp = StrStrI(m_connectionlist[i].m_connectionname.GetAsWideChar(),str);
if(temp)
status=1;
int i, status=0, index, ret; //status flag is set when atleast one match found
wyWChar directory[MAX_PATH + 1], *lpfileport=0;
wyString dirstr;

ret = SearchFilePath(L"sqlyog", L".ini", MAX_PATH, directory, &lpfileport);
if(ret == 0)
return wyFalse;
dirstr.SetAs(directory);
GetWindowText(m_hwndCombo, str, 65);
len=wcslen(str);
if(len)
{
if(len==1)
SendMessage(m_hwndCombo, CB_SHOWDROPDOWN, FALSE, NULL);

for(i=0;i<m_conncount;i++)
{
if(m_connectionlist[i].m_connectionname.GetLength()==0)
continue;
temp = StrStrI(m_connectionlist[i].m_connectionname.GetAsWideChar(),str);
if(temp)
status=1;


if(temp && m_connectionlist[i].m_dropdown == wyFalse)
{
index=SendMessage(m_hwndCombo, CB_ADDSTRING, 0,(LPARAM)m_connectionlist[i].m_connectionname.GetAsWideChar());
//MessageBox(hcb,connlist[i].itemvalue.GetAsWideChar(),connlist[i].conn_name.GetAsWideChar(),MB_OK);
VERIFY(SendMessage(m_hwndCombo, CB_SETITEMDATA, index,m_connectionlist[i].m_itemvalue.GetAsInt32()));
m_connectionlist[i].m_dropdown=wyTrue;
}

if(!temp && m_connectionlist[i].m_dropdown==wyTrue)
{
int index_delete=SendMessage(m_hwndCombo,CB_FINDSTRINGEXACT,-1,(LPARAM)m_connectionlist[i].m_connectionname.GetAsWideChar());
SendMessage(m_hwndCombo, CB_DELETESTRING, index_delete,NULL);
m_connectionlist[i].m_dropdown=wyFalse;
}
}
if(temp && m_connectionlist[i].m_dropdown == wyFalse)
{
index=SendMessage(m_hwndCombo, CB_ADDSTRING, 0,(LPARAM)m_connectionlist[i].m_connectionname.GetAsWideChar());
//MessageBox(hcb,connlist[i].itemvalue.GetAsWideChar(),connlist[i].conn_name.GetAsWideChar(),MB_OK);
VERIFY(SendMessage(m_hwndCombo, CB_SETITEMDATA, index,m_connectionlist[i].m_itemvalue.GetAsInt32()));
m_connectionlist[i].m_dropdown=wyTrue;

}

if(!temp && m_connectionlist[i].m_dropdown==wyTrue)
{
int index_delete=SendMessage(m_hwndCombo,CB_FINDSTRINGEXACT,-1,(LPARAM)m_connectionlist[i].m_connectionname.GetAsWideChar());
SendMessage(m_hwndCombo, CB_DELETESTRING, index_delete,NULL);
m_connectionlist[i].m_dropdown=wyFalse;
}
}

}
if(!len || status==0)
{
SendMessage(m_hwndCombo, CB_SETCURSEL, -1, 0);
for(i=0;i<m_conncount;i++)
{
if(m_connectionlist[i].m_connectionname.GetLength())
{
if(m_connectionlist[i].m_dropdown == wyFalse)
{
index=SendMessage(m_hwndCombo, CB_ADDSTRING, 0,(LPARAM)m_connectionlist[i].m_connectionname.GetAsWideChar());
VERIFY(SendMessage(m_hwndCombo, CB_SETITEMDATA, index, (LPARAM)m_connectionlist[i].m_itemvalue.GetAsInt32()));
m_connectionlist[i].m_dropdown=wyTrue;
}
if(!len || status==0)
{
SendMessage(m_hwndCombo, CB_SETCURSEL, -1, 0);
for(i=0;i<m_conncount;i++)
{
if(m_connectionlist[i].m_connectionname.GetLength())
{

if(m_connectionlist[i].m_dropdown == wyFalse)
{
index=SendMessage(m_hwndCombo, CB_ADDSTRING, 0,(LPARAM)m_connectionlist[i].m_connectionname.GetAsWideChar());
VERIFY(SendMessage(m_hwndCombo, CB_SETITEMDATA, index, (LPARAM)m_connectionlist[i].m_itemvalue.GetAsInt32()));
m_connectionlist[i].m_dropdown=wyTrue;
}

}
}

}
else
{

if(SendMessage(m_hwndCombo, CB_GETDROPPEDSTATE, NULL, NULL) == FALSE)
{
if(m_showDropDown == wyTrue)
{
SendMessage(m_hwndCombo, CB_SHOWDROPDOWN, TRUE, NULL);
SetCursor(LoadCursor(NULL, IDC_ARROW));
}
else
m_showDropDown = wyTrue;

}
SendMessage(m_hwndCombo, CB_SETEDITSEL, NULL, MAKELPARAM(-1,0));
}
}
pGlobals->m_pcmainwin->m_connection->PopulateColorArray(m_hwndCombo, &dirstr);
}
else
{
pGlobals->m_pcmainwin->m_connection->PopulateColorArray(m_hwndCombo, &dirstr);
if(SendMessage(m_hwndCombo, CB_GETDROPPEDSTATE, NULL, NULL) == FALSE)
{
if(m_showDropDown == wyTrue)
{
SendMessage(m_hwndCombo, CB_SHOWDROPDOWN, TRUE, NULL);
SetCursor(LoadCursor(NULL, IDC_ARROW));
}
else
m_showDropDown = wyTrue;
}
SendMessage(m_hwndCombo, CB_SETEDITSEL, NULL, MAKELPARAM(-1,0));

}


return wyTrue;
}

return wyTrue;
}

// function handles WM_COMMAND message to the Custom Combo Control
Expand Down
6 changes: 3 additions & 3 deletions src/GUIHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7910,15 +7910,15 @@ OnDrawConnNameCombo(HWND hwndcombo, LPDRAWITEMSTRUCT lpds, wyBool isconndbname)
wyInt32 ncount, i, j, ret;
wyString connstr, dirstr, conncount;
wyInt32 topindex;
wyWChar directory[MAX_PATH + 1], *lpfileport=0;
/*wyWChar directory[MAX_PATH + 1], *lpfileport=0;

ret = SearchFilePath(L"sqlyog", L".ini", MAX_PATH, directory, &lpfileport);
if(ret == 0)
return wyFalse;
dirstr.SetAs(directory);
*/
//fill the combobox with options
ncount = SendMessage(hwndcombo, CB_GETCOUNT, 0, 0);

switch (lpds->itemAction)
{
case ODA_DRAWENTIRE:
Expand All @@ -7933,7 +7933,7 @@ OnDrawConnNameCombo(HWND hwndcombo, LPDRAWITEMSTRUCT lpds, wyBool isconndbname)
topindex = 0;
j = ncount;
}
pGlobals->m_pcmainwin->m_connection->PopulateColorArray(hwndcombo, &dirstr);
// pGlobals->m_pcmainwin->m_connection->PopulateColorArray(hwndcombo, &dirstr);
for(i = topindex; i < j; i++)
{
if(isconndbname == wyTrue)
Expand Down

0 comments on commit 0a39ff0

Please sign in to comment.