* Added the proper icon to each window
authorSergio Villar Senin <svillar@igalia.com>
Fri, 13 Apr 2007 09:02:57 +0000 (09:02 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Fri, 13 Apr 2007 09:02:57 +0000 (09:02 +0000)
* Replaced the Modest icon in the desktop file

pmo-trunk-r1555

src/maemo/modest-icon-names.h
src/maemo/modest-main-window.c
src/maemo/modest-msg-edit-window.c
src/maemo/modest-msg-view-window.c
src/maemo/modest.desktop.in
src/modest-runtime.c

index 6f5cc99..c871da5 100644 (file)
@@ -40,7 +40,9 @@
 
 /* icons */
 
-#define MODEST_APP_ICON                                PIXMAP_PREFIX "modest-icon.png"
+#define MODEST_APP_ICON                                "qgn_list_messagin"
+#define MODEST_APP_MSG_VIEW_ICON               "qgn_list_messagin_viewer"
+#define MODEST_APP_MSG_EDIT_ICON               "qgn_list_messagin_editor"
 
 #define MODEST_HEADER_ICON_READ                        "qgn_list_messagin_mail"
 #define MODEST_HEADER_ICON_UNREAD              "qgn_list_messagin_mail_unread"
index b8ba75e..74e8542 100644 (file)
@@ -40,7 +40,7 @@
 #include <widgets/modest-msg-edit-window.h>
 #include <widgets/modest-account-view-window.h>
 
-
+#include "modest-platform.h"
 #include "modest-widget-memory.h"
 #include "modest-window-priv.h"
 #include "modest-main-window-ui.h"
@@ -378,6 +378,7 @@ modest_main_window_new (void)
        GtkActionGroup *action_group;
        GError *error = NULL;
        TnyFolderStoreQuery     *query;
+       GdkPixbuf *window_icon;
 
        self  = MODEST_MAIN_WINDOW(g_object_new(MODEST_TYPE_MAIN_WINDOW, NULL));
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
@@ -456,10 +457,10 @@ modest_main_window_new (void)
 
        gtk_container_add (GTK_CONTAINER(self), priv->main_vbox);
        restore_sizes (MODEST_MAIN_WINDOW(self));
-       
-       gtk_window_set_title (GTK_WINDOW(self), _("Modest"));
-       gtk_window_set_icon_from_file (GTK_WINDOW(self), MODEST_APP_ICON, NULL);
-       gtk_widget_show_all (priv->main_vbox);
+
+       /* Set window icon */
+       window_icon = modest_platform_get_icon (MODEST_APP_ICON);
+       gtk_window_set_icon (GTK_WINDOW (self), window_icon);
 
 /*     /\* should we hide the toolbar? *\/ */
 /*     if (!modest_conf_get_bool (modest_runtime_get_conf (), MODEST_CONF_SHOW_TOOLBAR, NULL)) */
index 3da318a..b25552c 100644 (file)
@@ -45,6 +45,7 @@
 
 #include <modest-runtime.h>
 
+#include "modest-platform.h"
 #include "modest-icon-names.h"
 #include "modest-widget-memory.h"
 #include "modest-window-priv.h"
@@ -543,6 +544,7 @@ modest_msg_edit_window_new (TnyMsg *msg, const gchar *account_name)
        ModestMsgEditWindowPrivate *priv;
        GtkActionGroup *action_group;
        GError *error = NULL;
+       GdkPixbuf *window_icon = NULL;
 
        g_return_val_if_fail (msg, NULL);
        
@@ -612,6 +614,10 @@ modest_msg_edit_window_new (TnyMsg *msg, const gchar *account_name)
        set_msg (MODEST_MSG_EDIT_WINDOW (obj), msg);
 
        text_buffer_refresh_attributes (WP_TEXT_BUFFER (priv->text_buffer), MODEST_MSG_EDIT_WINDOW (obj));
+
+       /* Set window icon */
+       window_icon = modest_platform_get_icon (MODEST_APP_MSG_EDIT_ICON);
+       gtk_window_set_icon (GTK_WINDOW (obj), window_icon);
        
        return (ModestWindow*)obj;
 }
index e636708..4443801 100644 (file)
@@ -31,6 +31,7 @@
 #include <tny-account-store.h>
 #include <tny-simple-list.h>
 #include <tny-header.h>
+#include "modest-platform.h"
 #include <modest-tny-msg.h>
 #include <modest-msg-view-window.h>
 #include <modest-main-window-ui.h>
@@ -360,6 +361,7 @@ modest_msg_view_window_new (TnyMsg *msg, const gchar *account_name)
        ModestWindowPrivate *parent_priv;
        GtkActionGroup *action_group;
        GError *error = NULL;
+       GdkPixbuf *window_icon = NULL;
 
        g_return_val_if_fail (msg, NULL);
        
@@ -442,6 +444,10 @@ modest_msg_view_window_new (TnyMsg *msg, const gchar *account_name)
 
        modest_msg_view_window_update_dimmed (MODEST_MSG_VIEW_WINDOW (obj));
 
+       /* Set window icon */
+       window_icon = modest_platform_get_icon (MODEST_APP_MSG_VIEW_ICON);
+       gtk_window_set_icon (GTK_WINDOW (obj), window_icon);
+
        gtk_widget_grab_focus (priv->msg_view);
 
        return MODEST_WINDOW(obj);
index 4660c1f..0bca91a 100644 (file)
@@ -9,9 +9,9 @@ Exec=@prefix@/bin/modest
 X-Osso-Service=org.maemo.modest
 X-Osso-Type=application/x-executable
 
-Icon=modest-icon
-X-Window-Icon=modest-icon
-X-Window-Icon-Dimmed=modest-icon-dimmed
+Icon=qgn_list_messagin
+X-Window-Icon=qgn_list_messagin
+X-Window-Icon-Dimmed=qgn_list_messagin
 
 StartupWMClass=modest
 
index b231072..3121f4e 100644 (file)
@@ -131,6 +131,9 @@ modest_runtime_init (void)
        g_thread_init(NULL);
        gdk_threads_init ();
 
+       /* Set application name */
+       g_set_application_name (_("FIXME Modest"));
+
        my_singletons = modest_singletons_new ();
        if (!my_singletons) {
                g_printerr ("modest: failed to initialize singletons\n");