diff options
author | Ted Gould <ted@gould.cx> | 2011-06-21 14:24:26 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-06-21 14:24:26 -0500 |
commit | e8e111724714c3ab7f400b3ecd48a309812efb82 (patch) | |
tree | e29b97aa39312b0a3947b2a728b632478cdae6e1 /src/indicator-datetime.c | |
parent | f23f3aee28f6c326cc94cc7098934a5afac0c246 (diff) | |
parent | 7cb01301fdb2e2889d8ab8c09275c25d9dd28f01 (diff) | |
download | ayatana-indicator-datetime-e8e111724714c3ab7f400b3ecd48a309812efb82.tar.gz ayatana-indicator-datetime-e8e111724714c3ab7f400b3ecd48a309812efb82.tar.bz2 ayatana-indicator-datetime-e8e111724714c3ab7f400b3ecd48a309812efb82.zip |
New upstream release.
Diffstat (limited to 'src/indicator-datetime.c')
-rw-r--r-- | src/indicator-datetime.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index a992507..800fa87 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -270,7 +270,7 @@ static void menu_visible_notfy_cb(GtkWidget * menu, G_GNUC_UNUSED GParamSpec *pspec, gpointer user_data) { IndicatorDatetime * self = INDICATOR_DATETIME(user_data); - g_debug("notify visible signal recieved"); + g_debug("notify visible signal received"); // we should only react if we're currently visible gboolean visible; @@ -1077,7 +1077,7 @@ guess_label_size (IndicatorDatetime * self) GArray * timevals = g_array_new(FALSE, TRUE, sizeof(struct tm)); build_timeval_array(timevals, posibilitymask); - g_debug("Checking against %d posible times", timevals->len); + g_debug("Checking against %d possible times", timevals->len); gint check_time; for (check_time = 0; check_time < timevals->len; check_time++) { gchar longstr[256]; @@ -1285,6 +1285,12 @@ new_appointment_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbu /* Label, probably a username, chat room or mailbox name */ mi_data->label = gtk_label_new(dbusmenu_menuitem_property_get(newitem, APPOINTMENT_MENUITEM_PROP_LABEL)); gtk_misc_set_alignment(GTK_MISC(mi_data->label), 0.0, 0.5); + + GtkStyle * style = gtk_widget_get_style(GTK_WIDGET(mi_data->label)); + PangoContext * context = gtk_widget_get_pango_context(GTK_WIDGET(mi_data->label)); + gint length = measure_string(style, context, "MMMMMMMMMMMMMMM"); // 15 char wide string max + gtk_widget_set_size_request(GTK_WIDGET(mi_data->label), length, -1); // Set the min size in pixels + gtk_label_set_ellipsize(GTK_LABEL(mi_data->label), PANGO_ELLIPSIZE_END); gtk_box_pack_start(GTK_BOX(hbox), mi_data->label, TRUE, TRUE, 0); gtk_widget_show(mi_data->label); |