Hi, I'm triing to find an error to work on. I was happy that so many people gave me hints on what should be fix. I tried to understand things but, it seems that this is to big thing for me at this moment. Could somebody assign me a little task in a bigger which (s)he is working on? And explain details on that. It seems that I need a "virtual" boss while learning wine hacking. Attila
On December 24, 2003 04:00 pm, Zimler Attila wrote:
Could somebody assign me a little task in a bigger which (s)he is working on?
This is normal Attila, don't get frustrated. Wine is a very big project, and it's not easy to start working. However, there are _plenty_ of things to do, and we do need help, so there's nothing to worry about! :) The best way to contribute now to Wine (in terms of usefulness for the project) is to help us get the 0.9 release out. There is a TODO list for this task here: http://winehq.org/site/todo_lists In particular, there are two tasks that are quite good for someone new to the project: C.2. Write control panel applets for editing it C.8. Implement write support for regedit These are self containted, easy to understand and implement, and one of the big show stoppers for the 0.9 release. If that is not what you want to do, there are other things like the Janitorial tasks: http://winehq.org/site/janitorial or improving our UI controls: http://winehq.org/site/status_ui Let me know what you want to work on, and I'll give you a hand to get you started. Welcome to the team! -- Dimi.
On Wed, 2003-12-24 at 21:05, Dimitrie O. Paun wrote:
In particular, there are two tasks that are quite good for someone new to the project: C.2. Write control panel applets for editing it
Seconded - working on winecfg is a good start. You can get used to the patch submission process, learn Win32 and the Wine toolchain, but it's not hardcore debugging (which is pretty difficult if you've not done it before). Writing unit tests might also be helpful. thanks -mike
Dimitrie O. Paun wrote:
In particular, there are two tasks that are quite good for someone new to the project: C.2. Write control panel applets for editing it C.8. Implement write support for regedit These are self containted, easy to understand and implement, and one of the big show stoppers for the 0.9 release.
I think I could help with implementing write support in regedit, as I think nothing special about windows' graphics programming is need to know. (Sound's link a task whith I can help as a newbie.) Could you assign a subtask of it, and explain it a little? Attila
--- Zimler Attila <hijaszu(a)hlfslinux.hu> wrote:
I think I could help with implementing write support in regedit, as I
think nothing special about windows' graphics programming is need to know. (Sound's link a task whith I can help as a newbie.) Could you assign a subtask of it, and explain it a little?
Hello, Adding write support to regedit shouldnt be a huge project. Most of functions for writting to the registry dont differ much from the read functions anyway so example code is there. I dont think all of the dialogs for editing in the program are implemented but thats not to hard to add. Basicly the regedit clone operates 100% the same way as the Windows regedit but cant write Binary, String or DWORD values in the GUI mode yet. If you have a *.reg file and pass it to regedit on the command-line regedit can merge the file. Thanks Steven __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/
On December 24, 2003 06:32 pm, Zimler Attila wrote:
I think I could help with implementing write support in regedit, as I think nothing special about windows' graphics programming is need to know. (Sound's link a task whith I can help as a newbie.)
Yes, you are correct.
Could you assign a subtask of it, and explain it a little?
Yes, I can. In fact, I have a little bit of work in my tree that hasn't been submitted yet. However, now I'm in a hurry to go to my parents for Christams eve, so I'll have to do it tomorrow. -- Dimi. P.S. I've attached what I have in my tree. Index: programs/regedit/En.rc =================================================================== RCS file: /var/cvs/wine/programs/regedit/En.rc,v retrieving revision 1.3 diff -u -r1.3 En.rc --- programs/regedit/En.rc 3 Dec 2003 20:25:24 -0000 1.3 +++ programs/regedit/En.rc 13 Dec 2003 07:28:22 -0000 @@ -132,6 +132,21 @@ DEFPUSHBUTTON "Cancel",IDCANCEL,175,60,30,11,WS_GROUP END +IDD_EDIT_DWORD DIALOG DISCARDABLE 22, 17, 210, 100 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Edit String" +FONT 8, "System" +BEGIN + LTEXT "Value name:",IDC_STATIC,5,5,119,8 + EDITTEXT IDC_VALUE_NAME,5,15,200,12, WS_BORDER | WS_TABSTOP | WS_DISABLED + LTEXT "Value data:",IDC_STATIC,5,30,90,8 + EDITTEXT IDC_VALUE_DATA,5,40,90,12, WS_BORDER | WS_TABSTOP + GROUPBOX "Base", IDC_DWORD_BASE, 120, 30, 85, 37, BS_GROUPBOX + AUTORADIOBUTTON "Hexadecimal", IDC_DWORD_HEX, 130, 40, 60, 10, WS_TABSTOP + AUTORADIOBUTTON "Decimal", IDC_DWORD_DEC, 130, 52, 60, 10, WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,140,80,30,11,WS_GROUP + DEFPUSHBUTTON "Cancel",IDCANCEL,175,80,30,11,WS_GROUP +END /* * String Table @@ -201,6 +216,8 @@ IDS_BAD_VALUE "Can't query value '%s'" IDS_UNSUPPORTED_TYPE "Can't edit keys of this type (%ld)" IDS_TOO_BIG_VALUE "Value is too big (%ld)" + IDS_DELETE_BOX_TITLE "Confirm Value Delete" + IDS_DELETE_BOX_TEXT "Are you sure you want to delete value '%s'?" END /*****************************************************************/ Index: programs/regedit/edit.c =================================================================== RCS file: /var/cvs/wine/programs/regedit/edit.c,v retrieving revision 1.3 diff -u -r1.3 edit.c --- programs/regedit/edit.c 12 Dec 2003 04:08:59 -0000 1.3 +++ programs/regedit/edit.c 13 Dec 2003 07:24:47 -0000 @@ -36,27 +36,42 @@ static const TCHAR* editValueName; static TCHAR* stringValueData; -void error(HWND hwnd, INT resId, ...) +INT vmessagebox(HWND hwnd, INT buttons, INT titleId, INT resId, va_list ap) { - va_list ap; TCHAR title[256]; TCHAR errfmt[1024]; TCHAR errstr[1024]; - HINSTANCE hInstance; - hInstance = GetModuleHandle(0); - - if (!LoadString(hInstance, IDS_ERROR, title, COUNT_OF(title))) + if (!LoadString(hInst, titleId, title, COUNT_OF(title))) lstrcpy(title, "Error"); - if (!LoadString(hInstance, resId, errfmt, COUNT_OF(errfmt))) + if (!LoadString(hInst, resId, errfmt, COUNT_OF(errfmt))) lstrcpy(errfmt, "Unknown error string!"); - va_start(ap, resId); _vsntprintf(errstr, COUNT_OF(errstr), errfmt, ap); + + return MessageBox(hwnd, errstr, title, buttons); +} + +INT messagebox(HWND hwnd, INT buttons, INT titleId, INT resId, ...) +{ + va_list ap; + INT result; + + va_start(ap, resId); + result = vmessagebox(hwnd, buttons, titleId, resId, ap); va_end(ap); - MessageBox(hwnd, errstr, title, MB_OK | MB_ICONERROR); + return result; +} + +void error(HWND hwnd, INT resId, ...) +{ + va_list ap; + + va_start(ap, resId); + vmessagebox(hwnd, MB_OK | MB_ICONERROR, IDS_ERROR, resId, ap); + va_end(ap); } INT_PTR CALLBACK modify_string_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -91,6 +106,38 @@ return FALSE; } +INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + TCHAR* valueData; + HWND hwndValue; + int len; + + switch(uMsg) { + case WM_INITDIALOG: + SetDlgItemText(hwndDlg, IDC_VALUE_NAME, editValueName); + SetDlgItemText(hwndDlg, IDC_VALUE_DATA, stringValueData); + return TRUE; + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + if ((hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA))) { + if ((len = GetWindowTextLength(hwndValue))) { + if ((valueData = HeapReAlloc(GetProcessHeap(), 0, stringValueData, (len + 1) * sizeof(TCHAR)))) { + stringValueData = valueData; + if (!GetWindowText(hwndValue, stringValueData, len + 1)) + *stringValueData = 0; + } + } + } + /* Fall through */ + case IDCANCEL: + EndDialog(hwndDlg, wParam); + return TRUE; + } + } + return FALSE; +} + BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName) { DWORD valueDataLen; @@ -123,7 +170,9 @@ if (lRet == ERROR_SUCCESS) result = TRUE; } } else if ( type == REG_DWORD ) { - MessageBox(hwnd, "Can't edit dwords for now", "Error", MB_OK | MB_ICONERROR); + if (DialogBox(0, MAKEINTRESOURCE(IDD_EDIT_DWORD), hwnd, modify_dword_dlgproc) == IDOK) { + MessageBox(hwnd, "Can't edit dwords for now", "Error", MB_OK | MB_ICONERROR); + } } else { error(hwnd, IDS_UNSUPPORTED_TYPE, type); } @@ -133,4 +182,20 @@ stringValueData = NULL; return result; +} + +BOOL DeleteValue(HWND hwnd, HKEY hKey, LPCTSTR valueName) +{ + LONG lRet; + + if (!hKey || !valueName) return FALSE; + + if (messagebox(hwnd, MB_YESNO | MB_ICONEXCLAMATION, IDS_DELETE_BOX_TITLE, IDS_DELETE_BOX_TEXT, valueName) != IDYES) + return FALSE; + + lRet = RegDeleteKey(hKey, valueName); + if (lRet != ERROR_SUCCESS) { + error(hwnd, IDS_BAD_VALUE, valueName); + } + return lRet == ERROR_SUCCESS; } Index: programs/regedit/framewnd.c =================================================================== RCS file: /var/cvs/wine/programs/regedit/framewnd.c,v retrieving revision 1.5 diff -u -r1.5 framewnd.c --- programs/regedit/framewnd.c 12 Dec 2003 04:08:59 -0000 1.5 +++ programs/regedit/framewnd.c 13 Dec 2003 06:57:03 -0000 @@ -441,12 +441,11 @@ BOOL result = TRUE; LONG lRet; - keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); - valueName = GetValueName(g_pChildWnd->hListWnd); - if (keyPath) { - lRet = RegOpenKeyEx(hKeyRoot, keyPath, 0, KEY_READ, &hKey); + if ((keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot))) { + lRet = RegOpenKeyEx(hKeyRoot, keyPath, 0, KEY_ALL_ACCESS, &hKey); if (lRet != ERROR_SUCCESS) hKey = 0; } + valueName = GetValueName(g_pChildWnd->hListWnd); switch (LOWORD(wParam)) { case ID_REGISTRY_IMPORTREGISTRYFILE: @@ -461,6 +460,10 @@ break; case ID_REGISTRY_PRINT: PrintRegistryHive(hWnd, _T("")); + break; + case ID_EDIT_DELETE: + if (DeleteValue(hWnd, hKey, valueName)) + RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath); break; case ID_EDIT_MODIFY: if (ModifyValue(hWnd, hKey, valueName)) Index: programs/regedit/main.h =================================================================== RCS file: /var/cvs/wine/programs/regedit/main.h,v retrieving revision 1.8 diff -u -r1.8 main.h --- programs/regedit/main.h 12 Dec 2003 04:08:59 -0000 1.8 +++ programs/regedit/main.h 12 Dec 2003 21:44:58 -0000 @@ -93,6 +93,7 @@ extern LPCTSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey); /* edit.c */ -BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName); +extern BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName); +extern BOOL DeleteValue(HWND hwnd, HKEY hKey, LPCTSTR valueName); #endif /* __MAIN_H__ */ Index: programs/regedit/resource.h =================================================================== RCS file: /var/cvs/wine/programs/regedit/resource.h,v retrieving revision 1.2 diff -u -r1.2 resource.h --- programs/regedit/resource.h 3 Dec 2003 20:25:24 -0000 1.2 +++ programs/regedit/resource.h 13 Dec 2003 07:21:58 -0000 @@ -106,6 +106,12 @@ #define IDS_BAD_VALUE 32837 #define IDS_UNSUPPORTED_TYPE 32838 #define IDS_TOO_BIG_VALUE 32839 +#define IDS_DELETE_BOX_TITLE 32840 +#define IDS_DELETE_BOX_TEXT 32841 +#define IDD_EDIT_DWORD 32850 +#define IDC_DWORD_BASE 32852 +#define IDC_DWORD_HEX 32853 +#define IDC_DWORD_DEC 32854 #define IDD_EDIT_STRING 2000 #define IDC_VALUE_NAME 2001
Zimler Attila <hijaszu(a)hlfslinux.hu> writes:
I'm trying to find an error to work on. [...] Could somebody assign me a little task
Szervusz! Have you had a look at http://winehq.org/site/fun_projects or .../janitorial? Introducing the Wineconsole toolbar or fixing some conformance tests sound like good entry points to Wine development. Although not direct fixes, but these would be useful contributions while you gather some more experience by following this list. Or just stroll through Bugzilla until something catches your fancy; if a problem sounds easy, it may as well as be... :) Important things: make etags (and use them with A or W suffixed to function names)! Üdv: Feri.
Zimler Attila wrote:
I'm triing to find an error to work on. I was happy that so many people gave me hints on what should be fix. I tried to understand things but, it seems that this is to big thing for me at this moment. Could somebody assign me a little task in a bigger which (s)he is working on? And explain details on that. It seems that I need a "virtual" boss while learning wine hacking.
How about just browsing the bug database for starters? Here's one that looks easy: http://bugs.winehq.com/show_bug.cgi?id=824 - Dan
participants (6)
-
Dan Kegel -
Dimitrie O. Paun -
Ferenc Wagner -
Mike Hearn -
Steven Edwards -
Zimler Attila