projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* removed an invalid include
[modest]
/
src
/
maemo
/
modest-main-window.c
diff --git
a/src/maemo/modest-main-window.c
b/src/maemo/modest-main-window.c
index
bf8caa5
..
69fc7d4
100644
(file)
--- a/
src/maemo/modest-main-window.c
+++ b/
src/maemo/modest-main-window.c
@@
-33,7
+33,6
@@
#include <tny-simple-list.h>
#include <tny-list.h>
#include <tny-iterator.h>
#include <tny-simple-list.h>
#include <tny-list.h>
#include <tny-iterator.h>
-#include <tny-maemo-conic-device.h>
#include <tny-error.h>
#include "modest-hildon-includes.h"
#include "modest-defs.h"
#include <tny-error.h>
#include "modest-hildon-includes.h"
#include "modest-defs.h"
@@
-2206,6
+2205,8
@@
modest_main_window_set_contents_style (ModestMainWindow *self,
wrap_in_scrolled_window (priv->contents_widget, GTK_WIDGET (priv->header_view));
modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget),
TRUE);
wrap_in_scrolled_window (priv->contents_widget, GTK_WIDGET (priv->header_view));
modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget),
TRUE);
+ if (priv->style == MODEST_MAIN_WINDOW_STYLE_SIMPLE)
+ gtk_widget_grab_focus (GTK_WIDGET (priv->header_view));
break;
case MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS:
{
break;
case MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS:
{
@@
-2225,12
+2226,16
@@
modest_main_window_set_contents_style (ModestMainWindow *self,
modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget),
FALSE);
}
modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget),
FALSE);
}
+ if (priv->style == MODEST_MAIN_WINDOW_STYLE_SIMPLE)
+ gtk_widget_grab_focus (GTK_WIDGET (priv->details_widget));
break;
}
case MODEST_MAIN_WINDOW_CONTENTS_STYLE_EMPTY:
wrap_in_scrolled_window (priv->contents_widget, GTK_WIDGET (priv->empty_view));
modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget),
FALSE);
break;
}
case MODEST_MAIN_WINDOW_CONTENTS_STYLE_EMPTY:
wrap_in_scrolled_window (priv->contents_widget, GTK_WIDGET (priv->empty_view));
modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget),
FALSE);
+ if (priv->style == MODEST_MAIN_WINDOW_STYLE_SIMPLE)
+ gtk_widget_grab_focus (GTK_WIDGET (priv->empty_view));
break;
default:
g_return_if_reached ();
break;
default:
g_return_if_reached ();
@@
-2894,6
+2899,17
@@
modest_main_window_on_msg_view_window_msg_changed (ModestMsgViewWindow *view_win
return TRUE;
}
return TRUE;
}
+static void
+updating_banner_destroyed (gpointer data,
+ GObject *where_the_object_was)
+{
+ ModestMainWindowPrivate *priv = NULL;
+
+ priv = MODEST_MAIN_WINDOW_GET_PRIVATE (data);
+
+ priv->updating_banner = NULL;
+}
+
static gboolean
show_updating_banner (gpointer user_data)
{
static gboolean
show_updating_banner (gpointer user_data)
{
@@
-2908,6
+2924,13
@@
show_updating_banner (gpointer user_data)
priv->updating_banner =
modest_platform_animation_banner (GTK_WIDGET (user_data), NULL,
_CS ("ckdg_pb_updating"));
priv->updating_banner =
modest_platform_animation_banner (GTK_WIDGET (user_data), NULL,
_CS ("ckdg_pb_updating"));
+
+ /* We need this because banners in Maemo could be
+ destroyed by dialogs so we need to properly update
+ our reference to it */
+ g_object_weak_ref (G_OBJECT (priv->updating_banner),
+ updating_banner_destroyed,
+ user_data);
gdk_threads_leave ();
}
gdk_threads_leave ();
}
@@
-3033,6
+3056,17
@@
on_window_destroy (GtkObject *widget,
remove_banners (MODEST_MAIN_WINDOW (widget));
}
remove_banners (MODEST_MAIN_WINDOW (widget));
}
+static void
+retrieving_banner_destroyed (gpointer data,
+ GObject *where_the_object_was)
+{
+ ModestMainWindowPrivate *priv = NULL;
+
+ priv = MODEST_MAIN_WINDOW_GET_PRIVATE (data);
+
+ priv->retrieving_banner = NULL;
+}
+
static gboolean
show_retrieving_banner (gpointer user_data)
{
static gboolean
show_retrieving_banner (gpointer user_data)
{
@@
-3047,6
+3081,13
@@
show_retrieving_banner (gpointer user_data)
priv->retrieving_banner =
modest_platform_animation_banner (GTK_WIDGET (user_data), NULL,
_("mcen_ib_getting_items"));
priv->retrieving_banner =
modest_platform_animation_banner (GTK_WIDGET (user_data), NULL,
_("mcen_ib_getting_items"));
+
+ /* We need this because banners in Maemo could be
+ destroyed by dialogs so we need to properly update
+ our reference to it */
+ g_object_weak_ref (G_OBJECT (priv->retrieving_banner),
+ retrieving_banner_destroyed,
+ user_data);
gdk_threads_leave ();
}
gdk_threads_leave ();
}