Added:
branches/guffert/setupgui/callbacks.c
branches/guffert/setupgui/callbacks.h
branches/guffert/setupgui/utils.c
branches/guffert/setupgui/utils.h
branches/guffert/setupgui/windows/
Removed:
branches/guffert/setupgui/dialog/
branches/guffert/setupgui/odbcdialogparams/
Modified:
branches/guffert/setupgui/CMakeLists.txt
branches/guffert/setupgui/ConfigDSN.c
branches/guffert/setupgui/windows/TabCtrl.cpp
branches/guffert/setupgui/windows/TabCtrl.h
branches/guffert/setupgui/windows/main.cpp
branches/guffert/setupgui/windows/odbcdialogparams.cpp
branches/guffert/setupgui/windows/odbcdialogparams.h
branches/guffert/setupgui/windows/tooltip.cpp
Log:
More reorganization of new setup lib files, putting windows files in one
directory and adding standard copyright headers.
Modified: branches/guffert/setupgui/CMakeLists.txt
===================================================================
--- branches/guffert/setupgui/CMakeLists.txt 2007-11-15 18:38:27 UTC (rev 867)
+++ branches/guffert/setupgui/CMakeLists.txt 2007-11-15 19:12:12 UTC (rev 868)
@@ -22,29 +22,28 @@
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
-ADD_LIBRARY(myodbc5S SHARED
- dialog/callbacks.c
- dialog/callbacks.h
- dialog/utils.c
- dialog/utils.h
- odbcdialogparams/main.cpp
- odbcdialogparams/odbcdialogparams.cpp
- odbcdialogparams/odbcdialogparams.h
- odbcdialogparams/odbcdialogparams.rc
- odbcdialogparams/resource.h
- odbcdialogparams/TabCtrl.cpp
- odbcdialogparams/TabCtrl.h
- odbcdialogparams/tooltip.cpp
- odbcdialogparams/connector_odbc_header.bmp
- ConfigDSN.c
- myodbc5S.def
- )
+SET(SETUP_SRCS ConfigDSN.c callbacks.c callbacks.h utils.c utils.h)
+IF (WIN32)
+ SET(SETUP_SRCS ${SETUP_SRCS}
+ windows/main.cpp
+ windows/odbcdialogparams.cpp
+ windows/odbcdialogparams.h
+ windows/odbcdialogparams.rc
+ windows/resource.h
+ windows/TabCtrl.cpp
+ windows/TabCtrl.h
+ windows/tooltip.cpp
+ windows/connector_odbc_header.bmp)
+ SET(PLATFORM_LIBS comctl32)
+ENDIF (WIN32)
+
+ADD_LIBRARY(myodbc5S SHARED ${SETUP_SRCS})
+
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/util)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/driver)
TARGET_LINK_LIBRARIES(myodbc5S
- myodbc3u ${ODBCLIB} ${ODBCINSTLIB} ${MYSQL_CLIENT_LIBS}
- comctl32)
-
+ myodbc3u ${ODBCLIB} ${ODBCINSTLIB} ${MYSQL_CLIENT_LIBS}
+ ${PLATFORM_LIBS})
Modified: branches/guffert/setupgui/ConfigDSN.c
===================================================================
--- branches/guffert/setupgui/ConfigDSN.c 2007-11-15 18:38:27 UTC (rev 867)
+++ branches/guffert/setupgui/ConfigDSN.c 2007-11-15 19:12:12 UTC (rev 868)
@@ -1,22 +1,24 @@
-/* Copyright (C) 2000-2007 MySQL AB
+/*
+ Copyright (C) 2000-2007 MySQL AB
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
- There are special exceptions to the terms and conditions of the GPL as it
- is applied to this software. View the full text of the exception in file
- EXCEPTIONS in the directory of this software distribution.
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the exception
+ in file LICENSE.exceptions in the top-level directory of this software
+ distribution.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
#ifdef _WIN32
#include <winsock2.h>
@@ -135,4 +137,3 @@
driver_delete(driver);
return rc;
}
-
Copied: branches/guffert/setupgui/callbacks.c (from rev 867,
branches/guffert/setupgui/dialog/callbacks.c)
===================================================================
--- branches/guffert/setupgui/callbacks.c (rev 0)
+++ branches/guffert/setupgui/callbacks.c 2007-11-15 19:12:12 UTC (rev 868)
@@ -0,0 +1,137 @@
+/*
+ Copyright (C) 2007 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the exception
+ in file LICENSE.exceptions in the top-level directory of this software
+ distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+/* TODO no L"" */
+#include "callbacks.h"
+#include "stringutil.h"
+
+SQLWCHAR **errorMsgs= NULL;
+
+SQLHDBC hDBC= SQL_NULL_HDBC;
+
+
+SQLWCHAR *mytest(HWND hwnd, DataSource *params)
+{
+ SQLHDBC hDbc= hDBC;
+ SQLHENV hEnv= SQL_NULL_HENV;
+ SQLWCHAR *rc;
+
+ if (SQL_SUCCEEDED(Connect(&hDbc, &hEnv, params)))
+ rc= sqlwchardup(L"Connection successful", SQL_NTS);
+ else
+ {
+ SQLWCHAR state[10];
+ SQLINTEGER native;
+ SQLSMALLINT len;
+ rc= (SQLWCHAR *) my_malloc(512 * sizeof(SQLWCHAR), MYF(0));
+ *rc= 0;
+
+ wcscat(rc, L"Connection Failed");
+ len= sqlwcharlen(rc);
+ if (SQL_SUCCEEDED(SQLGetDiagRecW(SQL_HANDLE_DBC, hDbc, 1, state,
+ &native, rc + len + 10,
+ 512 - len - 11, &len)))
+ {
+ wcscat(rc, L": [");
+ len= sqlwcharlen(rc);
+ sqlwcharncpy(rc + len, state, 6);
+ *(rc + sqlwcharlen(rc) + 1)= ' ';
+ *(rc + sqlwcharlen(rc))= ']';
+ }
+ }
+
+ Disconnect(hDbc, hEnv);
+ return rc;
+}
+
+
+BOOL mytestaccept(HWND hwnd, DataSource* params)
+{
+ /* TODO validation */
+ return TRUE;
+}
+
+
+LIST *mygetdatabases(HWND hwnd, DataSource* params)
+{
+ SQLHENV hEnv= SQL_NULL_HENV;
+ SQLHDBC hDbc= hDBC;
+ SQLHSTMT hStmt;
+ SQLRETURN nReturn;
+ SQLWCHAR szCatalog[MYODBC_DB_NAME_MAX];
+ SQLLEN nCatalog;
+ LIST *dbs= NULL;
+
+ nReturn= Connect(&hDbc, &hEnv, params);
+
+ if (nReturn != SQL_SUCCESS)
+ ShowDiagnostics(nReturn, SQL_HANDLE_DBC, hDbc);
+ if (!SQL_SUCCEEDED(nReturn))
+ {
+ Disconnect(hDbc,hEnv);
+ return NULL;
+ }
+
+ nReturn= SQLAllocHandle(SQL_HANDLE_STMT, hDbc, &hStmt);
+ if (nReturn != SQL_SUCCESS)
+ ShowDiagnostics(nReturn, SQL_HANDLE_DBC, hDbc);
+ if (!SQL_SUCCEEDED(nReturn))
+ {
+ Disconnect(hDbc,hEnv);
+ return NULL;
+ }
+
+ nReturn= SQLTablesW(hStmt, (SQLWCHAR*)SQL_ALL_CATALOGS, SQL_NTS,
+ (SQLWCHAR*)L"", SQL_NTS, (SQLWCHAR*)L"", 0,
+ (SQLWCHAR*)L"", 0);
+
+ if (nReturn != SQL_SUCCESS)
+ ShowDiagnostics(nReturn, SQL_HANDLE_STMT, hStmt);
+ if (!SQL_SUCCEEDED(nReturn))
+ {
+ SQLFreeHandle(SQL_HANDLE_STMT, hStmt);
+ Disconnect(hDbc, hEnv);
+ return NULL;
+ }
+
+ nReturn= SQLBindCol(hStmt, 1, SQL_C_WCHAR, szCatalog, MYODBC_DB_NAME_MAX,
+ &nCatalog);
+ while (TRUE)
+ {
+ nReturn= SQLFetch(hStmt);
+
+ if (nReturn == SQL_NO_DATA)
+ break;
+ else if (nReturn != SQL_SUCCESS)
+ ShowDiagnostics(nReturn, SQL_HANDLE_STMT, hStmt);
+ if (SQL_SUCCEEDED(nReturn))
+ dbs= list_cons(sqlwchardup(szCatalog, SQL_NTS), dbs);
+ else
+ break;
+ }
+
+ SQLFreeHandle(SQL_HANDLE_STMT, hStmt);
+ Disconnect(hDbc, hEnv);
+
+ return list_reverse(dbs);
+}
Copied: branches/guffert/setupgui/callbacks.h (from rev 867,
branches/guffert/setupgui/dialog/callbacks.h)
===================================================================
--- branches/guffert/setupgui/callbacks.h (rev 0)
+++ branches/guffert/setupgui/callbacks.h 2007-11-15 19:12:12 UTC (rev 868)
@@ -0,0 +1,26 @@
+#ifndef _CALLBACKS_H
+#define _CALLBACKS_H
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+#include "MYODBC_MYSQL.h"
+#include "utils.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Max DB name len, used when retrieving database list */
+#define MYODBC_DB_NAME_MAX 255
+
+wchar_t *mytest(HWND hwnd, DataSource* params);
+BOOL mytestaccept(HWND hwnd, DataSource* params);
+LIST *mygetdatabases(HWND hwnd, DataSource* params);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Copied: branches/guffert/setupgui/utils.c (from rev 867,
branches/guffert/setupgui/dialog/utils.c)
===================================================================
--- branches/guffert/setupgui/utils.c (rev 0)
+++ branches/guffert/setupgui/utils.c 2007-11-15 19:12:12 UTC (rev 868)
@@ -0,0 +1,269 @@
+/*
+ Copyright (C) 2007 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the exception
+ in file LICENSE.exceptions in the top-level directory of this software
+ distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+/** couple of temporary hacks to make it compile here*/
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+/** end hacks */
+
+#include <sql.h>
+
+#include "utils.h"
+
+#include "driver.h"
+#include "stringutil.h"
+
+
+extern SQLHDBC hDBC;
+extern SQLWCHAR **errorMsgs;
+
+void DecompileOptions(DataSource *params)
+{
+ ulong nOptions= sqlwchartoul(params->option);
+
+ params->dont_optimize_column_width= (nOptions & FLAG_FIELD_LENGTH)
> 0;
+ params->return_matching_rows= (nOptions & FLAG_FOUND_ROWS) >
0; /* 2 */
+ params->allow_big_results= (nOptions & FLAG_BIG_PACKETS) >
0;
+ params->dont_prompt_upon_connect= (nOptions & FLAG_NO_PROMPT) >
0;
+ params->enable_dynamic_cursor= (nOptions & FLAG_DYNAMIC_CURSOR)
> 0;
+ params->ignore_N_in_name_table= (nOptions & FLAG_NO_SCHEMA) >
0;
+ params->user_manager_cursor= (nOptions &
FLAG_NO_DEFAULT_CURSOR) > 0;
+ params->dont_use_set_locale= (nOptions & FLAG_NO_LOCALE) >
0;
+ params->pad_char_to_full_length= (nOptions & FLAG_PAD_SPACE) >
0;
+ params->return_table_names_for_SqlDesribeCol= (nOptions &
FLAG_FULL_COLUMN_NAMES) > 0;
+ params->use_compressed_protocol= (nOptions & FLAG_COMPRESSED_PROTO)
> 0;
+ params->ignore_space_after_function_names= (nOptions & FLAG_IGNORE_SPACE)
> 0;
+ params->force_use_of_named_pipes= (nOptions & FLAG_NAMED_PIPE) >
0;
+ params->change_bigint_columns_to_int= (nOptions & FLAG_NO_BIGINT) >
0;
+ params->no_catalog= (nOptions & FLAG_NO_CATALOG) >
0;
+ params->read_options_from_mycnf= (nOptions & FLAG_USE_MYCNF) >
0;
+ params->safe= (nOptions & FLAG_SAFE) > 0;
+ params->disable_transactions= (nOptions & FLAG_NO_TRANSACTIONS)
> 0;
+ params->save_queries= (nOptions & FLAG_LOG_QUERY) >
0;
+ params->dont_cache_result= (nOptions & FLAG_NO_CACHE) > 0;
+ params->force_use_of_forward_only_cursors= (nOptions & FLAG_FORWARD_CURSOR)
> 0;
+ params->enable_auto_reconnect= (nOptions & FLAG_AUTO_RECONNECT)
> 0;
+ params->enable_auto_increment_null_search= (nOptions & FLAG_AUTO_IS_NULL)
> 0;
+}
+
+
+void FreeEnvHandle(SQLHENV hEnv)
+{
+ if (hDBC == SQL_NULL_HDBC)
+ SQLFreeHandle(SQL_HANDLE_ENV, hEnv);
+}
+
+
+void Disconnect(SQLHDBC hDbc, SQLHENV hEnv)
+{
+ SQLDisconnect(hDbc);
+
+ if (hDBC == SQL_NULL_HDBC)
+ SQLFreeHandle(SQL_HANDLE_DBC, hDbc);
+
+ FreeEnvHandle(hEnv);
+}
+
+
+SQLRETURN Connect(SQLHDBC *hDbc, SQLHENV *hEnv, DataSource *params)
+{
+ SQLRETURN nReturn;
+ SQLWCHAR stringConnectIn[1024];
+ Driver *driver;
+ size_t inlen= 1024;
+
+ assert(params->driver && *params->driver);
+
+ /* Blank out DSN name, otherwise it will pull the info from the registry */
+ ds_set_strattr(¶ms->name, NULL);
+
+ if (ds_to_kvpair(params, stringConnectIn, 1024, ';') == -1)
+ {
+ /* TODO error message..... */
+ return SQL_ERROR;
+ }
+ inlen-= sqlwcharlen(stringConnectIn);
+
+ /* Add driver name (not file) to connect string */
+ driver= driver_new();
+ memcpy(driver->lib, params->driver,
+ (sqlwcharlen(params->driver) + 1) * sizeof(SQLWCHAR));
+ if (driver_lookup_name(driver))
+ {
+ driver_delete(driver);
+ /* TODO error message */
+ return SQL_ERROR;
+ }
+ sqlwcharncat2(stringConnectIn, W_DRIVER_PARAM, &inlen);
+ sqlwcharncat2(stringConnectIn, driver->name, &inlen);
+ driver_delete(driver);
+
+ if (hDBC == SQL_NULL_HDBC)
+ {
+ nReturn= SQLAllocHandle(SQL_HANDLE_ENV, NULL, hEnv);
+
+ if (nReturn != SQL_SUCCESS)
+ ShowDiagnostics(nReturn, SQL_HANDLE_ENV, NULL);
+
+ if (!SQL_SUCCEEDED(nReturn))
+ return nReturn;
+
+ nReturn= SQLSetEnvAttr(*hEnv, SQL_ATTR_ODBC_VERSION,
+ (SQLPOINTER)SQL_OV_ODBC3, 0);
+
+ if (nReturn != SQL_SUCCESS)
+ ShowDiagnostics(nReturn, SQL_HANDLE_ENV, NULL);
+
+ if (!SQL_SUCCEEDED(nReturn))
+ {
+ return nReturn;
+ }
+
+ nReturn= SQLAllocHandle(SQL_HANDLE_DBC, *hEnv, hDbc);
+ if (nReturn != SQL_SUCCESS)
+ ShowDiagnostics(nReturn, SQL_HANDLE_ENV, *hEnv);
+ if (!SQL_SUCCEEDED(nReturn))
+ {
+ return nReturn;
+ }
+ }
+
+ nReturn= SQLDriverConnectW(*hDbc, NULL, (SQLWCHAR*)(stringConnectIn),
+ SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT);
+
+ if (nReturn != SQL_SUCCESS)
+ ShowDiagnostics(nReturn, SQL_HANDLE_DBC, *hDbc);
+
+ return nReturn;
+}
+
+
+void ShowDiagnostics(SQLRETURN nReturn, SQLSMALLINT nHandleType, SQLHANDLE h)
+{
+ BOOL bDiagnostics= FALSE;
+ SQLSMALLINT nRec= 1;
+ SQLWCHAR szSQLState[6];
+ SQLINTEGER nNative;
+ SQLWCHAR szMessage[SQL_MAX_MESSAGE_LENGTH];
+ SQLSMALLINT nMessage;
+
+ if (h)
+ {
+ *szSQLState= '\0';
+ *szMessage= '\0';
+
+ while (SQL_SUCCEEDED(SQLGetDiagRecW(nHandleType,
+ h,
+ nRec,
+ szSQLState,
+ &nNative,
+ szMessage,
+ SQL_MAX_MESSAGE_LENGTH,
+ &nMessage)))
+ {
+ szSQLState[5]= '\0';
+ szMessage[SQL_MAX_MESSAGE_LENGTH - 1]= '\0';
+
+
+ /*add2list(errorMsgs, szMessage);*/
+
+ bDiagnostics= TRUE;
+ nRec++;
+
+ *szSQLState= '\0';
+ *szMessage= '\0';
+ }
+ }
+
+ switch (nReturn)
+ {
+ case SQL_ERROR:
+ /*strAssign(popupMsg, L"Request returned with SQL_ERROR.");*/
+ break;
+ case SQL_SUCCESS_WITH_INFO:
+ /*strAssign(popupMsg, L"Request return with SQL_SUCCESS_WITH_INFO.");*/
+ break;
+ case SQL_INVALID_HANDLE:
+ /*strAssign(popupMsg, L"Request returned with SQL_INVALID_HANDLE.");*/
+ break;
+ default:
+ /*strAssign(popupMsg, L"Request did not return with SQL_SUCCESS.");*/
+ break;
+ }
+}
+
+
+unsigned long CompileOptions(DataSource * params)
+{
+ unsigned long nFlags= 0;
+
+ if (params->dont_optimize_column_width)
+ nFlags|= FLAG_FIELD_LENGTH;
+ if (params->return_matching_rows)
+ nFlags|= FLAG_FOUND_ROWS;
+ if (params->allow_big_results)
+ nFlags|= FLAG_BIG_PACKETS;
+ if (params->dont_prompt_upon_connect)
+ nFlags|= FLAG_NO_PROMPT;
+ if (params->enable_dynamic_cursor)
+ nFlags|= FLAG_DYNAMIC_CURSOR;
+ if (params->ignore_N_in_name_table)
+ nFlags|= FLAG_NO_SCHEMA;
+ if (params->user_manager_cursor)
+ nFlags|= FLAG_NO_DEFAULT_CURSOR;
+ if (params->dont_use_set_locale)
+ nFlags|= FLAG_NO_LOCALE;
+ if (params->pad_char_to_full_length)
+ nFlags|= FLAG_PAD_SPACE;
+ if (params->return_table_names_for_SqlDesribeCol)
+ nFlags|= FLAG_FULL_COLUMN_NAMES;
+ if (params->use_compressed_protocol)
+ nFlags|= FLAG_COMPRESSED_PROTO;
+ if (params->ignore_space_after_function_names)
+ nFlags|= FLAG_IGNORE_SPACE;
+ if (params->force_use_of_named_pipes)
+ nFlags|= FLAG_NAMED_PIPE;
+ if (params->change_bigint_columns_to_int)
+ nFlags|= FLAG_NO_BIGINT;
+ if (params->no_catalog)
+ nFlags|= FLAG_NO_CATALOG;
+ if (params->read_options_from_mycnf)
+ nFlags|= FLAG_USE_MYCNF;
+ if (params->safe)
+ nFlags|= FLAG_SAFE;
+ if (params->disable_transactions)
+ nFlags|= FLAG_NO_TRANSACTIONS;
+ if (params->save_queries)
+ nFlags|= FLAG_LOG_QUERY;
+ if (params->dont_cache_result)
+ nFlags|= FLAG_NO_CACHE;
+ if (params->force_use_of_forward_only_cursors)
+ nFlags|= FLAG_FORWARD_CURSOR;
+ if (params->enable_auto_reconnect)
+ nFlags|= FLAG_AUTO_RECONNECT;
+ if (params->enable_auto_increment_null_search)
+ nFlags|= FLAG_AUTO_IS_NULL;
+
+ return nFlags;
+}
Copied: branches/guffert/setupgui/utils.h (from rev 867,
branches/guffert/setupgui/dialog/utils.h)
===================================================================
--- branches/guffert/setupgui/utils.h (rev 0)
+++ branches/guffert/setupgui/utils.h 2007-11-15 19:12:12 UTC (rev 868)
@@ -0,0 +1,24 @@
+#ifndef _CALLBACKS_UTILS_
+
+#define _CALLBACKS_UTILS_
+
+#include "installer.h"
+
+#include <sql.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ShowDiagnostics ( SQLRETURN nReturn, SQLSMALLINT nHandleType, SQLHANDLE h );
+void FreeEnvHandle ( SQLHENV hEnv );
+void Disconnect ( SQLHDBC hDbc, SQLHENV hEnv );
+SQLRETURN Connect ( SQLHDBC *hDbc, SQLHENV *hEnv, DataSource *params );
+unsigned long CompileOptions ( DataSource * params );
+void DecompileOptions ( DataSource *src );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Copied: branches/guffert/setupgui/windows (from rev 867,
branches/guffert/setupgui/odbcdialogparams)
Modified: branches/guffert/setupgui/windows/TabCtrl.cpp
===================================================================
--- branches/guffert/setupgui/odbcdialogparams/TabCtrl.cpp 2007-11-15 18:38:27 UTC (rev
867)
+++ branches/guffert/setupgui/windows/TabCtrl.cpp 2007-11-15 19:12:12 UTC (rev 868)
@@ -1,18 +1,37 @@
-/****************************************************************************
- * *
- * File : TabCtrl.cpp *
- * *
- * Purpose : Tab Control Enhanced. *
- * Make Creating and modifying Tab Control Property pages a snap *
- * (c) 2006 David MacDermot *
- * This module is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * *
- * History : Date Reason *
- * 06/22/06 Created *
- * *
- ****************************************************************************/
+/*
+ Copyright (C) 2007 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the exception
+ in file LICENSE.exceptions in the top-level directory of this software
+ distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+/**
+ @file TabCtrl.cpp
+ @brief Tab Control Enhanced.
+
+ Make Creating and modifying Tab Control Property pages a snap.
+
+ (c) 2006 David MacDermot
+
+ This module is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -55,7 +74,7 @@
// desired rectangle under every possible tab position
//
// Note: This function does not populate a standard rectangle format but rather
- // prc.left = left, prc.top = top, prc.right = width, and prc.bottom = height
+ // prc.left = left, prc.top = top, prc.right = width, and prc.bottom = height
RECT rtab_0;
LONG lStyle= GetWindowLongPtr(hwnd,GWL_STYLE);
@@ -201,7 +220,7 @@
SetFocus(This->hTabPages[currentSel]);
TabPageMessageLoop (This->hTabPages[currentSel]);
}
- return TRUE;
+ return TRUE;
default: return FALSE;
}
} // if(verticalTabs)
@@ -247,7 +266,7 @@
SetFocus(This->hTabPages[currentSel]);
TabPageMessageLoop (This->hTabPages[currentSel]);
}
- return TRUE;
+ return TRUE;
default: return FALSE;
}
} //else // horizontal Tabs
@@ -401,7 +420,7 @@
* Purpose : Monitor and respond to user keyboard input and system messages *
* Note: Send PostQuitMessage(0); from any cancel or exit event. *
* Failure to do so will leave the process running even after *
- * application exit. *
+ * application exit. *
* *
* History : Date Reason *
* 00/00/00 Created *
@@ -418,7 +437,7 @@
HACCEL hAccTable = CreateAccTable();
while((status = GetMessage(&msg, NULL, 0, 0 )) != 0 &&
!stopTabPageMessageLoop)
- {
+ {
if (status == -1) // Exception
{
return;
Modified: branches/guffert/setupgui/windows/TabCtrl.h
===================================================================
--- branches/guffert/setupgui/odbcdialogparams/TabCtrl.h 2007-11-15 18:38:27 UTC (rev 867)
+++ branches/guffert/setupgui/windows/TabCtrl.h 2007-11-15 19:12:12 UTC (rev 868)
@@ -1,22 +1,41 @@
-/****************************************************************************
- * *
- * File : TabCtrl.h *
- * *
- * Purpose : Tab Control Enhanced. *
- * Make Creating and modifying Tab Control Property pages a snap *
- * (c) 2006 David MacDermot *
- * This module is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * *
- * History : Date Reason *
- * 06/22/06 Created *
- * *
- ****************************************************************************/
+/*
+ Copyright (C) 2007 MySQL AB
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the exception
+ in file LICENSE.exceptions in the top-level directory of this software
+ distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+/**
+ @file TabCtrl.h
+ @brief Tab Control Enhanced.
+
+ Make Creating and modifying Tab Control Property pages a snap.
+
+ (c) 2006 David MacDermot
+
+ This module is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+
/** Structs *****************************************************************/
-typedef struct TabControl
+typedef struct TabControl
{
HWND hTab;
HWND* hTabPages;
@@ -33,7 +52,7 @@
BOOL (*OnKeyDown)(LPARAM);
BOOL (*StretchTabPage) (HWND);
BOOL (*CenterTabPage) (HWND);
-
+
} TABCTRL, *LPTABCTRL;
/** Prototypes **************************************************************/
Modified: branches/guffert/setupgui/windows/main.cpp
===================================================================
--- branches/guffert/setupgui/odbcdialogparams/main.cpp 2007-11-15 18:38:27 UTC (rev 867)
+++ branches/guffert/setupgui/windows/main.cpp 2007-11-15 19:12:12 UTC (rev 868)
@@ -1,3 +1,25 @@
+/*
+ Copyright (C) 2007 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the exception
+ in file LICENSE.exceptions in the top-level directory of this software
+ distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
#include "resource.h"
#include <winsock2.h>
#include <windows.h>
Modified: branches/guffert/setupgui/windows/odbcdialogparams.cpp
===================================================================
--- branches/guffert/setupgui/odbcdialogparams/odbcdialogparams.cpp 2007-11-15 18:38:27
UTC (rev 867)
+++ branches/guffert/setupgui/windows/odbcdialogparams.cpp 2007-11-15 19:12:12 UTC (rev
868)
@@ -1,6 +1,30 @@
-// odbcdialogparams.cpp : Defines the entry point for the DLL application.
-//
+/*
+ Copyright (C) 2007 MySQL AB
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the exception
+ in file LICENSE.exceptions in the top-level directory of this software
+ distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+/**
+ @file odbcdialogparams.cpp
+ @brief Defines the entry point for the DLL application.
+*/
+
#define WIN32_LEAN_AND_MEAN
#define DEBUG_TAB 4
@@ -24,8 +48,8 @@
#include "MYODBC_MYSQL.h"
#include "installer.h"
#include "stringutil.h"
-#include "../dialog/callbacks.h"
-#include "../dialog/utils.h"
+#include "../callbacks.h"
+#include "../utils.h"
extern HINSTANCE ghInstance;
Modified: branches/guffert/setupgui/windows/odbcdialogparams.h
===================================================================
--- branches/guffert/setupgui/odbcdialogparams/odbcdialogparams.h 2007-11-15 18:38:27 UTC
(rev 867)
+++ branches/guffert/setupgui/windows/odbcdialogparams.h 2007-11-15 19:12:12 UTC (rev 868)
@@ -1,3 +1,25 @@
+/*
+ Copyright (C) 2007 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the exception
+ in file LICENSE.exceptions in the top-level directory of this software
+ distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
#ifndef __ODBCPARAMS_H__
#define __ODBCPARAMS_H__
Modified: branches/guffert/setupgui/windows/tooltip.cpp
===================================================================
--- branches/guffert/setupgui/odbcdialogparams/tooltip.cpp 2007-11-15 18:38:27 UTC (rev
867)
+++ branches/guffert/setupgui/windows/tooltip.cpp 2007-11-15 19:12:12 UTC (rev 868)
@@ -1,34 +1,78 @@
-+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
@@ -52,233 +96,233 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -286,7 +330,7 @@
-
@@ -304,11 +348,11 @@
-
-
-
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r868 - in branches/guffert/setupgui: . windows | jwinstead | 15 Nov |