diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2007-12-29 23:58:47 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-12-29 23:58:47 +0800 |
commit | e4358acdec7b8c278a1950a3da24bab387a0e7b3 (patch) | |
tree | 9a15f253d9c45a90a8794143ecdd854650d58af1 /libempathy-gtk/empathy-chat-view.c | |
parent | b8607414ea0e41c44a09d31ebcd0437a3c867a24 (diff) | |
download | gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.gz gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.bz2 gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.lz gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.xz gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.zst gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.zip |
Revert "merge git work"
This reverts commit 0cfd80847f0d66967f56c7d6b3eb46793f725859.
svn path=/trunk/; revision=519
Diffstat (limited to 'libempathy-gtk/empathy-chat-view.c')
-rw-r--r-- | libempathy-gtk/empathy-chat-view.c | 54 |
1 files changed, 16 insertions, 38 deletions
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c index 947281590..c7428e9df 100644 --- a/libempathy-gtk/empathy-chat-view.c +++ b/libempathy-gtk/empathy-chat-view.c @@ -68,7 +68,6 @@ struct _EmpathyChatViewPriv { GtkTextBuffer *buffer; EmpathyTheme *theme; - gpointer theme_context; time_t last_timestamp; BlockType last_block_type; @@ -130,7 +129,8 @@ static void chat_view_clear_view_cb (GtkMenuItem * static gboolean chat_view_is_scrolled_down (EmpathyChatView *view); static void chat_view_theme_changed_cb (EmpathyThemeManager *manager, EmpathyChatView *view); -static void chat_view_theme_updated_cb (EmpathyTheme *theme, +static void chat_view_theme_notify_cb (EmpathyTheme *theme, + GParamSpec *param, EmpathyChatView *view); G_DEFINE_TYPE (EmpathyChatView, empathy_chat_view, GTK_TYPE_TEXT_VIEW); @@ -233,12 +233,8 @@ chat_view_finalize (GObject *object) if (priv->theme) { g_signal_handlers_disconnect_by_func (priv->theme, - chat_view_theme_updated_cb, + chat_view_theme_notify_cb, view); - - empathy_theme_detach_from_view (priv->theme, priv->theme_context, - view); - g_object_unref (priv->theme); } @@ -796,8 +792,7 @@ empathy_chat_view_append_message (EmpathyChatView *view, chat_view_maybe_trim_buffer (view); - empathy_theme_append_message (priv->theme, priv->theme_context, - view, msg); + empathy_theme_append_message (priv->theme, view, msg); if (bottom) { empathy_chat_view_scroll_down (view); @@ -820,9 +815,7 @@ empathy_chat_view_append_event (EmpathyChatView *view, chat_view_maybe_trim_buffer (view); - empathy_theme_append_event (priv->theme, - priv->theme_context, - view, str); + empathy_theme_append_event (priv->theme, view, str); if (bottom) { empathy_chat_view_scroll_down (view); @@ -852,13 +845,10 @@ empathy_chat_view_append_button (EmpathyChatView *view, bottom = chat_view_is_scrolled_down (view); - empathy_theme_append_timestamp (priv->theme, priv->theme_context, - view, NULL, - TRUE, TRUE); + empathy_theme_append_timestamp (priv->theme, view, NULL, TRUE, TRUE); if (message) { - empathy_theme_append_text (priv->theme, priv->theme_context, - view, message, tag, NULL); + empathy_theme_append_text (priv->theme, view, message, tag, NULL); } gtk_text_buffer_get_end_iter (priv->buffer, &iter); @@ -1006,8 +996,6 @@ empathy_chat_view_clear (EmpathyChatView *view) */ priv = GET_PRIV (view); - empathy_theme_view_cleared (priv->theme, priv->theme_context, view); - priv->last_block_type = BLOCK_TYPE_NONE; priv->last_timestamp = 0; } @@ -1370,16 +1358,11 @@ empathy_chat_view_get_theme (EmpathyChatView *view) } static void -chat_view_theme_updated_cb (EmpathyTheme *theme, EmpathyChatView *view) +chat_view_theme_notify_cb (EmpathyTheme *theme, + GParamSpec *param, + EmpathyChatView *view) { - EmpathyChatViewPriv *priv; - - priv = GET_PRIV (view); - - empathy_theme_detach_from_view (priv->theme, priv->theme_context, - view); - - priv->theme_context = empathy_theme_setup_with_view (theme, view); + empathy_theme_update_view (theme, view); } void @@ -1394,24 +1377,19 @@ empathy_chat_view_set_theme (EmpathyChatView *view, EmpathyTheme *theme) if (priv->theme) { g_signal_handlers_disconnect_by_func (priv->theme, - chat_view_theme_updated_cb, + chat_view_theme_notify_cb, view); - empathy_theme_detach_from_view (priv->theme, priv->theme_context, - view); - g_object_unref (priv->theme); } priv->theme = g_object_ref (theme); - g_signal_connect (priv->theme, - "updated", - G_CALLBACK (chat_view_theme_updated_cb), + empathy_theme_update_view (theme, view); + g_signal_connect (priv->theme, "notify", + G_CALLBACK (chat_view_theme_notify_cb), view); - priv->theme_context = empathy_theme_setup_with_view (theme, view); - - /* FIXME: Possibly redraw the function and make it a property */ + /* FIXME: Redraw all messages using the new theme */ } void |