empathy r1033 - in trunk: libempathy-gtk src



Author: xclaesse
Date: Wed Apr 23 14:30:28 2008
New Revision: 1033
URL: http://svn.gnome.org/viewvc/empathy?rev=1033&view=rev

Log:
Do not apply different theme to chat and chatrooms


Modified:
   trunk/libempathy-gtk/empathy-chat-view.c
   trunk/libempathy-gtk/empathy-chat-view.h
   trunk/libempathy-gtk/empathy-conf.h
   trunk/libempathy-gtk/empathy-theme-manager.c
   trunk/src/empathy-preferences.c
   trunk/src/empathy-preferences.glade

Modified: trunk/libempathy-gtk/empathy-chat-view.c
==============================================================================
--- trunk/libempathy-gtk/empathy-chat-view.c	(original)
+++ trunk/libempathy-gtk/empathy-chat-view.c	Wed Apr 23 14:30:28 2008
@@ -73,7 +73,6 @@
 	gboolean       allow_scrolling;
 	guint          scroll_timeout;
 	GTimer        *scroll_time;
-	gboolean       is_group_chat;
 
 	GtkTextMark   *find_mark_previous;
 	GtkTextMark   *find_mark_next;
@@ -157,7 +156,6 @@
 	priv->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
 	priv->last_timestamp = 0;
 	priv->allow_scrolling = TRUE;
-	priv->is_group_chat = FALSE;
 
 	g_object_set (view,
 		      "wrap-mode", GTK_WRAP_WORD_CHAR,
@@ -628,18 +626,10 @@
 {
 	EmpathyChatViewPriv *priv;
 	gboolean            show_avatars = FALSE;
-	gboolean            theme_rooms = FALSE;
 
 	priv = GET_PRIV (view);
 
-	empathy_conf_get_bool (empathy_conf_get (),
-			      EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
-			      &theme_rooms);
-	if (!theme_rooms && priv->is_group_chat) {
-		empathy_theme_manager_apply (manager, view, NULL);
-	} else {
-		empathy_theme_manager_apply_saved (manager, view);
-	}
+	empathy_theme_manager_apply_saved (manager, view);
 
 	/* Needed for now to update the "rise" property of the names to get it
 	 * vertically centered.
@@ -1443,36 +1433,6 @@
 	return menu;
 }
 
-/* FIXME: Do we really need this? Better to do it internally only at setup time,
- * we will never change it on the fly.
- */
-void
-empathy_chat_view_set_is_group_chat (EmpathyChatView *view,
-				    gboolean        is_group_chat)
-{
-	EmpathyChatViewPriv *priv;
-	gboolean            theme_rooms = FALSE;
-
-	g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
-
-	priv = GET_PRIV (view);
-
-	priv->is_group_chat = is_group_chat;
-
-	empathy_conf_get_bool (empathy_conf_get (),
-			      EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
-			      &theme_rooms);
-
-	if (!theme_rooms && is_group_chat) {
-		empathy_theme_manager_apply (empathy_theme_manager_get (),
-					    view,
-					    NULL);
-	} else {
-		empathy_theme_manager_apply_saved (empathy_theme_manager_get (),
-						  view);
-	}
-}
-
 time_t
 empathy_chat_view_get_last_timestamp (EmpathyChatView *view)
 {

Modified: trunk/libempathy-gtk/empathy-chat-view.h
==============================================================================
--- trunk/libempathy-gtk/empathy-chat-view.h	(original)
+++ trunk/libempathy-gtk/empathy-chat-view.h	Wed Apr 23 14:30:28 2008
@@ -90,8 +90,6 @@
 							 gint             margin);
 GtkWidget *      empathy_chat_view_get_smiley_menu      (GCallback        callback,
 							 gpointer         user_data);
-void             empathy_chat_view_set_is_group_chat    (EmpathyChatView *view,
-							 gboolean         is_group_chat);
 time_t           empathy_chat_view_get_last_timestamp   (EmpathyChatView *view);
 void             empathy_chat_view_set_last_timestamp   (EmpathyChatView *view,
 							 time_t           timestamp);

Modified: trunk/libempathy-gtk/empathy-conf.h
==============================================================================
--- trunk/libempathy-gtk/empathy-conf.h	(original)
+++ trunk/libempathy-gtk/empathy-conf.h	Wed Apr 23 14:30:28 2008
@@ -50,7 +50,6 @@
 #define EMPATHY_PREFS_POPUPS_WHEN_AVAILABLE        EMPATHY_PREFS_PATH "/notifications/popups_when_available"
 #define EMPATHY_PREFS_CHAT_SHOW_SMILEYS            EMPATHY_PREFS_PATH "/conversation/graphical_smileys"
 #define EMPATHY_PREFS_CHAT_THEME                   EMPATHY_PREFS_PATH "/conversation/theme"
-#define EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM         EMPATHY_PREFS_PATH "/conversation/theme_chat_room"
 #define EMPATHY_PREFS_CHAT_SPELL_CHECKER_LANGUAGES EMPATHY_PREFS_PATH "/conversation/spell_checker_languages"
 #define EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED   EMPATHY_PREFS_PATH "/conversation/spell_checker_enabled"
 #define EMPATHY_PREFS_CHAT_NICK_COMPLETION_CHAR    EMPATHY_PREFS_PATH "/conversation/nick_completion_char"

Modified: trunk/libempathy-gtk/empathy-theme-manager.c
==============================================================================
--- trunk/libempathy-gtk/empathy-theme-manager.c	(original)
+++ trunk/libempathy-gtk/empathy-theme-manager.c	Wed Apr 23 14:30:28 2008
@@ -39,7 +39,6 @@
 typedef struct {
 	gchar       *name;
 	guint        name_notify_id;
-	guint        room_notify_id;
 
 	gboolean     show_avatars;
 	guint        show_avatars_notify_id;
@@ -56,9 +55,7 @@
 static void        theme_manager_notify_name_cb           (EmpathyConf         *conf,
 							   const gchar        *key,
 							   gpointer            user_data);
-static void        theme_manager_notify_room_cb           (EmpathyConf         *conf,
-							   const gchar        *key,
-							   gpointer            user_data);
+
 static void        theme_manager_notify_show_avatars_cb   (EmpathyConf         *conf,
 							   const gchar        *key,
 							   gpointer            user_data);
@@ -224,12 +221,6 @@
 					theme_manager_notify_name_cb,
 					manager);
 
-	priv->room_notify_id =
-		empathy_conf_notify_add (empathy_conf_get (),
-					EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
-					theme_manager_notify_room_cb,
-					manager);
-
 	empathy_conf_get_string (empathy_conf_get (),
 				EMPATHY_PREFS_CHAT_THEME,
 				&priv->name);
@@ -289,7 +280,6 @@
 	priv = GET_PRIV (object);
 
 	empathy_conf_notify_remove (empathy_conf_get (), priv->name_notify_id);
-	empathy_conf_notify_remove (empathy_conf_get (), priv->room_notify_id);
 	empathy_conf_notify_remove (empathy_conf_get (), priv->show_avatars_notify_id);
 
 	g_free (priv->name);
@@ -329,14 +319,6 @@
 }
 
 static void
-theme_manager_notify_room_cb (EmpathyConf  *conf,
-			      const gchar *key,
-			      gpointer     user_data)
-{
-	g_signal_emit (user_data, signals[THEME_CHANGED], 0, NULL);
-}
-
-static void
 theme_manager_notify_show_avatars_cb (EmpathyConf  *conf,
 				      const gchar *key,
 				      gpointer     user_data)

Modified: trunk/src/empathy-preferences.c
==============================================================================
--- trunk/src/empathy-preferences.c	(original)
+++ trunk/src/empathy-preferences.c	Wed Apr 23 14:30:28 2008
@@ -50,7 +50,6 @@
 	GtkWidget *checkbutton_compact_contact_list;
 	GtkWidget *checkbutton_show_smileys;
 	GtkWidget *combobox_chat_theme;
-	GtkWidget *checkbutton_theme_chat_room;
 	GtkWidget *checkbutton_separate_chat_windows;
 	GtkWidget *checkbutton_autoconnect;
 	GtkWidget *radiobutton_contact_list_sort_by_name;
@@ -204,10 +203,6 @@
 					 EMPATHY_PREFS_CHAT_THEME,
 					 preferences->combobox_chat_theme);
 
-	preferences_hookup_toggle_button (preferences,
-					  EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
-					  preferences->checkbutton_theme_chat_room);
-
 	preferences_hookup_radio_button (preferences,
 					 EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM,
 					 preferences->radiobutton_contact_list_sort_by_name);
@@ -950,7 +945,6 @@
 		"checkbutton_compact_contact_list", &preferences->checkbutton_compact_contact_list,
 		"checkbutton_show_smileys", &preferences->checkbutton_show_smileys,
 		"combobox_chat_theme", &preferences->combobox_chat_theme,
-		"checkbutton_theme_chat_room", &preferences->checkbutton_theme_chat_room,
 		"checkbutton_separate_chat_windows", &preferences->checkbutton_separate_chat_windows,
 		"checkbutton_autoconnect", &preferences->checkbutton_autoconnect,
 		"radiobutton_contact_list_sort_by_name", &preferences->radiobutton_contact_list_sort_by_name,

Modified: trunk/src/empathy-preferences.glade
==============================================================================
--- trunk/src/empathy-preferences.glade	(original)
+++ trunk/src/empathy-preferences.glade	Wed Apr 23 14:30:28 2008
@@ -247,7 +247,6 @@
                 <property name="spacing">18</property>
                 <child>
                   <widget class="GtkFrame" id="frame5">
-                    <property name="visible">False</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">GTK_SHADOW_NONE</property>
                     <child>
@@ -558,45 +557,6 @@
                     <property name="fill">False</property>
                   </packing>
                 </child>
-                <child>
-                  <widget class="GtkFrame" id="frame12">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">GTK_SHADOW_NONE</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment20">
-                        <property name="visible">True</property>
-                        <property name="top_padding">6</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkCheckButton" id="checkbutton_theme_chat_room">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label" translatable="yes">_Use for chat rooms</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label627">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Options&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
               </widget>
               <packing>
                 <property name="position">3</property>



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