|
From: <gi...@gp...> - 2011-09-03 14:57:35
|
The branch, master has been updated
via a547c905e1c0964f5e99c9723d3e5e564c111a79 (commit)
from 3738d564a82aef241d7c953d24faa8c73fc419ef (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-top-window.c | 31 ++++++++++++-------------------
src/hid/gtk/gui.h | 1 +
2 files changed, 13 insertions(+), 19 deletions(-)
=================
Commit Messages
=================
commit a547c905e1c0964f5e99c9723d3e5e564c111a79
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Don't use a GtkEventBox as a container widget
We weren't making use of the events from the event box, and appeared
just to be using it as a convenient container to allow setting the
sensitivity on our entire left hand toolbar at once.
Scrap the event box widget and just store a pointer to the vbox widget
which the left toobar items are packed into. We can set the sensitivity
on this and get the desired effect.
:100644 100644 95f39a2... fb5a32a... M src/hid/gtk/gui-top-window.c
:100644 100644 8dfc203... 1cb3865... M src/hid/gtk/gui.h
=========
Changes
=========
commit a547c905e1c0964f5e99c9723d3e5e564c111a79
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Don't use a GtkEventBox as a container widget
We weren't making use of the events from the event box, and appeared
just to be using it as a convenient container to allow setting the
sensitivity on our entire left hand toolbar at once.
Scrap the event box widget and just store a pointer to the vbox widget
which the left toobar items are packed into. We can set the sensitivity
on this and get the desired effect.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 95f39a2..fb5a32a 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1178,8 +1178,6 @@ make_mode_buttons (GHidPort * port)
* ---------------------------------------------------------------
*/
-static GtkWidget *ghid_left_sensitive_box;
-
static gint
delete_chart_cb (GtkWidget * widget, GdkEvent * event, GHidPort * port)
{
@@ -1208,8 +1206,8 @@ static void
ghid_build_pcb_top_window (void)
{
GtkWidget *window;
- GtkWidget *vbox_main, *vbox_left, *hbox_middle, *hbox;
- GtkWidget *ebox, *vbox, *frame;
+ GtkWidget *vbox_main, *hbox_middle, *hbox;
+ GtkWidget *vbox, *frame;
GtkWidget *label;
GHidPort *port = &ghid_port;
gchar *s;
@@ -1305,26 +1303,21 @@ ghid_build_pcb_top_window (void)
/* -- Left control bar */
- ebox = gtk_event_box_new ();
- gtk_widget_set_events (ebox, GDK_EXPOSURE_MASK);
- gtk_box_pack_start (GTK_BOX (hbox_middle), ebox, FALSE, FALSE, 3);
-
- /*
- * This box will also be made insensitive when the gui needs
+ /*
+ * This box will be made insensitive when the gui needs
* a modal button GetLocation button press.
*/
- ghid_left_sensitive_box = ebox;
-
- vbox_left = gtk_vbox_new (FALSE, 0);
- gtk_container_add (GTK_CONTAINER (ebox), vbox_left);
+ ghidgui->left_toolbar = gtk_vbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox_middle),
+ ghidgui->left_toolbar, FALSE, FALSE, 3);
- vbox = ghid_scrolled_vbox(vbox_left, &scrolled,
- GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+ vbox = ghid_scrolled_vbox (ghidgui->left_toolbar, &scrolled,
+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX(vbox), ghidgui->layer_selector,
FALSE, FALSE, 0);
ghidgui->mode_buttons0_frame_vbox = gtk_vbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX(vbox_left),
+ gtk_box_pack_start (GTK_BOX(ghidgui->left_toolbar),
ghidgui->mode_buttons0_frame_vbox, FALSE, FALSE, 0);
ghidgui->mode_buttons0_frame = gtk_frame_new (NULL);
@@ -1336,7 +1329,7 @@ ghid_build_pcb_top_window (void)
make_mode_buttons (port);
frame = gtk_frame_new(NULL);
- gtk_box_pack_end(GTK_BOX(vbox_left), frame, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (ghidgui->left_toolbar), frame, FALSE, FALSE, 0);
vbox = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(frame), vbox);
hbox = gtk_hbox_new(FALSE, 0);
@@ -1514,7 +1507,7 @@ ghid_interface_input_signals_disconnect (void)
void
ghid_interface_set_sensitive (gboolean sensitive)
{
- gtk_widget_set_sensitive (ghid_left_sensitive_box, sensitive);
+ gtk_widget_set_sensitive (ghidgui->left_toolbar, sensitive);
gtk_widget_set_sensitive (ghidgui->menu_hbox, sensitive);
}
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 8dfc203..1cb3865 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -107,6 +107,7 @@ typedef struct
*menu_hbox, *compact_vbox, *compact_hbox, *position_hbox,
*mode_buttons0_vbox, *mode_buttons1_hbox, *mode_buttons1_vbox,
*mode_buttons0_frame, *mode_buttons1_frame, *mode_buttons0_frame_vbox;
+ GtkWidget *left_toolbar;
GtkWidget *menu_bar, *layer_selector;
GtkWidget *h_range, *v_range;
|