summaryrefslogtreecommitdiff
path: root/linux/toolbar.cpp
diff options
context:
space:
mode:
authorleo2000-08-26 14:46:17 +0000
committerleo2000-08-26 14:46:17 +0000
commit53930ef60abf446960319d6c54a6899965b9a09f (patch)
tree392f51e1f1d34df6d99783e5bfa960b31f061015 /linux/toolbar.cpp
parent31a1d493ed4ca5d263244a8a3231111a58bdc5c4 (diff)
Rewrote the way the pieces toolbar work under Linux, now it can be
resized and floated. Save toolbar preferences between sessions. Fixed the check marks in the toolbar menu. git-svn-id: http://svn.leocad.org/trunk@107 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'linux/toolbar.cpp')
-rw-r--r--linux/toolbar.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/linux/toolbar.cpp b/linux/toolbar.cpp
index 20c58e2..e927795 100644
--- a/linux/toolbar.cpp
+++ b/linux/toolbar.cpp
@@ -629,23 +629,17 @@ void colorlist_set(int new_color)
}
}
-// Create what is the pieces toolbar in the Windows version as fixed items.
-void create_piecebar(GtkWidget *window, GtkWidget *hbox)
+// Create the pieces toolbar
+GtkWidget* create_piecebar (GtkWidget *window)
{
+ int attrlist[] = { GLX_RGBA, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 16, 0 };
gchar *titles[2] = { "Description", "Number" };
- int attrlist[] =
- {
- GLX_RGBA,
- GLX_DOUBLEBUFFER,
- GLX_DEPTH_SIZE, 16,
- 0
- };
- GtkWidget *vbox1, *vpan, *scroll_win;
+ GtkWidget *vbox1, *vpan, *scroll_win, *frame;
- GtkWidget* frame = gtk_frame_new (NULL);
+ frame = gtk_frame_new (NULL);
gtk_widget_show (frame);
- gtk_box_pack_end (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
@@ -766,6 +760,8 @@ void create_piecebar(GtkWidget *window, GtkWidget *hbox)
GTK_SIGNAL_FUNC(colorlist_key_press), NULL);
gtk_widget_show(colorlist);
+
+ return frame;
}
// =========================================================