Module: appdb
Branch: master
Commit: 852768f9770ff268355ce3308196a3e9ee7b4e2f
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=852768f9770ff268355ce330…
Author: Alexander Nicolaysen Sørnes <alexsornes(a)gmail.com>
Date: Sun Apr 24 12:54:48 2011 +0200
objectManager: Retrieve Common replies from the database
---
include/objectManager.php | 45 +++++++++++++++------------------------------
1 files changed, 15 insertions(+), 30 deletions(-)
diff --git a/include/objectManager.php b/include/objectManager.php
index 864845e..00c7251 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -26,10 +26,6 @@ class ObjectManager
where we first run the object's getOutputEditorValues()
and then objectManager's delete_entry(). */
- // an array of common responses used when replying to
- // queued entries
- private $aCommonResponses;
-
/* Remove the cached object of the class we are working with, useful in cases where we
modify the object in such a way that it needs to be reloaded */
private function flushCachedObject()
@@ -140,27 +136,6 @@ class ObjectManager
$this->oTableRow = new OMTableRow(null);
$this->sState = 'accepted';
$this->oFilters = null; // We only fill this when needed, as it can be quite slow
-
- // initialize the common responses array
- $this->aCommonResponses = array();
- $this->aCommonResponses[] = "Thank you for your submission.";
- $this->aCommonResponses[] = "Please consider filing a bug for the ".
- "problem you have with this app, if there are not bugs filed already".
- " at http://bugs.winehq.org. If you want some advice or guidance on".
- " this, please visit http://forum.winehq.org";
- $this->aCommonResponses[] = "Please do not paste debug output in the AppDB,".
- " it belongs only as an attachment on bugzilla.";
- $this->aCommonResponses[] = "We appreciate your submission but it".
- " needs to be more detailed before it will be most useful to other users of".
- " the Application Database.".
- " Please try to improve the entry and resubmit.";
- $this->aCommonResponses[] = "We appreciate your submission but it".
- " requires improvement to its grammar and/or spelling".
- " before it will be most useful to other users of".
- " the Application Database.".
- " Please try to improve the entry and resubmit.";
- $this->aCommonResponses[] = "Please do not copy large amount of text from".
- " the program's website";
}
/* Check whether the associated class has the given method */
@@ -459,16 +434,26 @@ class ObjectManager
{
/////////////////////////////////////////////////
// output radio buttons for some common responses
+
+ $oTag = new TagCommonReply(null, null, "_show_for_{$this->sClass}");
+ $aReplies = $oTag->getTaggedEntries();
+
+ if(!sizeof($aReplies))
+ $sHelp = 'There are no common replies for processing this type of entries';
+ else
+ $sHelp = 'Clicking on a reply will copy it to the E-mail text field';
+
echo '<tr valign=top><td class="color0"></td><td class="color0">'.
- '<b>Common replies</b><br> Clicking on a reply will copy it to the E-mail text field.<br> '.
+ '<b>Common replies</b><br> '.$sHelp.'.<br> '.
'Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
APPDB_OWNER_EMAIL.'</a> if you want to suggest a new common reply.</td></tr>',"\n";
- foreach($this->aCommonResponses as $iIndex => $sReply)
+ foreach($aReplies as $oReply)
{
- echo '<tr valign=top><td class="color0"></td>',"\n";
- echo '<td class="color0"><a onClick="document.forms[\'sQform\'][\'sReplyText\'].innerHTML += \''.$sReply.' \';">'.$sReply.'</a></td>',"\n";
- echo '</tr>',"\n";
+ $sReply = $oReply->getReply();
+ echo '<tr valign=top><td class="color0"></td>',"\n";
+ echo '<td class="color0"><a onClick="document.forms[\'sQform\'][\'sReplyText\'].innerHTML += \''.$sReply.' \';">'.$sReply.'</a></td>',"\n";
+ echo '</tr>',"\n";
}
// end output radio buttons for common responses
/////////////////////////////////////////////////
Module: appdb
Branch: master
Commit: 1812b4778d847493582ee2071ea00327672dae3c
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=1812b4778d847493582ee207…
Author: Alexander Nicolaysen Sørnes <alexsornes(a)gmail.com>
Date: Sat Apr 23 16:40:04 2011 +0200
objectManager: Make it possible to add more than one common when processing items
---
include/objectManager.php | 25 +++----------------------
1 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/include/objectManager.php b/include/objectManager.php
index 82d1a26..864845e 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -460,19 +460,14 @@ class ObjectManager
/////////////////////////////////////////////////
// output radio buttons for some common responses
echo '<tr valign=top><td class="color0"></td><td class="color0">'.
- '<b>Common replies</b><br> Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
+ '<b>Common replies</b><br> Clicking on a reply will copy it to the E-mail text field.<br> '.
+ 'Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
APPDB_OWNER_EMAIL.'</a> if you want to suggest a new common reply.</td></tr>',"\n";
- // NOTE: We use the label tag so the user can click anywhere in
- // the text of the radio button to select the radio button.
- // Otherwise the user has to click on the very small circle portion
- // of the button to select it
foreach($this->aCommonResponses as $iIndex => $sReply)
{
echo '<tr valign=top><td class="color0"></td>',"\n";
- echo '<td class="color0"><label for="'.$iIndex.'"><input'.
- ' type="radio" name="sOMCommonReply" id="'.$iIndex.'" value="'.$sReply.'">'.
- $sReply.'</label></td>',"\n";
+ echo '<td class="color0"><a onClick="document.forms[\'sQform\'][\'sReplyText\'].innerHTML += \''.$sReply.' \';">'.$sReply.'</a></td>',"\n";
echo '</tr>',"\n";
}
// end output radio buttons for common responses
@@ -1401,12 +1396,6 @@ class ObjectManager
/* Process form data generated by adding or updating an entry */
public function processForm($aClean)
{
- // FIXME: hack so if we modify $aClean in here any objects that use the global
- // $aClean will see the modified value. Should be replaced when we have
- // general purpose objectManager email code in place since the sReplyText value
- // is the value we modify and we'll be passing that into methods in the future
- global $aClean;
-
if(!isset($aClean['sSubmit']))
return;
@@ -1436,14 +1425,6 @@ class ObjectManager
$aClean['sReplyText'] = "";
}
- // handle the common response radio button value
- // if sReplyText is empty, if sOMCommonReply was set because
- // the user selected a radio button then use that text instead
- if( isset($aClean['sReplyText']) && $aClean['sReplyText'] == "" && isset($aClean['sOMCommonReply']))
- {
- $aClean['sReplyText'] = $aClean['sOMCommonReply'];
- }
-
$oObject->getOutputEditorValues($aClean);
/* Check input, if necessary */
Module: wine
Branch: master
Commit: dbc8702e44a987b77cdf9af31b964bb27e86fa92
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dbc8702e44a987b77cdf9af31…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Wed Apr 20 16:28:05 2011 +0200
wined3d: Scale the depthbias factor by the depth buffer's depth.
---
dlls/wined3d/device.c | 5 +++++
dlls/wined3d/state.c | 25 +++++++++++++++++++++----
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 8c443fe..827365a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5941,6 +5941,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZENABLE));
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_STENCILENABLE));
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_STENCILWRITEMASK));
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_DEPTHBIAS));
+ }
+ else if (tmp && tmp->resource.format->depth_size != This->depth_stencil->resource.format->depth_size)
+ {
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_DEPTHBIAS));
}
return WINED3D_OK;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 88ccd1b..801563e 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1743,14 +1743,17 @@ static void state_scissor(DWORD state, struct wined3d_stateblock *stateblock, st
* convert from D3D to GL we need to divide the D3D depth bias by that value.
* There's no practical way to retrieve that value from a given GL
* implementation, but the D3D application has essentially the same problem,
- * which makes a guess of 1e-6f seem reasonable here. Note that
- * SLOPESCALEDEPTHBIAS is a scaling factor for the depth slope, and doesn't
- * need to be scaled. */
+ * which makes a guess of the depth buffer format's highest possible value a
+ * reasonable guess. Note that SLOPESCALEDEPTHBIAS is a scaling factor for the
+ * depth slope, and doesn't need to be scaled. */
static void state_depthbias(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
if (stateblock->state.render_states[WINED3DRS_SLOPESCALEDEPTHBIAS]
|| stateblock->state.render_states[WINED3DRS_DEPTHBIAS])
{
+ IWineD3DSurfaceImpl *depth = stateblock->device->depth_stencil;
+ float scale;
+
union
{
DWORD d;
@@ -1763,7 +1766,21 @@ static void state_depthbias(DWORD state, struct wined3d_stateblock *stateblock,
glEnable(GL_POLYGON_OFFSET_FILL);
checkGLcall("glEnable(GL_POLYGON_OFFSET_FILL)");
- glPolygonOffset(scale_bias.f, const_bias.f * 1e6f);
+ if (depth)
+ {
+ const struct wined3d_format *fmt = depth->resource.format;
+ scale = powf(2, fmt->depth_size) - 1;
+ TRACE("Depth format %s, using depthbias scale of %f\n",
+ debug_d3dformat(fmt->id), scale);
+ }
+ else
+ {
+ /* The context manager will reapply this state on a depth stencil change */
+ TRACE("No depth stencil, using depthbias scale of 0.0\n");
+ scale = 0;
+ }
+
+ glPolygonOffset(scale_bias.f, const_bias.f * scale);
checkGLcall("glPolygonOffset(...)");
} else {
glDisable(GL_POLYGON_OFFSET_FILL);