1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2025-04-21 12:27:27 +03:00

It can sometimes be unclear what exactly has been selected. To improve this,

we now display an icon for the currently selected instance in the status area.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5757 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-12-15 21:24:30 +00:00
parent 83669c6db7
commit b37a8599d9
7 changed files with 86 additions and 2 deletions

View File

@@ -55,6 +55,7 @@ static GtkWidget *last_edit = NULL;
/* ----- setter functions -------------------------------------------------- */
static GtkWidget *status_icon;
static GtkWidget *status_name, *status_entry;
static GtkWidget *status_type_x, *status_type_y, *status_type_entry;
static GtkWidget *status_box_x, *status_entry_y;
@@ -144,6 +145,15 @@ void set_with_units(void (*set)(const char *fmt, ...), const char *prefix,
/* ----- complex status updates -------------------------------------------- */
void status_set_icon(GtkWidget *image)
{
vacate_widget(status_icon);
if (image)
gtk_container_add(GTK_CONTAINER(status_icon), image);
gtk_widget_show_all(status_icon);
}
void status_set_xy(struct coord coord)
{
/* do dX/dY etc. stuff later */
@@ -920,9 +930,19 @@ static GtkWidget *add_entry(GtkWidget *tab, int col, int row)
void make_status_area(GtkWidget *vbox)
{
GtkWidget *tab, *sep;
GtkWidget *hbox, *vbox2;
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
vbox2 = gtk_vbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, 1);
status_icon = gtk_event_box_new();
gtk_box_pack_start(GTK_BOX(vbox2), status_icon, FALSE, FALSE, 0);
tab = gtk_table_new(7, 3, FALSE);
gtk_box_pack_start(GTK_BOX(vbox), tab, FALSE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), tab, TRUE, TRUE, 0);
/* types */