changeset 1916:8dd80f88c992

dpi/downloads.cc: make the indentation consistent.
author Jeremy Henty <onepoint@starurchin.org>
date Mon, 07 Feb 2011 07:58:14 +0000
parents 9e14c9633f18
children ab62ebbd29ba 55bcbcd9d8bb
files dpi/downloads.cc
diffstat 1 files changed, 96 insertions(+), 96 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/downloads.cc	Sat Jan 08 17:56:56 2011 +0000
+++ b/dpi/downloads.cc	Mon Feb 07 07:58:14 2011 +0000
@@ -72,33 +72,33 @@
 // class FL_API ProgressBar : public Widget {
 class ProgressBar : public Widget {
 protected:
-  double mMin;
-  double mMax;
-  double mPresent;
-  double mStep;
-  bool mShowPct, mShowMsg;
-  char mMsg[64];
-  Color mTextColor;
-  void draw();
+   double mMin;
+   double mMax;
+   double mPresent;
+   double mStep;
+   bool mShowPct, mShowMsg;
+   char mMsg[64];
+   Color mTextColor;
+   void draw();
 public:
-  ProgressBar(int x, int y, int w, int h, const char *lbl = 0);
-  void range(double min, double max, double step = 1)  {
-     mMin = min; mMax = max; mStep = step;
-  };
-  void step(double step)        { mPresent += step; redraw(); };
-  void move(double step);
-  double minimum()        { return mMin; }
-  double maximum()        { return mMax; }
-  void minimum(double nm) { mMin = nm; };
-  void maximum(double nm) { mMax = nm; };
-  double position  ()     { return mPresent; }
-  double step()           { return mStep; }
-  void position(double pos)     { mPresent = pos; redraw(); }
-  void showtext(bool st)        { mShowPct = st; }
-  void message(char *msg) { mShowMsg = true; strncpy(mMsg,msg,63); redraw(); }
-  bool showtext()               { return mShowPct; }
-  void text_color(Color col)    { mTextColor = col; }
-  Color text_color()      { return mTextColor; }
+   ProgressBar(int x, int y, int w, int h, const char *lbl = 0);
+   void range(double min, double max, double step = 1)  {
+      mMin = min; mMax = max; mStep = step;
+   };
+   void step(double step)        { mPresent += step; redraw(); };
+   void move(double step);
+   double minimum()        { return mMin; }
+   double maximum()        { return mMax; }
+   void minimum(double nm) { mMin = nm; };
+   void maximum(double nm) { mMax = nm; };
+   double position  ()     { return mPresent; }
+   double step()           { return mStep; }
+   void position(double pos)     { mPresent = pos; redraw(); }
+   void showtext(bool st)        { mShowPct = st; }
+   void message(char *msg) { mShowMsg = true; strncpy(mMsg,msg,63); redraw(); }
+   bool showtext()               { return mShowPct; }
+   void text_color(Color col)    { mTextColor = col; }
+   Color text_color()      { return mTextColor; }
 };
 
 // Download-item class -------------------------------------------------------
@@ -261,7 +261,7 @@
    } else {
       Rectangle r2(int (r.w() * pct), 0, int (w() * .1), h());
       push_clip(r2);
-       fillrect(r);
+      fillrect(r);
       pop_clip();
    }
 
@@ -349,72 +349,72 @@
    gw = 400, gh = 70;
    group = new Group(0,0,gw,gh);
    group->begin();
-    prTitle = new Widget(24, 7, 290, 23, shortname);
-    prTitle->box(RSHADOW_BOX);
-    prTitle->align(ALIGN_LEFT|ALIGN_INSIDE|ALIGN_CLIP);
-    prTitle->set_flag (RAW_LABEL);
-    // Attach this 'log_text' to the tooltip
-    log_text_add("Target File: ", 13);
-    log_text_add(fullname, strlen(fullname));
-    log_text_add("\n\n", 2);
-
-    prBar = new ProgressBar(24, 40, 92, 20);
-    prBar->box(BORDER_BOX); // ENGRAVED_BOX
-    prBar->tooltip("Progress Status");
-
-    int ix = 122, iy = 36, iw = 50, ih = 14;
-    Widget *o = new Widget(ix,iy,iw,ih, "Got");
-    o->box(RFLAT_BOX);
-    o->color((Color)0xc0c0c000);
-    o->tooltip("Downloaded Size");
-    prGot = new Widget(ix,iy+14,iw,ih, "0KB");
-    prGot->align(ALIGN_CENTER|ALIGN_INSIDE);
-    prGot->labelcolor((Color)0x6c6cbd00);
-    prGot->box(NO_BOX);
-
-    ix += iw;
-    o = new Widget(ix,iy,iw,ih, "Size");
-    o->box(RFLAT_BOX);
-    o->color((Color)0xc0c0c000);
-    o->tooltip("Total Size");
-    prSize = new Widget(ix,iy+14,iw,ih, "??");
-    prSize->align(ALIGN_CENTER|ALIGN_INSIDE);
-    prSize->box(NO_BOX);
+   prTitle = new Widget(24, 7, 290, 23, shortname);
+   prTitle->box(RSHADOW_BOX);
+   prTitle->align(ALIGN_LEFT|ALIGN_INSIDE|ALIGN_CLIP);
+   prTitle->set_flag (RAW_LABEL);
+   // Attach this 'log_text' to the tooltip
+   log_text_add("Target File: ", 13);
+   log_text_add(fullname, strlen(fullname));
+   log_text_add("\n\n", 2);
 
-    ix += iw;
-    o = new Widget(ix,iy,iw,ih, "Rate");
-    o->box(RFLAT_BOX);
-    o->color((Color)0xc0c0c000);
-    o->tooltip("Current transfer Rate (KBytes/sec)");
-    prRate = new Widget(ix,iy+14,iw,ih, "??");
-    prRate->align(ALIGN_CENTER|ALIGN_INSIDE);
-    prRate->box(NO_BOX);
+   prBar = new ProgressBar(24, 40, 92, 20);
+   prBar->box(BORDER_BOX); // ENGRAVED_BOX
+   prBar->tooltip("Progress Status");
 
-    ix += iw;
-    o = new Widget(ix,iy,iw,ih, "~Rate");
-    o->box(RFLAT_BOX);
-    o->color((Color)0xc0c0c000);
-    o->tooltip("Average transfer Rate (KBytes/sec)");
-    pr_Rate = new Widget(ix,iy+14,iw,ih, "??");
-    pr_Rate->align(ALIGN_CENTER|ALIGN_INSIDE);
-    pr_Rate->box(NO_BOX);
+   int ix = 122, iy = 36, iw = 50, ih = 14;
+   Widget *o = new Widget(ix,iy,iw,ih, "Got");
+   o->box(RFLAT_BOX);
+   o->color((Color)0xc0c0c000);
+   o->tooltip("Downloaded Size");
+   prGot = new Widget(ix,iy+14,iw,ih, "0KB");
+   prGot->align(ALIGN_CENTER|ALIGN_INSIDE);
+   prGot->labelcolor((Color)0x6c6cbd00);
+   prGot->box(NO_BOX);
 
-    ix += iw;
-    prETAt = o = new Widget(ix,iy,iw,ih, "ETA");
-    o->box(RFLAT_BOX);
-    o->color((Color)0xc0c0c000);
-    o->tooltip("Estimated Time of Arrival");
-    prETA = new Widget(ix,iy+14,iw,ih, "??");
-    prETA->align(ALIGN_CENTER|ALIGN_INSIDE);
-    prETA->box(NO_BOX);
+   ix += iw;
+   o = new Widget(ix,iy,iw,ih, "Size");
+   o->box(RFLAT_BOX);
+   o->color((Color)0xc0c0c000);
+   o->tooltip("Total Size");
+   prSize = new Widget(ix,iy+14,iw,ih, "??");
+   prSize->align(ALIGN_CENTER|ALIGN_INSIDE);
+   prSize->box(NO_BOX);
 
-    //ix += 50;
-    //prButton = new HighlightButton(ix, 41, 38, 19, "Stop");
-    prButton = new HighlightButton(328, 9, 38, 19, "Stop");
-    prButton->tooltip("Stop this transfer");
-    prButton->box(UP_BOX);
-    prButton->clear_tab_to_focus();
-    prButton->callback(prButton_scb, this);
+   ix += iw;
+   o = new Widget(ix,iy,iw,ih, "Rate");
+   o->box(RFLAT_BOX);
+   o->color((Color)0xc0c0c000);
+   o->tooltip("Current transfer Rate (KBytes/sec)");
+   prRate = new Widget(ix,iy+14,iw,ih, "??");
+   prRate->align(ALIGN_CENTER|ALIGN_INSIDE);
+   prRate->box(NO_BOX);
+
+   ix += iw;
+   o = new Widget(ix,iy,iw,ih, "~Rate");
+   o->box(RFLAT_BOX);
+   o->color((Color)0xc0c0c000);
+   o->tooltip("Average transfer Rate (KBytes/sec)");
+   pr_Rate = new Widget(ix,iy+14,iw,ih, "??");
+   pr_Rate->align(ALIGN_CENTER|ALIGN_INSIDE);
+   pr_Rate->box(NO_BOX);
+
+   ix += iw;
+   prETAt = o = new Widget(ix,iy,iw,ih, "ETA");
+   o->box(RFLAT_BOX);
+   o->color((Color)0xc0c0c000);
+   o->tooltip("Estimated Time of Arrival");
+   prETA = new Widget(ix,iy+14,iw,ih, "??");
+   prETA->align(ALIGN_CENTER|ALIGN_INSIDE);
+   prETA->box(NO_BOX);
+
+   //ix += 50;
+   //prButton = new HighlightButton(ix, 41, 38, 19, "Stop");
+   prButton = new HighlightButton(328, 9, 38, 19, "Stop");
+   prButton->tooltip("Stop this transfer");
+   prButton->box(UP_BOX);
+   prButton->clear_tab_to_focus();
+   prButton->callback(prButton_scb, this);
 
    group->box(ROUND_UP_BOX);
    group->end();
@@ -1078,13 +1078,13 @@
    // Create the empty main window
    mWin = new Window(ww, wh, "Downloads:");
    mWin->begin();
-    mScroll = new ScrollGroup(0,0,ww,wh);
-    mScroll->begin();
-     mPG = new PackedGroup(0,0,ww,wh);
-     mPG->end();
-     //mPG->spacing(10);
-    mScroll->end();
-    mScroll->type(ScrollGroup::VERTICAL);
+   mScroll = new ScrollGroup(0,0,ww,wh);
+   mScroll->begin();
+   mPG = new PackedGroup(0,0,ww,wh);
+   mPG->end();
+   //mPG->spacing(10);
+   mScroll->end();
+   mScroll->type(ScrollGroup::VERTICAL);
    mWin->end();
    mWin->resizable(mScroll);
    mWin->callback(dlwin_esc_cb, NULL);