Let the phone number be bold
This commit is contained in:
parent
7da292807f
commit
d8bc2537a4
|
@ -47,6 +47,7 @@ static GtkWidget * _new_dialpad(Phone * phone);
|
||||||
Phone * phone_new(char const * device, unsigned int baudrate)
|
Phone * phone_new(char const * device, unsigned int baudrate)
|
||||||
{
|
{
|
||||||
Phone * phone;
|
Phone * phone;
|
||||||
|
PangoFontDescription * desc;
|
||||||
GtkWidget * window;
|
GtkWidget * window;
|
||||||
GtkWidget * vbox;
|
GtkWidget * vbox;
|
||||||
GtkWidget * widget;
|
GtkWidget * widget;
|
||||||
|
@ -56,6 +57,8 @@ Phone * phone_new(char const * device, unsigned int baudrate)
|
||||||
#endif
|
#endif
|
||||||
if((phone = malloc(sizeof(*phone))) == NULL)
|
if((phone = malloc(sizeof(*phone))) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
desc = pango_font_description_new();
|
||||||
|
pango_font_description_set_weight(desc, PANGO_WEIGHT_BOLD);
|
||||||
if(device == NULL)
|
if(device == NULL)
|
||||||
device = "/dev/modem";
|
device = "/dev/modem";
|
||||||
phone->gsm = gsm_new(device, baudrate);
|
phone->gsm = gsm_new(device, baudrate);
|
||||||
|
@ -71,12 +74,14 @@ Phone * phone_new(char const * device, unsigned int baudrate)
|
||||||
vbox = gtk_vbox_new(FALSE, 0);
|
vbox = gtk_vbox_new(FALSE, 0);
|
||||||
/* entry */
|
/* entry */
|
||||||
phone->di_entry = gtk_entry_new();
|
phone->di_entry = gtk_entry_new();
|
||||||
|
gtk_widget_modify_font(phone->di_entry, desc);
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), phone->di_entry, FALSE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), phone->di_entry, FALSE, TRUE, 0);
|
||||||
/* dialpad */
|
/* dialpad */
|
||||||
widget = _new_dialpad(phone);
|
widget = _new_dialpad(phone);
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0);
|
||||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||||
gtk_widget_show_all(window);
|
gtk_widget_show_all(window);
|
||||||
|
pango_font_description_free(desc);
|
||||||
return phone;
|
return phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user