changeset 2008:0da9d72218ee

merge
author Jorge Arellano Cid <jcid@dillo.org>
date Wed, 11 May 2011 15:41:15 -0400
parents c2097a6f1b84 (current diff) 2a952b378cdc (diff)
children 234097ef5e23
files dw/layout.cc
diffstat 5 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkui.cc	Fri May 06 18:50:29 2011 -0300
+++ b/dw/fltkui.cc	Wed May 11 15:41:15 2011 -0400
@@ -235,7 +235,7 @@
 
 FltkLabelButtonResource::~FltkLabelButtonResource ()
 {
-   delete label;
+   free((char *)label);
 }
 
 Fl_Widget *FltkLabelButtonResource::createNewWidget (core::Allocation
@@ -448,9 +448,9 @@
 FltkEntryResource::~FltkEntryResource ()
 {
    if (initText)
-      delete initText;
+      free((char *)initText);
    if (label)
-      delete label;
+      free(label);
 }
 
 Fl_Widget *FltkEntryResource::createNewWidget (core::Allocation
@@ -533,7 +533,7 @@
 void FltkEntryResource::setText (const char *text)
 {
    if (initText)
-      delete initText;
+      free((char *)initText);
    initText = strdup (text);
 
    ((Fl_Input*)widget)->value (initText);
@@ -885,7 +885,7 @@
       if (menu[i].text)
          free((char *) menu[i].text);
    }
-   delete menu;
+   delete[] menu;
 }
 
 void FltkOptionMenuResource::setWidgetStyle (Fl_Widget *widget,
@@ -961,7 +961,7 @@
    newMenu = new Fl_Menu_Item[itemsAllocated];
    memcpy(newMenu, menu, itemsUsed * sizeof(Fl_Menu_Item));
    memset(newMenu + itemsUsed, 0, 0x10 * sizeof(Fl_Menu_Item));
-   delete menu;
+   delete[] menu;
    menu = newMenu;
    ch->menu(menu);
    ch->value(selected);
--- a/dw/image.cc	Fri May 06 18:50:29 2011 -0300
+++ b/dw/image.cc	Wed May 11 15:41:15 2011 -0400
@@ -157,7 +157,7 @@
 Image::~Image()
 {
    if (altText)
-      delete altText;
+      free(altText);
    if (buffer)
       buffer->unref ();
    if (mapKey)
--- a/dw/layout.cc	Fri May 06 18:50:29 2011 -0300
+++ b/dw/layout.cc	Wed May 11 15:41:15 2011 -0400
@@ -174,7 +174,7 @@
 
 Layout::Anchor::~Anchor ()
 {
-   delete name;
+   free(name);
 }
 
 // ---------------------------------------------------------------------
--- a/lout/object.cc	Fri May 06 18:50:29 2011 -0300
+++ b/lout/object.cc	Wed May 11 15:41:15 2011 -0400
@@ -224,7 +224,7 @@
 String::~String ()
 {
   if (str)
-    delete str;
+    free((char *)str);
 }
 
 // ------------
--- a/src/ui.cc	Fri May 06 18:50:29 2011 -0300
+++ b/src/ui.cc	Wed May 11 15:41:15 2011 -0400
@@ -200,7 +200,7 @@
    CustProgressBox(int x, int y, int w, int h, const char *l=0) :
       Fl_Box(x,y,w,h,l) { padding = 0; };
    void update_label(const char *lbl) {
-      int w,h;
+      int w = 0, h = 0;
       if (!padding) {
          copy_label("W");
          measure_label(w, h);
@@ -520,7 +520,7 @@
 Fl_Widget *UI::make_filemenu_button()
 {
    Fl_Button *btn;
-   int w,h, padding;
+   int w = 0, h = 0, padding;
 
    FileButton = btn = new Fl_Button(p_xpos,0,0,0,"W");
    btn->labeltype(FL_FREE_LABELTYPE);
@@ -754,6 +754,9 @@
 {
    _MSG("UI::~UI()\n");
    dFree(TabTooltip);
+
+   if (!FindBarSpace)
+      delete FindBar;
 }
 
 /*