[anjal] BUGFIX: GNOME #589358 - Remove icons from buttons on moblin env.



commit 67df040c2add92b5182e0ac7df32026435e6a15e
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Thu Jul 23 17:45:28 2009 +0530

    BUGFIX: GNOME #589358 - Remove icons from buttons on moblin env.

 src/mail-account-view.c  |   14 ++++++++++----
 src/mail-settings-view.c |   12 ++++++++----
 src/main.c               |    5 ++++-
 3 files changed, 22 insertions(+), 9 deletions(-)
---
diff --git a/src/mail-account-view.c b/src/mail-account-view.c
index a488b0b..cadbbfa 100644
--- a/src/mail-account-view.c
+++ b/src/mail-account-view.c
@@ -32,6 +32,8 @@
 #include "e-util/e-config.h"
 #include "mail/mail-config.h"
 
+extern gboolean anjal_icon_decoration;
+
 struct _MailAccountViewPrivate {
 	GtkWidget *tab_str;
 };
@@ -515,8 +517,10 @@ mav_construct_page(MailAccountView *view, MAVPageType type)
 
 	if (mail_account_pages[type].prev) {
 		box = gtk_hbox_new(FALSE, 0);
-		tmp = gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_BUTTON);
-		gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0);
+		if (anjal_icon_decoration) {
+			tmp = gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_BUTTON);
+			gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0);
+		}
 		tmp = gtk_label_new (mail_account_pages[type].prev);
 		gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3);
 		page->prev = gtk_button_new ();
@@ -529,8 +533,10 @@ mav_construct_page(MailAccountView *view, MAVPageType type)
 		box = gtk_hbox_new(FALSE, 0);
 		tmp = gtk_label_new (mail_account_pages[type].next);
 		gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3);
-		tmp = gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_BUTTON);		
-		gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0);
+		if (anjal_icon_decoration) {
+			tmp = gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_BUTTON);		
+			gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0);
+		}
 		page->next = gtk_button_new ();
 		gtk_container_add ((GtkContainer *)page->next, box);
 		gtk_widget_show_all(page->next);
diff --git a/src/mail-settings-view.c b/src/mail-settings-view.c
index 058d97e..60eb29b 100644
--- a/src/mail-settings-view.c
+++ b/src/mail-settings-view.c
@@ -31,6 +31,8 @@
 #include "mail-view.h"
 #include "mail/mail-config.h"
 
+extern gboolean anjal_icon_decoration;
+
 struct _MailSettingsViewPrivate {
 	GtkWidget *tab_str;
 
@@ -136,10 +138,12 @@ build_account_button (MailSettingsView *acview, EAccount *account)
 
 	label = gtk_button_new ();
 	tbox = gtk_hbox_new (FALSE, 0);
-
-	tlabel = (GtkWidget *)gtk_image_new_from_stock (account ? "gtk-edit" : "gtk-new", GTK_ICON_SIZE_BUTTON);
-	gtk_widget_show(tlabel);
-	gtk_box_pack_start((GtkBox *)tbox, tlabel, FALSE, FALSE, 6);
+	
+	if (anjal_icon_decoration) {
+		tlabel = (GtkWidget *)gtk_image_new_from_stock (account ? "gtk-edit" : "gtk-new", GTK_ICON_SIZE_BUTTON);
+		gtk_widget_show(tlabel);
+		gtk_box_pack_start((GtkBox *)tbox, tlabel, FALSE, FALSE, 6);
+	}
 
 	if (account)
 		tmp = g_strdup_printf("%s %s...", _("Modify"), e_account_get_string(account, E_ACCOUNT_ID_ADDRESS));
diff --git a/src/main.c b/src/main.c
index c7e5dbc..0298304 100644
--- a/src/main.c
+++ b/src/main.c
@@ -54,6 +54,7 @@
 #endif
 
 gboolean windowed = FALSE;
+gboolean anjal_icon_decoration = FALSE;
 gboolean default_app =  FALSE;
 GtkWidget *main_window;
 static gchar **remaining_args;
@@ -262,7 +263,9 @@ main (int argc, char *argv[])
 		  return 0;
 	  }
 #endif
-	  
+	if (windowed)
+		anjal_icon_decoration = TRUE;
+
 	main_window = (GtkWidget *)mail_shell_new ();
 	gtk_widget_show (main_window);
 	mail_shell_set_cmdline_args ((MailShell *)main_window, remaining_args);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]