aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-23 22:30:28 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-23 22:30:28 +0800
commit149c8a6d3f8ad9cea140fa7ae95b600c8e6e73a6 (patch)
tree5c427bbd812464b0acb7772b5312f674c52bd4a2 /libempathy-gtk
parent26c5dbdb15ffaba1bac960966617872d557a0f34 (diff)
downloadgsoc2013-empathy-149c8a6d3f8ad9cea140fa7ae95b600c8e6e73a6.tar
gsoc2013-empathy-149c8a6d3f8ad9cea140fa7ae95b600c8e6e73a6.tar.gz
gsoc2013-empathy-149c8a6d3f8ad9cea140fa7ae95b600c8e6e73a6.tar.bz2
gsoc2013-empathy-149c8a6d3f8ad9cea140fa7ae95b600c8e6e73a6.tar.lz
gsoc2013-empathy-149c8a6d3f8ad9cea140fa7ae95b600c8e6e73a6.tar.xz
gsoc2013-empathy-149c8a6d3f8ad9cea140fa7ae95b600c8e6e73a6.tar.zst
gsoc2013-empathy-149c8a6d3f8ad9cea140fa7ae95b600c8e6e73a6.zip
Do not apply different theme to chat and chatrooms
svn path=/trunk/; revision=1033
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat-view.c42
-rw-r--r--libempathy-gtk/empathy-chat-view.h2
-rw-r--r--libempathy-gtk/empathy-conf.h1
-rw-r--r--libempathy-gtk/empathy-theme-manager.c20
4 files changed, 2 insertions, 63 deletions
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index bd13f2993..f84ae9e16 100644
--- a/libempathy-gtk/empathy-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -73,7 +73,6 @@ struct _EmpathyChatViewPriv {
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 @@ empathy_chat_view_init (EmpathyChatView *view)
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 @@ chat_view_theme_changed_cb (EmpathyThemeManager *manager,
{
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 @@ empathy_chat_view_get_smiley_menu (GCallback callback,
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)
{
diff --git a/libempathy-gtk/empathy-chat-view.h b/libempathy-gtk/empathy-chat-view.h
index f454963ac..9002d40fc 100644
--- a/libempathy-gtk/empathy-chat-view.h
+++ b/libempathy-gtk/empathy-chat-view.h
@@ -90,8 +90,6 @@ void empathy_chat_view_set_margin (EmpathyChatView *view,
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);
diff --git a/libempathy-gtk/empathy-conf.h b/libempathy-gtk/empathy-conf.h
index c1e491352..a0ade22ee 100644
--- a/libempathy-gtk/empathy-conf.h
+++ b/libempathy-gtk/empathy-conf.h
@@ -50,7 +50,6 @@ struct _EmpathyConfClass {
#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"
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c
index 490fe6ace..09b68e0a7 100644
--- a/libempathy-gtk/empathy-theme-manager.c
+++ b/libempathy-gtk/empathy-theme-manager.c
@@ -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_finalize (GObject *o
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 @@ empathy_theme_manager_init (EmpathyThemeManager *manager)
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 @@ theme_manager_finalize (GObject *object)
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 @@ theme_manager_notify_name_cb (EmpathyConf *conf,
}
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)