From 2dcdb0ca973d44657591a22e89933beed26dc41b Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 6 Nov 2010 17:09:06 +0000 Subject: [PATCH] Set a maximum length for the operator --- src/plugins/panel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/panel.c b/src/plugins/panel.c index b5c9316..bf08e83 100644 --- a/src/plugins/panel.c +++ b/src/plugins/panel.c @@ -141,6 +141,11 @@ static int _panel_init(PhonePlugin * plugin) gtk_box_pack_start(GTK_BOX(panel->hbox), panel->signal_image, FALSE, TRUE, 0); panel->operator = gtk_label_new(NULL); + gtk_label_set_ellipsize(GTK_LABEL(panel->operator), + PANGO_ELLIPSIZE_END); +#if GTK_CHECK_VERSION(2, 6, 0) + gtk_label_set_max_width_chars(GTK_LABEL(panel->operator), 12); +#endif gtk_widget_modify_font(panel->operator, bold); gtk_box_pack_start(GTK_BOX(panel->hbox), panel->operator, TRUE, TRUE, 0);