Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 2 commits
  • 17 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 02, 2018
* Introduce Haiku layout
* Remove SGB
* Introduce Haiku ToolBar
* Remove almost all IE dependencies (still 1 in the replicant)
* Fixes #3 #4 #7
* TODO: Reintroduce setPriorities function
* TODO: Improve the ColumnListView
Haiku layout
Showing with 450 additions and 1,143 deletions.
  1. +165 −215 src/MainWindow.cpp
  2. +9 −8 src/MainWindow.h
  3. +2 −10 src/MainWindowDefs.h
  4. +0 −30 src/MainWindowDefs_OLD.h
  5. +20 −25 src/Makefile
  6. +39 −14 src/SettingsWindow.cpp
  7. +1 −2 src/SettingsWindow.h
  8. +37 −677 src/Slayer.rdef
  9. +1 −1 src/SlayerApp.cpp
  10. +1 −1 src/SlayerApp.h
  11. +31 −13 src/TeamItem.cpp
  12. +1 −4 src/TeamItem.h
  13. +62 −69 src/TeamListView.cpp
  14. +6 −8 src/TeamListView.h
  15. +33 −11 src/ThreadItem.cpp
  16. +3 −38 src/ThreadItem.h
  17. +39 −17 src/miscSlayer.cpp

Large diffs are not rendered by default.

@@ -5,8 +5,6 @@
#ifndef _MAINWINDOW_H_
#define _MAINWINDOW_H_

#include <santa/CLVEasyItem.h>

#include "IEWindow.h"
#include "MainWindowDefs.h"
#include "TeamItem.h"
@@ -15,11 +13,14 @@
#include "Hashtable.h"
#include "RefreshThread.h"

bool saveitemstatus(CLVListItem *, void *);
bool postlistproc(CLVListItem *, void *);
#include <ToolBar.h>
/*
bool saveitemstatus(CLVListItem *, void *);*/
bool postlistproc(BRow*, void*);

static const BString ProjectWebsite = "https://github.com/HaikuArchives/Slayer/blob/master/DOCS.txt";

class MainWindow : public IEWindow {
class MainWindow : public BWindow {
public:
// true if window minimized
bool minimized;
@@ -60,9 +61,9 @@ class MainWindow : public IEWindow {
void SetButtonState();
void SetPriorityState();
void SetPriorityField(int32 priority);
void SwitchColumn(int32 col_id, int32 menuid);
void SetColumn(int32 col_mask);
void FixArchive();
BBitmap *ResourceVectorToBitmap(const char *resName, float iconSize = 24.0);

BToolBar* fToolBar;
};

#endif
@@ -26,21 +26,13 @@ Views in MainWindow:

// Message constants:
enum {
IE_MAINWINDOW_MAINMENU_FILE_ABOUT_SLAYER___ = 0x5L,
IE_MAINWINDOW_MAINMENU_FILE_QUIT = 0x6L,
IE_MAINWINDOW_MAINMENU_FILE_DOCS__ = 0x7L,
IE_MAINWINDOW_MAINMENU_EDIT_CUT = 0x8L,
IE_MAINWINDOW_MAINMENU_EDIT_COPY = 0x9L,
IE_MAINWINDOW_MAINMENU_EDIT_PASTE = 0xAL,
IE_MAINWINDOW_MAINMENU_ACTION_KILL = 0x149L,
IE_MAINWINDOW_MAINMENU_ACTION_SUSPEND = 0x14DL,
IE_MAINWINDOW_MAINMENU_ACTION_RESUME = 0x150L,
IE_MAINWINDOW_MAINMENU_COLUMNS_ID = 0x156L,
IE_MAINWINDOW_MAINMENU_COLUMNS_PRIORITY = 0x15BL,
IE_MAINWINDOW_MAINMENU_COLUMNS_STATE = 0x15EL,
IE_MAINWINDOW_MAINMENU_COLUMNS_MEMORY = 0x161L,
IE_MAINWINDOW_MAINMENU_COLUMNS_CPU = 0x164L,
IE_MAINWINDOW_MAINMENU_WINDOWS_SETTINGS___ = 0x12AL,

IE_MAINWINDOW_MAINMENU_WINDOWS_SETTINGS = 0x12AL,
IE_MAINWINDOW_MAINUPDATE = 0x62757570L,
IE_MAINWINDOW_MAINPRIORITYFIELD_LOW_PRIORITY = 0x7BL,
IE_MAINWINDOW_MAINPRIORITYFIELD_NORMAL_PRIORITY = 0xC8L,

This file was deleted.

@@ -34,25 +34,20 @@ APP_MIME_SIG=
# if two source files with the same name (source.c or source.cpp)
# are included from different directories. Also note that spaces
# in folder names do not work well with this makefile.

SRCS= Cursors.cpp \
Hashtable.cpp \
IElib/IEApplication.cpp \
IElib/IEResourceHandler.cpp \
IElib/IEWindow.cpp \
MainWindow.cpp \
MiniSlayer.cpp \
miscSlayer.cpp \
NewStrings.cpp \
Options.cpp \
RefreshThread.cpp \
SettingsWindow.cpp \
SlayerApp.cpp \
TeamItem.cpp \
TeamItemList.cpp \
TeamListView.cpp \
ThreadItem.cpp \
ThreadItemList.cpp
SRCS= Hashtable.cpp \
MainWindow.cpp \
MiniSlayer.cpp \
miscSlayer.cpp \
Options.cpp \
RefreshThread.cpp \
SettingsWindow.cpp \
SlayerApp.cpp \
TeamItem.cpp \
TeamItemList.cpp \
TeamListView.cpp \
ThreadItem.cpp\
ThreadItemList.cpp \
IElib/IEResourceHandler.cpp

# specify the resource definition files to use
# full path or a relative path to the resource file can be used.
@@ -84,7 +79,7 @@ RSRCS=
# naming scheme you need to specify the path to the library
# and it's name
# library: my_lib.a entry: my_lib.a or path/my_lib.a
LIBS= $(STDCPPLIBS) be translation shared santa
LIBS= be columnlistview translation shared

# specify additional paths to directories following the standard
# libXXX.so or libXXX.a naming scheme. You can specify full paths
@@ -97,13 +92,13 @@ LIBPATHS=
# additional paths to look for system headers
# thes use the form: #include <header>
# source file directories are NOT auto-included here
SYSTEM_INCLUDE_PATHS = /system/develop/headers/private/interface/ \
/system/develop/headers/private/shared/

SYSTEM_INCLUDE_PATHS = $(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/interface) \
$(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/shared) \
$(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/app)
# additional paths to look for local headers
# thes use the form: #include "header"
# source file directories are automatically included
LOCAL_INCLUDE_PATHS = SGB IElib
LOCAL_INCLUDE_PATHS = IElib

# specify the level of optimization that you desire
# NONE, SOME, FULL
@@ -138,7 +133,7 @@ SYMBOLS =
# specify debug settings
# if TRUE will allow application to be run from a source-level
# debugger. Note that this will disable all optimzation.
DEBUGGER =
DEBUGGER =

# specify additional compiler flags for all files
COMPILER_FLAGS =
@@ -2,15 +2,51 @@
// Generated by Interface Elements (Window v2.2) on Jan 3 1999
// This is a user written class and will not be overwritten.

#include <LayoutBuilder.h>

#include "SettingsWindow.h"
#include "SlayerApp.h"
#include "MiniSlayer.h"

#include <stdlib.h>

#define B_TRANSLATE(x) x

SettingsWindow::SettingsWindow(void)
: IEWindow("SettingsWindow")
: BWindow(BRect(200,200,300,300), "Settings", B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE |B_AUTO_UPDATE_SIZE_LIMITS )
{
current_workspace = new BRadioButton("SettingsCurrentWorkspace", B_TRANSLATE("Open window in current workspace"), new BMessage(IE_SETTINGSWINDOW_SETTINGSCURRENTWORKSPACE));
all_workspaces = new BRadioButton("SettingsAllWorkspaces", B_TRANSLATE("Open window in all workspaces"), new BMessage(IE_SETTINGSWINDOW_SETTINGSALLWORKSPACES));
saved_workspace = new BRadioButton("SettingsSavedWorkspace", B_TRANSLATE("Open window in saved workspace"), new BMessage(IE_SETTINGSWINDOW_SETTINGSSAVEDWORKSPACE));

BGroupLayout* workspaceBox = BLayoutBuilder::Group<>(B_VERTICAL)
.SetInsets(B_USE_WINDOW_INSETS, B_USE_WINDOW_INSETS,
B_USE_WINDOW_INSETS, B_USE_WINDOW_INSETS)
.Add(current_workspace)
.Add(all_workspaces)
.Add(saved_workspace);

BBox* top = new BBox("top");
top->AddChild(workspaceBox->View());
top->SetLabel( B_TRANSLATE("Worspace"));
refresh = new BTextControl("SettingsRefresh", B_TRANSLATE("Refresh display (seconds)"), "0.5", NULL);

save_window = new BCheckBox("SettingsSaveWindow", B_TRANSLATE("Save window position on exit"), new BMessage(IE_SETTINGSWINDOW_SETTINGSSAVEWINDOW));
save_workspace = new BCheckBox("SettingsSaveWorkspace", B_TRANSLATE("Save workspace"), new BMessage(IE_SETTINGSWINDOW_SETTINGSSAVEWORKSPACE));


BButton* deskbarButton;
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_SMALL_INSETS)
.SetInsets(B_USE_WINDOW_INSETS, B_USE_WINDOW_INSETS,
B_USE_WINDOW_INSETS, B_USE_WINDOW_INSETS)
.Add(top, 100)
.Add(refresh)
.Add(save_window)
.Add(save_workspace)
.AddGroup(B_HORIZONTAL)
.Add(new BButton("", B_TRANSLATE("Revert"), new BMessage(IE_SETTINGSWINDOW_SETTINGSREVERT)))
.AddGlue()
.Add(deskbarButton = new BButton("SettingsDeskbar", B_TRANSLATE("Doc"), new BMessage(IE_SETTINGSWINDOW_SETTINGSDESKBAR)));
// read options
if (Lock()) {
OptionsToDialog();
@@ -20,8 +56,7 @@ SettingsWindow::SettingsWindow(void)

// if necessary, disable docking button
if (slayer->docked) {
BButton *b = (BButton *)FindView("SettingsDeskbar");
b->SetEnabled(false);
deskbarButton->SetEnabled(false);
}
Unlock();
}
@@ -50,13 +85,10 @@ void SettingsWindow::MessageReceived(BMessage *message)
slayer->options.save_wind_pos =
save_window->Value() ? true : false;
break;

case IE_SETTINGSWINDOW_SETTINGSSAVEWORKSPACE: // 'SettingsSaveWorkspace' is pressed...
slayer->options.save_workspace =
save_workspace->Value() ? true : false;

break;

case IE_SETTINGSWINDOW_SETTINGSREFRESH: // Enter is pressed in 'SettingsRefresh'...
SetRefreshDelay();
break;
@@ -90,29 +122,22 @@ void SettingsWindow::Quit()
{
SetRefreshDelay();

IEWindow::Quit();
BWindow::Quit();
}

void SettingsWindow::OptionsToDialog()
{
char str[21];
sprintf(str, "%g", ((float)slayer->options.refresh)/1000);
refresh = (BTextControl *)FindView("SettingsRefresh");
refresh->SetText(str);

save_window = (BCheckBox *)FindView("SettingsSaveWindow");
if (slayer->options.save_wind_pos)
save_window->SetValue(1);
else
save_window->SetValue(0);

save_workspace = (BCheckBox *)FindView("SettingsSaveWorkspace");
save_workspace->SetValue(slayer->options.save_workspace ? 1 : 0);

current_workspace = (BRadioButton *)FindView("SettingsCurrentWorkspace");
all_workspaces = (BRadioButton *)FindView("SettingsAllWorkspaces");
saved_workspace = (BRadioButton *)FindView("SettingsSavedWorkspace");

switch (slayer->options.workspace_activation) {
case Options::current_workspace:
current_workspace->SetValue(1); break;
@@ -5,12 +5,11 @@
#ifndef _SETTINGSWINDOW_H_
#define _SETTINGSWINDOW_H_

#include "IEWindow.h"
#include "SettingsWindowDefs.h"
#include "Options.h"
#include <InterfaceKit.h>

class SettingsWindow : public IEWindow
class SettingsWindow : public BWindow
{
BTextControl *refresh;
BCheckBox *save_window;

No commit comments for this range

You can’t perform that action at this time.