* Set better the event box initialisation.
* src/widgets/modest-attachments-view.c:
* Not it uses internally the absolute position of the events and
specific attachment views. This finally fixes a hard bug.
(fixes NB#58394).
* src/maemo/modest-addressbook.c:
* Uses the synchronous call to open the address book on
selecting addresses.
pmo-trunk-r2262
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (recpt_editor));
contact_model = osso_abook_contact_model_new ();
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (recpt_editor));
contact_model = osso_abook_contact_model_new ();
- if (!open_addressbook ()) {
+ if (!open_addressbook_sync ()) {
if (contact_model) {
g_object_unref (contact_model);
contact_model = NULL;
if (contact_model) {
g_object_unref (contact_model);
contact_model = NULL;
pango_layout_set_ellipsize (priv->layout_full_filename, PANGO_ELLIPSIZE_NONE);
pango_layout_set_ellipsize (priv->layout_full_filename, PANGO_ELLIPSIZE_NONE);
- gtk_event_box_set_above_child (GTK_EVENT_BOX (instance), TRUE);
+ gtk_event_box_set_above_child (GTK_EVENT_BOX (instance), FALSE);
+ gtk_event_box_set_visible_window (GTK_EVENT_BOX (instance), TRUE);
+ gtk_widget_set_events (GTK_WIDGET (instance), 0);
GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (instance), GTK_CAN_FOCUS);
GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (instance), GTK_CAN_FOCUS);
GdkEventButton *event,
ModestAttachmentsView *atts_view)
{
GdkEventButton *event,
ModestAttachmentsView *atts_view)
{
- gint widget_x, widget_y;
ModestAttachmentsViewPrivate *priv = MODEST_ATTACHMENTS_VIEW_GET_PRIVATE (atts_view);
if (!GTK_WIDGET_HAS_FOCUS (widget))
gtk_widget_grab_focus (widget);
if (event->button == 1 && event->type == GDK_BUTTON_PRESS) {
GtkWidget *att_view = NULL;
ModestAttachmentsViewPrivate *priv = MODEST_ATTACHMENTS_VIEW_GET_PRIVATE (atts_view);
if (!GTK_WIDGET_HAS_FOCUS (widget))
gtk_widget_grab_focus (widget);
if (event->button == 1 && event->type == GDK_BUTTON_PRESS) {
GtkWidget *att_view = NULL;
- GdkWindow *parent_window;
-
- parent_window = gtk_widget_get_parent_window (widget);
- gdk_window_get_origin (parent_window, &widget_x, &widget_y);
att_view = get_att_view_at_coords (MODEST_ATTACHMENTS_VIEW (widget),
att_view = get_att_view_at_coords (MODEST_ATTACHMENTS_VIEW (widget),
- ((gint) event->x_root) - widget_x, ((gint) event->y_root) - widget_y);
+ (gint) event->x_root, (gint) event->y_root);
if (att_view != NULL) {
if (GTK_WIDGET_STATE (att_view) == GTK_STATE_SELECTED && (g_list_length (priv->selected) < 2)) {
if (att_view != NULL) {
if (GTK_WIDGET_STATE (att_view) == GTK_STATE_SELECTED && (g_list_length (priv->selected) < 2)) {
{
ModestAttachmentsViewPrivate *priv = MODEST_ATTACHMENTS_VIEW_GET_PRIVATE (atts_view);
if (widget == gtk_grab_get_current ()) {
{
ModestAttachmentsViewPrivate *priv = MODEST_ATTACHMENTS_VIEW_GET_PRIVATE (atts_view);
if (widget == gtk_grab_get_current ()) {
- GdkWindow *parent_window;
GtkWidget *att_view = NULL;
GtkWidget *att_view = NULL;
- gint widget_x, widget_y;
-
- parent_window = gtk_widget_get_parent_window (widget);
- gdk_window_get_origin (parent_window, &widget_x, &widget_y);
att_view = get_att_view_at_coords (MODEST_ATTACHMENTS_VIEW (widget),
att_view = get_att_view_at_coords (MODEST_ATTACHMENTS_VIEW (widget),
- ((gint) event->x_root) - widget_x, ((gint) event->y_root) - widget_y);
+ (gint) event->x_root, (gint) event->y_root);
if (att_view != NULL) {
unselect_all (MODEST_ATTACHMENTS_VIEW (widget));
if (att_view != NULL) {
unselect_all (MODEST_ATTACHMENTS_VIEW (widget));
MODEST_ATTACHMENT_VIEW (att_view));
}
priv->rubber_start = NULL;
MODEST_ATTACHMENT_VIEW (att_view));
}
priv->rubber_start = NULL;
gtk_grab_remove (widget);
}
return TRUE;
gtk_grab_remove (widget);
}
return TRUE;
ModestAttachmentsViewPrivate *priv = MODEST_ATTACHMENTS_VIEW_GET_PRIVATE (atts_view);
if (gtk_grab_get_current () == widget) {
GtkWidget *att_view = NULL;
ModestAttachmentsViewPrivate *priv = MODEST_ATTACHMENTS_VIEW_GET_PRIVATE (atts_view);
if (gtk_grab_get_current () == widget) {
GtkWidget *att_view = NULL;
- GdkWindow *parent_window;
- gint widget_x, widget_y;
-
- parent_window = gtk_widget_get_parent_window (widget);
- gdk_window_get_origin (parent_window, &widget_x, &widget_y);
att_view = get_att_view_at_coords (MODEST_ATTACHMENTS_VIEW (widget),
att_view = get_att_view_at_coords (MODEST_ATTACHMENTS_VIEW (widget),
- ((gint) event->x_root) - widget_x, ((gint) event->y_root) - widget_y);
+ (gint) event->x_root, (gint) event->y_root);
if (att_view != NULL) {
unselect_all (MODEST_ATTACHMENTS_VIEW (widget));
if (att_view != NULL) {
unselect_all (MODEST_ATTACHMENTS_VIEW (widget));
for (node = att_view_list; node != NULL; node = g_list_next (node)) {
GtkWidget *att_view = (GtkWidget *) node->data;
gint pos_x, pos_y, w, h, int_x, int_y;
for (node = att_view_list; node != NULL; node = g_list_next (node)) {
GtkWidget *att_view = (GtkWidget *) node->data;
gint pos_x, pos_y, w, h, int_x, int_y;
+ gint widget_x, widget_y;
+
+ gdk_window_get_origin (att_view->window, &widget_x, &widget_y);
- pos_x = att_view->allocation.x;
- pos_y = att_view->allocation.y;
+ pos_x = widget_x;
+ pos_y = widget_y;
w = att_view->allocation.width;
h = att_view->allocation.height;
w = att_view->allocation.width;
h = att_view->allocation.height;