mirror of
git://projects.qi-hardware.com/fped.git
synced 2025-04-21 12:27:27 +03:00
Made life in mil-land a little less painful.
- .fpd file format: new directive "unit" to set the default unit - new selection was too aggressive - make it only rearrange settings if we also fail the second vector search - gui_draw_pad_text: calculation of height vs. width lost too much precision, causing pad text to be rotated arbitrarily - drag_new_vec: display distance in mil if unit is mil - end_new_raw_vec: store distance in mil if unit is mil - gridify: use a 10 mil grid if unit is mil - ps_hline: corrected gsave/grestore mismatch - Makefile: made "all" a prerequisite of "install" - Postscript output now mentions the default unit (if set) - ps_package: height and width were swapped, oopsie ! git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5525 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
34
gui_status.c
34
gui_status.c
@@ -736,25 +736,31 @@ void status_begin_reporting(void)
|
||||
/* ----- unit selection ---------------------------------------------------- */
|
||||
|
||||
|
||||
static void show_curr_unit(void)
|
||||
{
|
||||
switch (curr_unit) {
|
||||
case curr_unit_mm:
|
||||
status_set_unit("mm");
|
||||
break;
|
||||
case curr_unit_mil:
|
||||
status_set_unit("mil");
|
||||
break;
|
||||
case curr_unit_auto:
|
||||
status_set_unit("auto");
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static gboolean unit_button_press_event(GtkWidget *widget,
|
||||
GdkEventButton *event, gpointer data)
|
||||
{
|
||||
switch (event->button) {
|
||||
case 1:
|
||||
curr_unit = (curr_unit+1) % curr_unit_n;
|
||||
switch (curr_unit) {
|
||||
case curr_unit_mm:
|
||||
status_set_unit("mm");
|
||||
break;
|
||||
case curr_unit_mil:
|
||||
status_set_unit("mil");
|
||||
break;
|
||||
case curr_unit_auto:
|
||||
status_set_unit("auto");
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
show_curr_unit();
|
||||
break;
|
||||
}
|
||||
refresh_pos();
|
||||
@@ -859,7 +865,7 @@ void make_status_area(GtkWidget *vbox)
|
||||
/* unit selection */
|
||||
|
||||
label_in_box_bg(status_unit, COLOR_UNIT_SELECTOR);
|
||||
status_set_unit("mm");
|
||||
show_curr_unit();
|
||||
g_signal_connect(G_OBJECT(box_of_label(status_unit)),
|
||||
"button_press_event", G_CALLBACK(unit_button_press_event), NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user