* BUG: Do not try to change the background color of menus. It breaks GTK+
  widget style like Ambiance.

[GB.WEB]
* BUG: Setting a Request value to NULL now works as expected.


git-svn-id: svn://localhost/gambas/trunk@4573 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-03-28 21:55:19 +00:00
parent e086cced60
commit 7ecc12bfe8
6 changed files with 67 additions and 15 deletions

View File

@ -55,6 +55,10 @@ Public Sub DecodeURL(sUrl As String, aField As String[], cVal As Collection)
Next
' Catch
'
' Error.Raise("Malformed URL:" & Error.Where & ": " & Error.Text)
'
End

View File

@ -16,6 +16,7 @@ Property Read Post As _Request_Post
Private $cCookies As Collection
Private $cVal As Collection
Private $cKey As Collection
Private $aField As String[]
Private $iMaxLength As Integer
Private $sBuffer As String
@ -45,7 +46,7 @@ Public Sub _get(Key As String) As String
Dim sVal As String
If $cVal And If $cVal.Exist(Key) Then Return $cVal[Key]
If $cKey And If $cKey.Exist(Key) Then Return $cVal[Key]
Decode
@ -60,8 +61,13 @@ End
Public Sub _put(Value As String, Key As String)
If Not $cVal Then $cVal = New Collection
If Not $cVal Then
$cVal = New Collection
$cKey = New Collection
Endif
$cVal[Key] = Value
$cKey[Key] = True
End

View File

@ -1,9 +1,9 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.0.0
# Compiled with Gambas 3.0.90
Title=Gambas Music Player
Startup=FSoundPlayer
Icon=sound.png
Version=3.0.0
Version=3.0.90
VersionFile=1
Component=gb.image
Component=gb.gui

View File

@ -223,8 +223,8 @@ void gMenu::update()
{
gMainWindow *win = (gMainWindow *)pr;
set_gdk_fg_color(GTK_WIDGET(menu), win->foreground());
set_gdk_bg_color(GTK_WIDGET(menu), win->background());
//set_gdk_fg_color(GTK_WIDGET(menu), win->foreground());
//set_gdk_bg_color(GTK_WIDGET(menu), win->background());
//gtk_menu_shell_append(GTK_MENU_SHELL(win->menuBar), GTK_WIDGET(menu));
shell = GTK_MENU_SHELL(win->menuBar);
@ -244,6 +244,8 @@ void gMenu::update()
if (parent->style() == MENU)
gtk_menu_item_set_submenu(GTK_MENU_ITEM(parent->menu), GTK_WIDGET(parent->child));
parent->setColor();
//gtk_menu_shell_append(GTK_MENU_SHELL(parent->child), GTK_WIDGET(menu));
//g_debug("%p: add to new parent %p", this, parent->child);
}
@ -798,13 +800,13 @@ void gMenu::setFont()
void gMenu::setColor()
{
gMainWindow *win = window();
if (child)
/*if (child)
{
set_gdk_bg_color(GTK_WIDGET(child), win->realBackground());
set_gdk_fg_color(GTK_WIDGET(child), win->realForeground());
}
if (label) set_gdk_fg_color(GTK_WIDGET(label), win->realForeground());
if (aclbl) set_gdk_fg_color(GTK_WIDGET(aclbl), win->realForeground());
set_gdk_bg_color(GTK_WIDGET(child), win->background());
set_gdk_fg_color(GTK_WIDGET(child), win->foreground());
}*/
if (label) set_gdk_fg_color(GTK_WIDGET(label), win->foreground());
if (aclbl) set_gdk_fg_color(GTK_WIDGET(aclbl), win->foreground());
}
void gMenu::updateColor(gMainWindow *win)
@ -815,7 +817,7 @@ void gMenu::updateColor(gMainWindow *win)
if (!win->menuBar)
return;
set_gdk_bg_color(GTK_WIDGET(win->menuBar), win->realBackground());
set_gdk_bg_color(GTK_WIDGET(win->menuBar), win->background());
if (!menus)
return;

View File

@ -33,6 +33,8 @@
#include <dlfcn.h>
#include <stdarg.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "gbx_class.h"
#include "gbx_exec.h"
@ -186,6 +188,10 @@ int main(int argc, char **argv)
//log_file = freopen(log_path, "w+", stderr);
//fprintf(stderr, "Fichier log Gambas\n");
//struct rlimit rl = { 32000000, 32000000 };
//if (setrlimit(RLIMIT_CORE, &rl))
// perror(strerror(errno));
MEMORY_init();
COMMON_init();
//STRING_init();

View File

@ -460,6 +460,23 @@ void EXEC_loop(void)
_MAIN:
#if 0
{
FILE *f;
f = fopen("/var/log/thttpd/pcode.log", "a");
if (f)
{
fprintf(f, "%s: ", DEBUG_get_current_position());
if (*PC >> 8)
PCODE_dump(f, PC - FP->code, PC);
else
fprintf(f, "\n");
fclose(f);
}
}
#endif
#if DEBUG_PCODE
DEBUG_where();
fprintf(stderr, "[%4d] ", (int)(intptr_t)(SP - (VALUE *)STACK_base));
@ -489,6 +506,23 @@ _NEXT:
code = *(++PC);
#if 0
{
FILE *f;
f = fopen("/var/log/thttpd/pcode.log", "a");
if (f)
{
fprintf(f, "%s: ", DEBUG_get_current_position());
if (*PC >> 8)
PCODE_dump(f, PC - FP->code, PC);
else
fprintf(f, "\n");
fclose(f);
}
}
#endif
#if DEBUG_PCODE
DEBUG_where();
fprintf(stderr, "[%4d] ", (int)(intptr_t)(SP - (VALUE *)STACK_base));