Module: wine
Branch: master
Commit: 3fc87ef6263327a4fc6be0bcf16a2c7d93a26802
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3fc87ef6263327a4fc6be0bcf…
Author: Detlef Riekenberg <wine.dev(a)web.de>
Date: Thu Apr 19 22:59:42 2007 +0200
localui: Implement ConfigurePortUI.
---
dlls/localui/Makefile.in | 2 +-
dlls/localui/localui.c | 35 +++++++++++++++++++++++++++++++++--
dlls/localui/localui.h | 34 ++++++++++++++++++++++++++++++++++
dlls/localui/localui.rc | 5 ++++-
dlls/localui/ui_En.rc | 27 +++++++++++++++++++++++++++
5 files changed, 99 insertions(+), 4 deletions(-)
diff --git a/dlls/localui/Makefile.in b/dlls/localui/Makefile.in
index 2250333..6a43906 100644
--- a/dlls/localui/Makefile.in
+++ b/dlls/localui/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = localui.dll
-IMPORTS = winspool kernel32
+IMPORTS = winspool user32 kernel32
C_SRCS = \
localui.c
diff --git a/dlls/localui/localui.c b/dlls/localui/localui.c
index 2153bcc..36b2812 100644
--- a/dlls/localui/localui.c
+++ b/dlls/localui/localui.c
@@ -26,11 +26,13 @@
#include "winbase.h"
#include "wingdi.h"
#include "winreg.h"
+#include "winuser.h"
#include "winspool.h"
#include "ddk/winsplp.h"
#include "wine/debug.h"
+#include "localui.h"
WINE_DEFAULT_DEBUG_CHANNEL(localui);
@@ -57,6 +59,24 @@ static LPWSTR strdupWW(LPCWSTR pPrefix, LPCWSTR pSuffix)
return ptr;
}
+/******************************************************************
+ * display the Dialog "Nothing to configure"
+ *
+ */
+
+static void dlg_nothingtoconfig(HWND hWnd)
+{
+ WCHAR res_PortW[IDS_LOCALPORT_MAXLEN];
+ WCHAR res_nothingW[IDS_NOTHINGTOCONFIG_MAXLEN];
+
+ res_PortW[0] = '\0';
+ res_nothingW[0] = '\0';
+ LoadStringW(LOCALUI_hInstance, IDS_LOCALPORT, res_PortW, IDS_LOCALPORT_MAXLEN);
+ LoadStringW(LOCALUI_hInstance, IDS_NOTHINGTOCONFIG, res_nothingW, IDS_NOTHINGTOCONFIG_MAXLEN);
+
+ MessageBoxW(hWnd, res_nothingW, res_PortW, MB_OK | MB_ICONINFORMATION);
+}
+
/*****************************************************
* open_monitor_by_name [internal]
*
@@ -120,8 +140,19 @@ static BOOL WINAPI localui_AddPortUI(PCWSTR pName, HWND hWnd, PCWSTR pMonitorNam
*/
static BOOL WINAPI localui_ConfigurePortUI(PCWSTR pName, HWND hWnd, PCWSTR pPortName)
{
- FIXME("(%s, %p, %s) stub\n", debugstr_w(pName), hWnd, debugstr_w(pPortName));
- return TRUE;
+ HANDLE hXcv;
+
+ TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pPortName));
+ if (open_monitor_by_name(XcvPortW, pPortName, &hXcv)) {
+
+ dlg_nothingtoconfig(hWnd);
+
+ ClosePrinter(hXcv);
+ return TRUE;
+ }
+ SetLastError(ERROR_UNKNOWN_PORT);
+ return FALSE;
+
}
/*****************************************************
diff --git a/dlls/localui/localui.h b/dlls/localui/localui.h
new file mode 100644
index 0000000..eb7dfff
--- /dev/null
+++ b/dlls/localui/localui.h
@@ -0,0 +1,34 @@
+/*
+ * internal include file of the Local Printmonitor User Interface
+ *
+ * Copyright 2007 Detlef Riekenberg
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_LOCALUI__
+#define __WINE_LOCALUI__
+
+
+/* ## Resource-ID ## */
+#define IDS_LOCALPORT 300
+#define IDS_NOTHINGTOCONFIG 303
+
+/* ## Reserved memorysize for the strings (in WCHAR) ## */
+#define IDS_LOCALPORT_MAXLEN 32
+#define IDS_NOTHINGTOCONFIG_MAXLEN 80
+
+
+#endif /* __WINE_LOCALUI__ */
diff --git a/dlls/localui/localui.rc b/dlls/localui/localui.rc
index 5162b6e..23a6b95 100644
--- a/dlls/localui/localui.rc
+++ b/dlls/localui/localui.rc
@@ -22,7 +22,7 @@
#include "windef.h"
#include "winbase.h"
#include "winver.h"
-
+#include "localui.h"
#define WINE_FILENAME_STR "localui.dll"
#define WINE_FILEDESCRIPTION_STR "User Interface for the Local Monitor"
@@ -35,3 +35,6 @@
#define WINE_PRODUCTVERSION_STR "5.1.2600.2180"
#include "wine/wine_common_ver.rc"
+
+
+#include "ui_En.rc"
diff --git a/dlls/localui/ui_En.rc b/dlls/localui/ui_En.rc
new file mode 100644
index 0000000..7b687f1
--- /dev/null
+++ b/dlls/localui/ui_En.rc
@@ -0,0 +1,27 @@
+/*
+ * English resources for localui
+ *
+ * Copyright 2007 Detlef Riekenberg
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_LOCALPORT "Local Port"
+ IDS_NOTHINGTOCONFIG "This port has no options to configure"
+}
ChangeSet ID: 31053
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner(a)winehq.org 2007/04/19 18:19:24
Modified files:
include : testData_queue.php
Log message:
Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com>
Conform testData_queue to OM standards
Patch: http://cvs.winehq.org/patch.py?id=31053
Old revision New revision Changes Path
1.1 1.2 +68 -2 appdb/include/testData_queue.php
Index: appdb/include/testData_queue.php
diff -u -p appdb/include/testData_queue.php:1.1 appdb/include/testData_queue.php:1.2
--- appdb/include/testData_queue.php:1.1 19 Apr 2007 23:19:24 -0000
+++ appdb/include/testData_queue.php 19 Apr 2007 23:19:24 -0000
@@ -18,7 +18,18 @@ class testData_queue
$this->oDistribution->create();
$this->oTestData->iDistributionId = $this->oDistribution->iDistributionId;
}
- $this->oTestData->create();
+ return $this->oTestData->create();
+ }
+
+ function delete()
+ {
+ return $this->oTestData->delete();
+ }
+
+ function unQueue()
+ {
+ $this->oTestData->unQueue();
+ $this->oDistribution->unQueue();
}
function update()
@@ -31,9 +42,17 @@ class testData_queue
{
$this->oTestData->outputEditor();
+ /* If we are processing queued test results with a queued distribution, we display
+ some additional help here */
+ if($this->oDistribution->sQueued != "false" && $this->canEdit())
+ {
+ echo "The user submitted a new distribution, which will be un-queued together ".
+ "with the test data unless you select an existing one from the list above.";
+ }
+
/* If the testData is already associated with a distribution and the distribution is
un-queued, there is no need to display the distribution form here */
- if(!$this->oTestData->iDistributionId or $this->oDistributionId->sQueued != "false")
+ if(!$this->oTestData->iDistributionId or $this->oDistribution->sQueued != "false")
$this->oDistribution->outputEditor();
}
@@ -57,6 +76,53 @@ class testData_queue
{
$this->oTestData->objectDisplayAddItemHelp();
}
+
+ function objectGetEntries($bQueued, $bRejected)
+ {
+ return $this->oTestData->objectGetEntries($bQueued, $bRejected);
+ }
+
+ function objectGetHeader()
+ {
+ return $this->oTestData->objectGetHeader();
+ }
+
+ function objectGetInstanceFromRow($oRow)
+ {
+ return testData::objectGetInstanceFromRow($oRow);
+ }
+
+ function objectOutputTableRow($oObject, $sClass, $sEditLinkLabel)
+ {
+ return $this->oTestData->objectOutputTableRow($oObject, $sClass, $sEditLinkLabel);
+ }
+
+ function objectDisplayQueueProcessingHelp()
+ {
+ $oTest = new testData();
+ echo "<p>";
+ if($oTest->canEdit)
+ echo "This is the list of rejected test results, waiting to be resubmitted or deleted.";
+ else
+ echo "This is the list of your rejected test results. Here you can make changes to ".
+ "them and resubmit them into the database.";
+ echo "</p>\n";
+ }
+
+ function display()
+ {
+ return $this->oTest->display();
+ }
+
+ function objectMakeUrl()
+ {
+ return $this->oTest->objectMakeUrl();
+ }
+
+ function objectMakeLink()
+ {
+ return $this->oTest->objectMakeLink();
+ }
}
?>