Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ LOCAL_INCLUDE_PATHS = Src/Source \

# Specify the level of optimization that you want. Specify either NONE (O0),
# SOME (O1), FULL (O2), or leave blank (for the default optimization level).
OPTIMIZE := NONE
OPTIMIZE := FULL

# Specify the codes for languages you are going to support in this
# application. The default "en" one must be provided too. "make catkeys"
Expand Down
5 changes: 3 additions & 2 deletions Src/Headers/AboutWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define ABOUT_WINDOW_H

#include <be/app/Message.h>
#include <be/app/MessageRunner.h>
#include <be/app/Messenger.h>
#include <be/interface/Bitmap.h>
#include <be/interface/Button.h>
Expand All @@ -17,7 +18,7 @@
#include "GradientView.h"

const uint32 UPDATE_COLORS = 'updt';
const int32 UPDATE_TIME = 100;
const int32 UPDATE_TIME = 2000;

class AboutView : public BView {
public:
Expand All @@ -44,7 +45,7 @@ class AboutWindow : public BWindow {
private:
AboutView* m_about;
BMessenger* m_msgr;

BMessageRunner* m_run;
BButton *m_homePage, *m_donate, *m_beBits, *m_quit;

GradientView* m_gradient;
Expand Down
3 changes: 1 addition & 2 deletions Src/Headers/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ namespace AboutMessages
const uint32 K_ABOUT_WINDOW_QUIT = 'abwq',
K_ABOUT_WINDOW_LAUNCH = 'abwg',
K_GOTO_BETEX_HOMEPAGE = 'gtbh',
K_GOTO_BETEX_DONATEPAGE = 'gtbd',
K_GOTO_BETEX_BEBITSPAGE = 'gbbb'
K_GOTO_BETEX_DONATEPAGE = 'gtbd'
;
};

Expand Down
6 changes: 1 addition & 5 deletions Src/Headers/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include <be/interface/MenuItem.h>
#include <be/interface/Rect.h>
#include <be/interface/ScrollView.h>
#include <be/interface/View.h>
#include <be/interface/Window.h>
#include <be/storage/FilePanel.h>
#include <be/storage/FindDirectory.h>
#include <be/storage/NodeMonitor.h>
Expand All @@ -17,9 +15,9 @@
using std::vector;

#include "AboutWindow.h"
#include "BubbleHelper.h"
#include "ColorWindow.h"
#include "DimensionWindow.h"
#include "DocView.h"
#include "GoToLineWindow.h"
#include "MainTBar.h"
#include "PrefsWindow.h"
Expand All @@ -29,8 +27,6 @@ using std::vector;
#include "SplitPane.h"
#include "StatusBar.h"
#include "TexBar.h"
#include "TexView.h"
#include "iconheaders/ConverterIcons.h"

class MainWindow : public BWindow {
public:
Expand Down
1 change: 0 additions & 1 deletion Src/Headers/Prefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <iostream>
#include <map>
#include <string>

#include <Archivable.h>
#include <File.h>
Expand Down
4 changes: 0 additions & 4 deletions Src/Headers/PrefsWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
#include <be/interface/CheckBox.h>
#include <be/interface/Rect.h>
#include <be/interface/Slider.h>
#include <be/interface/StringView.h>
#include <be/interface/TextControl.h>
#include <be/interface/View.h>
#include <be/interface/Window.h>

#include "ColorButton.h"
#include "Prefs.h"
Expand Down
1 change: 0 additions & 1 deletion Src/Headers/ProjectItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <be/interface/ListItem.h>
#include <be/interface/Rect.h>
#include <be/interface/ScrollView.h>
#include <be/interface/View.h>
#include <be/storage/Path.h>


Expand Down
2 changes: 0 additions & 2 deletions Src/Headers/SearchWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include <be/interface/CheckBox.h>
#include <be/interface/Rect.h>
#include <be/interface/ScrollView.h>
#include <be/interface/View.h>
#include <be/interface/Window.h>
#include "TexView.h"

class ParentView;
Expand Down
1 change: 0 additions & 1 deletion Src/Headers/TexView.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <be/interface/Rect.h>
#include <be/interface/TextView.h>
#include <be/storage/Entry.h>
#include <be/storage/File.h>
#include <be/support/String.h>

#include <Messenger.h>
Expand Down
52 changes: 22 additions & 30 deletions Src/Source/AboutWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ AboutView::Draw(BRect updateRect)
DrawBitmap(m_logo);
MovePenTo((updateRect.Width() - m_logo->Bounds().Width()) / 4, 0);

MovePenBy(0, 100);
MovePenBy(0, 90);
BPoint p = PenLocation();

BString about_line;
// about_line << "BeTeX " << BETEX_VERSION << " by Brent Miszalski";
about_line << "BeTeX " /*<< BETEX_VERSION <<*/ " by Brent Miszalski";
DrawString(about_line.String()); //.\nThanks to:\n\tEli Dayan\n\tMichael Pfeiffer\n");
MovePenTo(p);
MovePenBy(0, 20);
Expand All @@ -51,6 +51,9 @@ AboutView::Draw(BRect updateRect)
MovePenTo(p);
MovePenBy(font.StringWidth("Thanks To: "), 20);
DrawString("Michael Pfeiffer");
MovePenTo(p);
MovePenBy(0, 40);
DrawString("Adapted to Haiku by Sylvain Kerjean");

updateRect = Bounds();
SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_LIGHTEN_2_TINT));
Expand Down Expand Up @@ -94,51 +97,46 @@ AboutWindow::AboutWindow(BRect frame, BMessenger* messenger)
AddChild(m_gradient = new GradientView(specRect, m_top, m_bottom));

BRect aboutRect = Bounds();
aboutRect.InsetBy(80, 60);
aboutRect.InsetBy(70, 60);
m_about = new AboutView(aboutRect);
m_about->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
m_gradient->AddChild(m_about);

int bwidth = 50;
int bheight = 30;
int bpad = 10;
BRect btnRect(frame.right - (2 * bpad) - bwidth, frame.bottom - (2 * bpad) - bheight,
frame.right - (2 * bpad), frame.bottom - (2 * bpad));
int bpad = (aboutRect.Width() - (60 + 120 + 50)) / 2;
BRect btnRect(
aboutRect.right - bwidth, frame.bottom - 15 - bheight, aboutRect.right, frame.bottom - 15);
m_quit
= new BButton(btnRect, "quitbtn", "OK", new BMessage(AboutMessages::K_ABOUT_WINDOW_QUIT));
m_quit->MakeDefault(true);
m_gradient->AddChild(m_quit);

bwidth = 100;
btnRect = BRect(frame.right - (2 * bpad) - bwidth, frame.bottom - (2 * bpad) - bheight,
frame.right - (2 * bpad), frame.bottom - (2 * bpad));
btnRect.OffsetBy(-(50 + (2 * bpad)), 0);

bwidth = 120;
btnRect = BRect(
aboutRect.right - bwidth, frame.bottom - 15 - bheight, aboutRect.right, frame.bottom - 15);
btnRect.OffsetBy(-(50 + bpad), 0);
m_homePage = new BButton(btnRect, "homepagebtn", "BeTeX Homepage",
new BMessage(AboutMessages::K_GOTO_BETEX_HOMEPAGE));
m_gradient->AddChild(m_homePage);

btnRect.OffsetBy(-(80 + (2 * bpad)), 0);
btnRect.right = btnRect.left + 80;
m_beBits = new BButton(
btnRect, "fBeBitsbtn", "BeBits Page", new BMessage(AboutMessages::K_GOTO_BETEX_BEBITSPAGE));
m_gradient->AddChild(m_beBits);

btnRect.OffsetBy(-(60 + (2 * bpad)), 0);
btnRect.right = btnRect.left + 60;
btnRect.OffsetBy(-(120 + bpad), 0);
btnRect.left = btnRect.right - 60;
m_donate = new BButton(
btnRect, "fDonatebtn", "Donate", new BMessage(AboutMessages::K_GOTO_BETEX_DONATEPAGE));

m_gradient->AddChild(m_donate);
m_gradient->AddChild(m_homePage);
m_gradient->AddChild(m_quit);

BMessenger mymsnger(this);
BMessage increment(UPDATE_COLORS);

m_run = new BMessageRunner(mymsnger, &increment, UPDATE_TIME, -1);
m_msgr = messenger;
}

AboutWindow::~AboutWindow()
{
delete m_msgr;
delete m_run;
}

void
Expand Down Expand Up @@ -195,19 +193,13 @@ AboutWindow::MessageReceived(BMessage* msg)
} break;
case AboutMessages::K_GOTO_BETEX_HOMEPAGE:
{
const char* url = "http://misza.beosjournal.org";
be_roster->Launch("text/html", 1, (char**)&url);
Quit();
} break;
case AboutMessages::K_GOTO_BETEX_BEBITSPAGE:
{
const char* url = "http://www.bebits.com/app/3919";
const char* url = "https://github.com/HaikuArchives/BeTeX";
be_roster->Launch("text/html", 1, (char**)&url);
Quit();
} break;
case AboutMessages::K_GOTO_BETEX_DONATEPAGE:
{
const char* url = "http://misza.beosjournal.org/donate.html";
const char* url = "https://www.haiku-inc.org/donate";
be_roster->Launch("text/html", 1, (char**)&url);
Quit();
} break;
Expand Down
1 change: 0 additions & 1 deletion Src/Source/DimensionWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <be/interface/Button.h>
#include <be/interface/View.h>
#include <ctype.h>
#include <stdlib.h>
#include "Constants.h"
#include "MessageFields.h"

Expand Down
5 changes: 0 additions & 5 deletions Src/Source/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ using std::cout;
using std::endl;

#include "Constants.h"
#include "ConverterIcons.h"
#include "DocView.h"
#include "MainTBar.h"
#include "MessageFields.h"
#include "Preferences.h"
#include "TexFileFilter.h"
#include "Toolbar.h"
#include "ToolbarButton.h"
Expand Down
1 change: 1 addition & 0 deletions Src/Source/PrefsListView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ PrefsListView::PrefsListView(BRect frame, BView* parent, BMessenger* messenger)
}

PrefsListView::~PrefsListView() {}

void
PrefsListView::SelectionChanged()
{
Expand Down
Loading