#include <hildon/hildon-notification.h>
#endif /*MODEST_HILDON_NOTIFY*/
-
#ifdef MODEST_HAVE_HILDON0_WIDGETS
#include <hildon-widgets/hildon-color-selector.h>
#include <hildon-widgets/hildon-color-button.h>
#include <hildon-widgets/hildon-font-selection-dialog.h>
#include <hildon-widgets/hildon-find-toolbar.h>
#include <hildon-widgets/hildon-sort-dialog.h>
+#include <hildon-widgets/hildon-program.h>
#else
#include <hildon/hildon-find-toolbar.h>
#include <hildon/hildon-sort-dialog.h>
#include <hildon/hildon-number-editor.h>
+#include <hildon/hildon-program.h>
#endif /*__MODEST_HAVE_HILDON1_WIDGETS*/
#endif /*__MODEST_HAVE_HILDON0_WIDGETS_*/
} HildonGtkInputMode;
#endif /* !MODEST_HAVE_HILDON_GTK */
-
-
-
#endif /*__MODEST_HILDON_INCLUDES__*/
#include "modest-text-utils.h"
#include "modest-signal-mgr.h"
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
-#include <hildon-widgets/hildon-program.h>
-#else
-#include <hildon/hildon-program.h>
-#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
-
#define MODEST_MAIN_WINDOW_ACTION_GROUP_ADDITIONS "ModestMainWindowActionAdditions"
#define XALIGN 0.5
/* Sanity check: shouldn't be needed, the window mgr should
call this function before */
- modest_main_window_disconnect_signals (MODEST_WINDOW (obj));
-
+ modest_main_window_disconnect_signals (MODEST_WINDOW (obj));
modest_main_window_cleanup_queue_error_signals ((ModestMainWindow *) obj);
-
+
g_slist_free (priv->progress_widgets);
g_byte_array_free (priv->merge_ids, TRUE);
g_source_remove (priv->restore_paned_timeout);
priv->restore_paned_timeout = 0;
}
-
+
G_OBJECT_CLASS(parent_class)->finalize (obj);
}
ModestDimmingRulesGroup *toolbar_rules_group = NULL;
GtkActionGroup *action_group = NULL;
GError *error = NULL;
+ HildonProgram *app;
ModestConf *conf = NULL;
GtkAction *action = NULL;
GdkPixbuf *window_icon;
gtk_container_add (GTK_CONTAINER(self), priv->main_vbox);
- HildonProgram *app = hildon_program_get_instance ();
+ app = hildon_program_get_instance ();
hildon_program_add_window (app, HILDON_WINDOW (self));
g_signal_connect (G_OBJECT(app), "notify::is-topmost",
{
#ifdef DEBUG
GtkTextIter iter;
-
g_message ("BEGIN BUFFER OF SIZE %d", gtk_text_buffer_get_char_count (GTK_TEXT_BUFFER (buffer)));
+
gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter);
while (!gtk_text_iter_is_end (&iter)) {
GString *output = g_string_new ("");
}
init_window (obj);
+
+ hildon_program_add_window (hildon_program_get_instance(),
+ HILDON_WINDOW(obj));
}
gtk_container_add (GTK_CONTAINER (frame), priv->scroll_area);
/* Set window icon */
- window_icon = modest_platform_get_icon (MODEST_APP_MSG_EDIT_ICON);
+ window_icon = modest_platform_get_icon (MODEST_APP_MSG_EDIT_ICON);
if (window_icon) {
- gtk_window_set_icon (GTK_WINDOW (obj), window_icon);
+ /* scale the icon, because it won't be shown unless it's
+ * 64 x 54 -- hildon quirk. this looks a bit ugly now,
+ * so waiting for correctly sized icons, then this scaling
+ * code can disappear -- djcb
+ */
+ GdkPixbuf *scaled =
+ gdk_pixbuf_scale_simple (window_icon, 64, 54, GDK_INTERP_BILINEAR);
+ if (scaled) {
+ g_warning ("setting scaled icon");
+ gtk_window_set_icon (GTK_WINDOW (obj), scaled);
+ g_object_unref (scaled);
+ }
g_object_unref (window_icon);
- }
-
+ }
}
static void
modest_msg_edit_window_finalize (GObject *obj)
{
ModestMsgEditWindowPrivate *priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (obj);
-
+
/* Sanity check: shouldn't be needed, the window mgr should
call this function before */
modest_msg_edit_window_disconnect_signals (MODEST_WINDOW (obj));
/* Init window */
init_window (MODEST_MSG_VIEW_WINDOW(obj));
+
/* Set window icon */
window_icon = modest_platform_get_icon (MODEST_APP_MSG_VIEW_ICON);
if (window_icon) {
- gtk_window_set_icon (GTK_WINDOW (obj), window_icon);
+ /* scale the icon, because it won't be shown unless it's
+ * 64 x 54 -- hildon quirk. this looks a bit ugly now,
+ * so waiting for correctly sized icons, then this scaling
+ * code can disappear -- djcb
+ */
+ GdkPixbuf *scaled =
+ gdk_pixbuf_scale_simple (window_icon, 64, 54, GDK_INTERP_BILINEAR);
+ if (scaled) {
+ g_warning ("setting scaled icon");
+ gtk_window_set_icon (GTK_WINDOW (obj), scaled);
+ g_object_unref (scaled);
+ }
g_object_unref (window_icon);
- }
-
+ }
+
+ hildon_program_add_window (hildon_program_get_instance(),
+ HILDON_WINDOW(obj));
modest_window_mgr_register_help_id (modest_runtime_get_window_mgr(),
GTK_WINDOW(obj),"applications_email_viewer");