Allow reordering on connection tabs

This commit is contained in:
Tristan B. Kildaire 2020-10-19 14:57:16 +02:00
parent 7ae11e120e
commit 29556a6d8c
2 changed files with 43 additions and 0 deletions

View File

@ -87,6 +87,7 @@ public final class Connection : Thread
te();
box = getChatPane();
gui.notebook.add(box);
gui.notebook.setTabReorderable(box, true);
//gui.notebook setChildPacking(box, true, true, 0, GtkPackType.START);
// gui.mainWindow.
gui.notebook.setTabLabelText(box, auth[0]~"@"~address.toString());
@ -118,6 +119,7 @@ public final class Connection : Thread
// import std.conv;
// textArea.add(new Label(to!(string)(notificationData)));
// textArea.showAll();
process(notificationData);
//gui.mainWindow.showAll();

View File

@ -104,8 +104,12 @@ public class GUI : Thread
notebook = new Notebook();
notebook.setScrollable(true);
box.add(notebook);
statusBar = new Statusbar();
statusBar.add(new Label("Gustav: Bruh"));
box.setChildPacking(notebook, true, true, 0, GtkPackType.START);
box.packEnd(statusBar, 0, 0, 0);
//notebook.add(createServerTab());
@ -157,7 +161,44 @@ public class GUI : Thread
setAvail.addOnClicked(&setStatus);
setAway.addOnClicked(&setStatus);
setBusy.addOnClicked(&setStatus);
import gtk.SeparatorToolItem;
toolbar.add(new SeparatorToolItem());
ToolButton channelListButton = new ToolButton("folder");
channelListButton.setTooltipText("List channels");
toolbar.add(channelListButton);
// import gtk.ComboBox;
// ComboBox d = new ComboBox();
// import gtk.Button;
// import gtk.Entry;
// import gtk.Switch;
// import gtk.ToolItem;
// ToolItem g = new ToolItem();
// g.add(new Switch());
// toolbar.add(g);
// d.add(new Entry(new Label("1")));
// d.add(new Entry(new Label("2")));
// d.add(new Entry(new Label("3")));
// Entry jj;
// d.add(new Entry("available"));
// d.add(new Entry("away"));
// d.add(new Entry("busy"));
// import gtk.
// import gtk.ToolItem;
// ToolItem h =new ToolItem();
// h.add(d);
// toolbar.add(h);
//toolbar.add(new ToolButton("user-available,""Available"));