summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-19 14:52:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-19 14:52:53 +0000
commit54dec7a74c313ee61437386bd667f9a7653351fd (patch)
tree81aaf9bf469838735392a81ed3edfc3b3bd7481f /plugins/Clist_modern
parent03dd87df0b288fd0f0f512fb0bbff29e8c00f366 (diff)
fixes for the options page translation
git-svn-id: http://svn.miranda-ng.org/main/trunk@479 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/modern_clcopts.cpp77
-rw-r--r--plugins/Clist_modern/modern_clistopts.cpp64
-rw-r--r--plugins/Clist_modern/modern_skinopt.cpp14
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp23
4 files changed, 81 insertions, 97 deletions
diff --git a/plugins/Clist_modern/modern_clcopts.cpp b/plugins/Clist_modern/modern_clcopts.cpp
index 1fcf7dbb0b..ee97d8c1cf 100644
--- a/plugins/Clist_modern/modern_clcopts.cpp
+++ b/plugins/Clist_modern/modern_clcopts.cpp
@@ -252,63 +252,56 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
static UINT StatusBarExpertControls[]={IDC_STATUSBAR_PER_PROTO, IDC_STATUSBAR_PROTO_LIST, IDC_SBAR_USE_ACCOUNT_SETTINGS, IDC_SBAR_HIDE_ACCOUNT_COMPLETELY};
-static struct TabItemOptionConf
+struct
{
- TCHAR *name; // Tab name
+ char *name; // Tab name
int id; // Dialog id
DLGPROC wnd_proc; // Dialog function
UINT* expertControls; // Expert Controls
int nExpertControls;
DWORD flag; // Expertonly
-} clist_opt_items[] =
+}
+static clist_opt_items[] =
{
- { LPGENT("General"), IDD_OPT_CLIST, DlgProcClistOpts, NULL, 0, 0},
- { LPGENT("Tray"), IDD_OPT_TRAY, DlgProcTrayOpts, NULL, 0, 0 },
- { LPGENT("List"), IDD_OPT_CLC, DlgProcClistListOpts, NULL, 0, 0 },
- { LPGENT("Window"), IDD_OPT_CLUI, DlgProcClistWindowOpts, NULL, 0, 0 },
- { LPGENT("Behaviour"), IDD_OPT_CLUI_2, DlgProcClistBehaviourOpts, NULL, 0, 0 },
- { LPGENT("Status Bar"), IDD_OPT_SBAR, DlgProcSBarOpts, StatusBarExpertControls, SIZEOF(StatusBarExpertControls), 0},
- { LPGENT("Additional stuff"), IDD_OPT_META_CLC, DlgProcClistAdditionalOpts, NULL, 0, 0 },
- { 0 }
+ { LPGEN("General"), IDD_OPT_CLIST, DlgProcClistOpts, NULL, 0, 0},
+ { LPGEN("Tray"), IDD_OPT_TRAY, DlgProcTrayOpts, NULL, 0, 0 },
+ { LPGEN("List"), IDD_OPT_CLC, DlgProcClistListOpts, NULL, 0, 0 },
+ { LPGEN("Window"), IDD_OPT_CLUI, DlgProcClistWindowOpts, NULL, 0, 0 },
+ { LPGEN("Behaviour"), IDD_OPT_CLUI_2, DlgProcClistBehaviourOpts, NULL, 0, 0 },
+ { LPGEN("Status Bar"), IDD_OPT_SBAR, DlgProcSBarOpts, StatusBarExpertControls, SIZEOF(StatusBarExpertControls), 0},
+ { LPGEN("Additional stuff"), IDD_OPT_META_CLC, DlgProcClistAdditionalOpts, NULL, 0, 0 }
};
-
int ClcOptInit(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
- if (MirandaExiting()) return 0;
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=0;
- odp.hInstance=g_hInst;
- //odp.ptszGroup=TranslateT("Contact List");
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_CLC);
- odp.ptszTitle=LPGENT("Contact List");
- odp.pfnDlgProc=DlgProcClistListOpts;
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- //Options_AddPage(wParam,&odp);
- {
- int i;
- for (i=0; clist_opt_items[i].id!=0; i++)
- {
- odp.pszTemplate=MAKEINTRESOURCEA(clist_opt_items[i].id);
- odp.ptszTab=clist_opt_items[i].name;
- odp.pfnDlgProc=clist_opt_items[i].wnd_proc;
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR|clist_opt_items[i].flag;
- odp.expertOnlyControls = clist_opt_items[i].expertControls;
- odp.nExpertOnlyControls = clist_opt_items[i].nExpertControls;
- Options_AddPage(wParam,&odp);
- }
+ if (MirandaExiting())
+ return 0;
+
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = g_hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLC);
+ odp.pszTitle = LPGEN("Contact List");
+ odp.pfnDlgProc = DlgProcClistListOpts;
+ odp.flags = ODPF_BOLDGROUPS;
+
+ for (int i=0; i < SIZEOF(clist_opt_items); i++) {
+ odp.pszTemplate = MAKEINTRESOURCEA(clist_opt_items[i].id);
+ odp.pszTab = clist_opt_items[i].name;
+ odp.pfnDlgProc = clist_opt_items[i].wnd_proc;
+ odp.flags = ODPF_BOLDGROUPS | clist_opt_items[i].flag;
+ odp.expertOnlyControls = clist_opt_items[i].expertControls;
+ odp.nExpertOnlyControls = clist_opt_items[i].nExpertControls;
+ Options_AddPage(wParam, &odp);
}
- if (g_CluiData.fDisableSkinEngine)
- {
+ if (g_CluiData.fDisableSkinEngine) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLIST_LISTBKG);
- odp.ptszGroup = LPGENT("Skins");
- odp.ptszTitle = LPGENT("Contact List");
- odp.ptszTab = LPGENT("List Background");
+ odp.pszGroup = LPGEN("Skins");
+ odp.pszTitle = LPGEN("Contact List");
+ odp.pszTab = LPGEN("List Background");
odp.pfnDlgProc = DlgProcClcBkgOpts;
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
}
diff --git a/plugins/Clist_modern/modern_clistopts.cpp b/plugins/Clist_modern/modern_clistopts.cpp
index 73c7c8c7e7..e16323619c 100644
--- a/plugins/Clist_modern/modern_clistopts.cpp
+++ b/plugins/Clist_modern/modern_clistopts.cpp
@@ -37,55 +37,48 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM
static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
static UINT expertOnlyControls[]={IDC_ALWAYSSTATUS};
-static struct _RowItemOptionConf
+struct
{
- TCHAR *name; // Tab name
+ char *name; // Tab name
int id; // Dialog id
DLGPROC wnd_proc; // Dialog function
-} row_opt_items[] = {
- { _T("Row"), IDD_OPT_ITEM_ROW, DlgProcItemRowOpts },
+}
+static row_opt_items[] =
+{
+ { LPGEN("Row"), IDD_OPT_ITEM_ROW, DlgProcItemRowOpts },
#ifdef _DEBUG
- { _T("Row design"), IDD_OPT_ROWTMPL, DlgTmplEditorOpts },
+ { LPGEN("Row design"), IDD_OPT_ROWTMPL, DlgTmplEditorOpts },
#endif
- { LPGENT("Avatar"), IDD_OPT_ITEM_AVATAR, DlgProcItemAvatarOpts },
- { LPGENT("Icon"), IDD_OPT_ITEM_ICON, DlgProcItemIconOpts },
- { LPGENT("Contact time"), IDD_OPT_ITEM_CONTACT_TIME, DlgProcItemContactTimeOpts },
- { LPGENT("Text"), IDD_OPT_ITEM_TEXT, DlgProcItemTextOpts },
- { LPGENT("Second Line"), IDD_OPT_ITEM_SECOND_LINE, DlgProcItemSecondLineOpts },
- { LPGENT("Third Line"), IDD_OPT_ITEM_THIRD_LINE, DlgProcItemThirdLineOpts },
- { LPGENT("Extra Icons"), IDD_OPT_ITEM_EXTRAICONS, DlgProcExtraIconsOpts},
- { 0 }
+ { LPGEN("Avatar"), IDD_OPT_ITEM_AVATAR, DlgProcItemAvatarOpts },
+ { LPGEN("Icon"), IDD_OPT_ITEM_ICON, DlgProcItemIconOpts },
+ { LPGEN("Contact time"), IDD_OPT_ITEM_CONTACT_TIME, DlgProcItemContactTimeOpts },
+ { LPGEN("Text"), IDD_OPT_ITEM_TEXT, DlgProcItemTextOpts },
+ { LPGEN("Second Line"), IDD_OPT_ITEM_SECOND_LINE, DlgProcItemSecondLineOpts },
+ { LPGEN("Third Line"), IDD_OPT_ITEM_THIRD_LINE, DlgProcItemThirdLineOpts },
+ { LPGEN("Extra Icons"), IDD_OPT_ITEM_EXTRAICONS, DlgProcExtraIconsOpts}
};
int CListOptInit(WPARAM wParam,LPARAM lParam)
{
-
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=-200000000;
- odp.hInstance=g_hInst;
- // odp.pfnDlgProc=DlgProcItemsOpts;
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_ITEMS);
- odp.ptszGroup=LPGENT("Contact List");
- odp.ptszTitle=LPGENT("Row items");
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- // Options_AddPage(wParam,&odp);
-
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = -200000000;
+ odp.hInstance = g_hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ITEMS);
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("Row items");
+ odp.flags = ODPF_BOLDGROUPS;
{
BOOL hasExtraIconsService = ServiceExists("ExtraIcon/Register");
- int i;
- for (i=0; row_opt_items[i].id!=0; i++)
- {
+ for (int i=0; i < SIZEOF(row_opt_items); i++) {
if (hasExtraIconsService && row_opt_items[i].id == IDD_OPT_ITEM_EXTRAICONS)
continue;
- odp.pszTemplate=MAKEINTRESOURCEA(row_opt_items[i].id);
- odp.ptszTab=row_opt_items[i].name;
- odp.pfnDlgProc=row_opt_items[i].wnd_proc;
- Options_AddPage(wParam,&odp);
+ odp.pszTemplate = MAKEINTRESOURCEA(row_opt_items[i].id);
+ odp.pszTab = row_opt_items[i].name;
+ odp.pfnDlgProc = row_opt_items[i].wnd_proc;
+ Options_AddPage(wParam, &odp);
}
}
@@ -94,8 +87,7 @@ int CListOptInit(WPARAM wParam,LPARAM lParam)
static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch (msg)
- {
+ switch (msg) {
case WM_INITDIALOG:
{
int i;
diff --git a/plugins/Clist_modern/modern_skinopt.cpp b/plugins/Clist_modern/modern_skinopt.cpp
index 021691db9f..6a2296b287 100644
--- a/plugins/Clist_modern/modern_skinopt.cpp
+++ b/plugins/Clist_modern/modern_skinopt.cpp
@@ -61,23 +61,23 @@ int SkinOptInit( WPARAM wParam, LPARAM lParam )
odp.hInstance = g_hInst;
odp.pfnDlgProc = DlgSkinOpts;
odp.pszTemplate = MAKEINTRESOURCEA( IDD_OPT_SKIN );
- odp.ptszGroup = LPGENT( "Skins" );
- odp.ptszTitle = LPGENT( "Contact List" );
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- odp.ptszTab = LPGENT( "Load/Save" );
+ odp.pszGroup = LPGEN( "Skins" );
+ odp.pszTitle = LPGEN( "Contact List" );
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTab = LPGEN( "Load/Save" );
Options_AddPage(wParam, &odp);
- if ( ModernGetSettingByte( NULL, "ModernData", "EnableSkinEditor", SETTING_ENABLESKINEDITOR_DEFAULT ) )
- {
+ if ( ModernGetSettingByte( NULL, "ModernData", "EnableSkinEditor", SETTING_ENABLESKINEDITOR_DEFAULT )) {
odp.flags |= ODPF_EXPERTONLY;
odp.pfnDlgProc = DlgSkinEditorOpts;
odp.pszTemplate = MAKEINTRESOURCEA( IDD_OPT_SKINEDITOR );
- odp.ptszTab = LPGENT( "Object Editor" );
+ odp.pszTab = LPGEN( "Object Editor" );
Options_AddPage(wParam, &odp);
}
}
return 0;
}
+
int ModernSkinOptInit( WPARAM wParam, LPARAM lParam )
{
MODERNOPTOBJECT obj = {0};
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp
index 0c3e9e868b..d39bbf4c48 100644
--- a/plugins/Clist_modern/modern_toolbar.cpp
+++ b/plugins/Clist_modern/modern_toolbar.cpp
@@ -286,19 +286,18 @@ static int ehhToolBarBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int ehhToolbarOptInit(WPARAM wParam, LPARAM lParam)
+static int ehhToolbarOptInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=0;
- odp.hInstance=g_hInst;
- odp.ptszGroup=LPGENT("Contact List");
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_TOOLBAR);
- odp.ptszTitle=LPGENT("ToolBar");
- odp.pfnDlgProc=(DLGPROC)ToolBar_OptDlgProc;
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- Options_AddPage(wParam,&odp);
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = 0;
+ odp.hInstance = g_hInst;
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("ToolBar");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TOOLBAR);
+ odp.pfnDlgProc = (DLGPROC)ToolBar_OptDlgProc;
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
return 0;
}
static INT_PTR svcToolBarAddButton(WPARAM wParam, LPARAM lParam)