~ubuntu-branches/ubuntu/wily/evolution/wily

« back to all changes in this revision

Viewing changes to calendar/gui/e-week-view-event-item.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-05-24 22:36:14 UTC
  • mfrom: (1.1.90) (1.7.20 experimental)
  • Revision ID: package-import@ubuntu.com-20120524223614-exaxktbdlt72uryf
Tags: 3.4.2-1ubuntu1
* Merge with Debian. Remaining changes:
  - debian/control:
    - Build-Depend on python-dev (for the python module) and libpst-dev
      (for the pst-import plugin).
    - Don't build depend on libchamplain (it's in universe) and disable the
      contact maps plugin
    - Don't build-depend on clutter since mx isn't in main yet
    - Depend on gnome-icon-theme-full instead of gnome-icon-theme
    - Have evolution-dev depend on libevolution instead of evolution
    - Update Vcs-* fields.
  - debian/rules:
    - use --enable-pst-import, --enable-python, --disable-contacts-map,
      and --with-clutter=no
  - debian/patches:
    - 01_ubuntu_signature.patch: don't set the ubuntu signature as default
      for new accounts.
    - 04_delay_alarm_notifier.patch: delay alarm-notifier by 30 seconds.
    - 09_add_ubuntuone_email.patch: add patch to add Ubuntu One introduction.
    - 10_desktop_shortcuts.patch: fix the calendar shortcut to appear in the
      Launcher.
    - 11_remove_upstream_submit_bugreport.patch: Remove 'Submit Bug Report'
      option from Help menu.
    - 20_skip_broken_gconf_conversions.patch: Don't install the window size
      gconf conversions. Besides not being very useful, they are broken and
      cause gnome-settings-daemon to fail to start
    - 62_no_upstream_email_notification_by_default.patch: don't enable the
      notification icon by default since the message indicator is running.
    - 89_remove_component_id_registration.patch: ignore -c component gconf
      registration on launching just "evolution".
    - 91_add_u1_email_translations.patch: Add translations for Ubuntu One
      welcome mail https://wiki.ubuntu.com/Translations/Wanted/UbuntuOneEmail
    - onlyshowin-add-unity.patch: add Unity to the OnlyShowIn field in
      desktop files.
    - alarm-notify-nodisplay.patch: don't show the alarm notifier
      in gnome-session-properties (add NoDisplay=true to the .desktop file).
  - debian/evolution-common.gsettings-override:
    - Disable systray for alarms, as Unity doesn't have a systray. Use popup
      windows instead.
    - Correct the path to spamd as /usr/sbin/spamd.
  - debian/evolution-common.install: install signature.py to generate the
    "Sent from Ubuntu" signature.
* Dropped Ubuntu patches:
  - 02_fix_missing_include_for_composer.patch: doesn't seem needed
  - 89_remove_quit_button.patch: This didn't seem to do anything & we don't
    use express mode for anything now anyway
  - 61_translate_menu_entry.patch: No longer needed
  - 62_no_upstream_email_notification_by_default.patch: Obsolete
  - 93_no_tray_icon_by_default.patch: Use gsettings override instead
  - spamd_sbin_path.patch: Use gsettings override instead
  - nss-paths.patch: Included by Debian as 02_nss_paths.patch
  - git_edit_as_new_from_addr_3dc8b0b.patch: Already applied
  - gmodule-linking.patch: Already applied
  - libpst-pst_open-args.patch: Already applied
  - git_crash_in_mail_sidebar_936a488.patch: Already applied
  - 99git_remove_g_thread_init_09c88ab.patch: Already applied

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
#include <text/e-text.h>
41
41
 
 
42
#define E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE(obj) \
 
43
        (G_TYPE_INSTANCE_GET_PRIVATE \
 
44
        ((obj), E_TYPE_WEEK_VIEW_EVENT_ITEM, EWeekViewEventItemPrivate))
 
45
 
42
46
struct _EWeekViewEventItemPrivate {
43
47
        /* The event index in the EWeekView events array. */
44
48
        gint event_num;
53
57
        PROP_SPAN_NUM
54
58
};
55
59
 
56
 
static gpointer parent_class;
 
60
G_DEFINE_TYPE (
 
61
        EWeekViewEventItem,
 
62
        e_week_view_event_item,
 
63
        GNOME_TYPE_CANVAS_ITEM)
57
64
 
58
65
static gboolean
59
66
can_draw_in_region (cairo_region_t *draw_region,
424
431
                num_icons++;
425
432
        }
426
433
 
427
 
        if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp)) {
 
434
        if (e_cal_component_has_recurrences (comp) ||
 
435
            e_cal_component_is_instance (comp)) {
428
436
                draw_recurrence_icon = TRUE;
429
437
                num_icons++;
430
438
        }
654
662
        week_view = E_WEEK_VIEW (parent);
655
663
 
656
664
        /* Chain up to parent's update() method. */
657
 
        canvas_item_class = GNOME_CANVAS_ITEM_CLASS (parent_class);
 
665
        canvas_item_class =
 
666
                GNOME_CANVAS_ITEM_CLASS (e_week_view_event_item_parent_class);
658
667
        canvas_item_class->update (item, i2c, flags);
659
668
 
660
669
        item->x1 = 0;
1118
1127
}
1119
1128
 
1120
1129
static void
1121
 
week_view_event_item_class_init (EWeekViewEventItemClass *class)
 
1130
e_week_view_event_item_class_init (EWeekViewEventItemClass *class)
1122
1131
{
1123
1132
        GObjectClass *object_class;
1124
1133
        GnomeCanvasItemClass *item_class;
1125
1134
 
1126
 
        parent_class = g_type_class_peek_parent (class);
1127
1135
        g_type_class_add_private (class, sizeof (EWeekViewEventItemPrivate));
1128
1136
 
1129
1137
        object_class = G_OBJECT_CLASS (class);
1162
1170
}
1163
1171
 
1164
1172
static void
1165
 
week_view_event_item_init (EWeekViewEventItem *event_item)
 
1173
e_week_view_event_item_init (EWeekViewEventItem *event_item)
1166
1174
{
1167
 
        event_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (
1168
 
                event_item, E_TYPE_WEEK_VIEW_EVENT_ITEM,
1169
 
                EWeekViewEventItemPrivate);
 
1175
        event_item->priv = E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE (event_item);
1170
1176
 
1171
1177
        event_item->priv->event_num = -1;
1172
1178
        event_item->priv->span_num = -1;
1173
1179
}
1174
1180
 
1175
 
GType
1176
 
e_week_view_event_item_get_type (void)
1177
 
{
1178
 
        static GType type = 0;
1179
 
 
1180
 
        if (G_UNLIKELY (type == 0)) {
1181
 
                const GTypeInfo type_info = {
1182
 
                        sizeof (EWeekViewEventItemClass),
1183
 
                        (GBaseInitFunc) NULL,
1184
 
                        (GBaseFinalizeFunc) NULL,
1185
 
                        (GClassInitFunc) week_view_event_item_class_init,
1186
 
                        (GClassFinalizeFunc) NULL,
1187
 
                        NULL,  /* class_data */
1188
 
                        sizeof (EWeekViewEventItem),
1189
 
                        0,     /* n_preallocs */
1190
 
                        (GInstanceInitFunc) week_view_event_item_init,
1191
 
                        NULL   /* value_table */
1192
 
                };
1193
 
 
1194
 
                type = g_type_register_static (
1195
 
                        GNOME_TYPE_CANVAS_ITEM, "EWeekViewEventItem",
1196
 
                        &type_info, 0);
1197
 
        }
1198
 
 
1199
 
        return type;
1200
 
}
1201
 
 
1202
1181
gint
1203
1182
e_week_view_event_item_get_event_num (EWeekViewEventItem *event_item)
1204
1183
{