projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Main window toolbar is now shown
[modest]
/
src
/
modest-runtime.c
diff --git
a/src/modest-runtime.c
b/src/modest-runtime.c
index
22aa14b
..
5ed7526
100644
(file)
--- a/
src/modest-runtime.c
+++ b/
src/modest-runtime.c
@@
-541,11
+541,17
@@
init_stock_icons (void)
static gboolean registered = FALSE;
if (!registered) {
static gboolean registered = FALSE;
if (!registered) {
+ GtkIconTheme *current_theme;
GdkPixbuf *pixbuf;
GtkIconFactory *factory;
gint i;
static GtkStockItem items[] = {
GdkPixbuf *pixbuf;
GtkIconFactory *factory;
gint i;
static GtkStockItem items[] = {
+#if MODEST_PLATFORM_ID==2
+ { MODEST_STOCK_SPLIT_VIEW, "split view", 0, 0, NULL },
+ { MODEST_STOCK_SORT, "sort mail", 0, 0, NULL },
+ { MODEST_STOCK_REFRESH, "refresh mail", 0, 0, NULL },
+#endif
{ MODEST_STOCK_MAIL_SEND, "send mail", 0, 0, NULL },
{ MODEST_STOCK_NEW_MAIL, "new mail", 0, 0, NULL },
/* { MODEST_STOCK_SEND_RECEIVE, "send receive", 0, 0, NULL }, */
{ MODEST_STOCK_MAIL_SEND, "send mail", 0, 0, NULL },
{ MODEST_STOCK_NEW_MAIL, "new mail", 0, 0, NULL },
/* { MODEST_STOCK_SEND_RECEIVE, "send receive", 0, 0, NULL }, */
@@
-559,6
+565,11
@@
init_stock_icons (void)
};
static gchar *items_names [] = {
};
static gchar *items_names [] = {
+#if MODEST_PLATFORM_ID==2
+ MODEST_TOOLBAR_ICON_SPLIT_VIEW,
+ MODEST_TOOLBAR_ICON_SORT,
+ MODEST_TOOLBAR_ICON_REFRESH,
+#endif
MODEST_TOOLBAR_ICON_MAIL_SEND,
MODEST_TOOLBAR_ICON_NEW_MAIL,
/* MODEST_TOOLBAR_ICON_SEND_RECEIVE, */
MODEST_TOOLBAR_ICON_MAIL_SEND,
MODEST_TOOLBAR_ICON_NEW_MAIL,
/* MODEST_TOOLBAR_ICON_SEND_RECEIVE, */
@@
-569,6
+580,7
@@
init_stock_icons (void)
/* MODEST_TOOLBAR_ICON_NEXT, */
/* MODEST_TOOLBAR_ICON_PREV, */
/* MODEST_TOOLBAR_ICON_STOP */
/* MODEST_TOOLBAR_ICON_NEXT, */
/* MODEST_TOOLBAR_ICON_PREV, */
/* MODEST_TOOLBAR_ICON_STOP */
+ MODEST_TOOLBAR_ICON_FORMAT_BULLETS,
};
registered = TRUE;
};
registered = TRUE;
@@
-580,17
+592,25
@@
init_stock_icons (void)
factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (factory);
factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (factory);
+ current_theme = gtk_icon_theme_get_default ();
+
/* Register icons to accompany stock items */
for (i = 0; i < G_N_ELEMENTS (items); i++) {
/* Register icons to accompany stock items */
for (i = 0; i < G_N_ELEMENTS (items); i++) {
- pixbuf = NULL;
- pixbuf = gdk_pixbuf_new_from_file (items_names[i], NULL);
+#if MODEST_PLATFORM_ID==1 /* MODES_PLATFORM_ID: 1 ==> gnome, 2==> maemo */
+ pixbuf = gdk_pixbuf_new_from_file (items_names[i], NULL);
+#else
+ pixbuf = gtk_icon_theme_load_icon (current_theme,
+ items_names[i],
+ 26,
+ GTK_ICON_LOOKUP_NO_SVG,
+ NULL);
+#endif
if (pixbuf != NULL) {
GtkIconSet *icon_set;
GdkPixbuf *transparent;
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
if (pixbuf != NULL) {
GtkIconSet *icon_set;
GdkPixbuf *transparent;
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
-
icon_set = gtk_icon_set_new_from_pixbuf (transparent);
gtk_icon_factory_add (factory, items[i].stock_id, icon_set);
gtk_icon_set_unref (icon_set);
icon_set = gtk_icon_set_new_from_pixbuf (transparent);
gtk_icon_factory_add (factory, items[i].stock_id, icon_set);
gtk_icon_set_unref (icon_set);
@@
-648,10
+668,14
@@
init_default_settings (ModestConf *conf)
{
if (!modest_conf_key_exists (conf, MODEST_CONF_SHOW_TOOLBAR, NULL))
modest_conf_set_bool (conf, MODEST_CONF_SHOW_TOOLBAR, TRUE, NULL);
{
if (!modest_conf_key_exists (conf, MODEST_CONF_SHOW_TOOLBAR, NULL))
modest_conf_set_bool (conf, MODEST_CONF_SHOW_TOOLBAR, TRUE, NULL);
-
+
if (!modest_conf_key_exists (conf, MODEST_CONF_SHOW_CC, NULL))
modest_conf_set_bool (conf, MODEST_CONF_SHOW_CC, TRUE, NULL);
if (!modest_conf_key_exists (conf, MODEST_CONF_SHOW_BCC, NULL))
modest_conf_set_bool (conf, MODEST_CONF_SHOW_BCC, FALSE, NULL);
if (!modest_conf_key_exists (conf, MODEST_CONF_SHOW_CC, NULL))
modest_conf_set_bool (conf, MODEST_CONF_SHOW_CC, TRUE, NULL);
if (!modest_conf_key_exists (conf, MODEST_CONF_SHOW_BCC, NULL))
modest_conf_set_bool (conf, MODEST_CONF_SHOW_BCC, FALSE, NULL);
+
+ if (!modest_conf_key_exists (conf, MODEST_CONF_CONNECT_AT_STARTUP, NULL))
+ modest_conf_set_bool (conf, MODEST_CONF_CONNECT_AT_STARTUP, TRUE, NULL);
+
}
}