diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-accounts-dialog.c | 20 | ||||
-rw-r--r-- | src/empathy-auth-client.c | 3 | ||||
-rw-r--r-- | src/empathy-chat-manager.c | 82 | ||||
-rw-r--r-- | src/empathy-chat-manager.h | 2 | ||||
-rw-r--r-- | src/empathy-chat-window.c | 117 | ||||
-rw-r--r-- | src/empathy-chat-window.h | 3 | ||||
-rw-r--r-- | src/empathy-chat.c | 6 | ||||
-rw-r--r-- | src/empathy-event-manager.c | 13 | ||||
-rw-r--r-- | src/empathy-ft-manager.c | 3 | ||||
-rw-r--r-- | src/empathy-main-window.c | 350 | ||||
-rw-r--r-- | src/empathy-main-window.ui | 29 | ||||
-rw-r--r-- | src/empathy-new-chatroom-dialog.c | 11 | ||||
-rw-r--r-- | src/empathy-notifications-approver.c | 6 | ||||
-rw-r--r-- | src/empathy-preferences.c | 256 | ||||
-rw-r--r-- | src/empathy-preferences.ui | 1427 | ||||
-rw-r--r-- | src/empathy-streamed-media-window.c | 2 | ||||
-rw-r--r-- | src/ev-sidebar.c | 2 |
17 files changed, 1479 insertions, 853 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 734809f80..14de1d3c5 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -1209,12 +1209,10 @@ accounts_dialog_button_remove_clicked_cb (GtkWidget *button, { EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); GtkTreeView *view; - GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; view = GTK_TREE_VIEW (priv->treeview); - model = gtk_tree_view_get_model (view); selection = gtk_tree_view_get_selection (view); if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) return; @@ -1491,14 +1489,12 @@ accounts_dialog_get_settings_iter (EmpathyAccountsDialog *dialog, GtkTreeIter *iter) { GtkTreeView *view; - GtkTreeSelection *selection; GtkTreeModel *model; gboolean ok; EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); /* Update the status in the model */ view = GTK_TREE_VIEW (priv->treeview); - selection = gtk_tree_view_get_selection (view); model = gtk_tree_view_get_model (view); for (ok = gtk_tree_model_get_iter_first (model, iter); @@ -1528,14 +1524,12 @@ accounts_dialog_get_account_iter (EmpathyAccountsDialog *dialog, GtkTreeIter *iter) { GtkTreeView *view; - GtkTreeSelection *selection; GtkTreeModel *model; gboolean ok; EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); /* Update the status in the model */ view = GTK_TREE_VIEW (priv->treeview); - selection = gtk_tree_view_get_selection (view); model = gtk_tree_view_get_model (view); for (ok = gtk_tree_model_get_iter_first (model, iter); @@ -1585,11 +1579,8 @@ static void accounts_dialog_model_set_selected (EmpathyAccountsDialog *dialog, EmpathyAccountSettings *settings) { - GtkTreeSelection *selection; GtkTreeIter iter; - EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview)); if (accounts_dialog_get_settings_iter (dialog, settings, &iter)) select_and_scroll_to_iter (dialog, &iter); } @@ -1831,14 +1822,12 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog, GtkTreeIter iter; TpConnectionStatus status; const gchar *name; - gboolean enabled; EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); gboolean selected = FALSE; model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview)); status = tp_account_get_connection_status (account, NULL); name = tp_account_get_display_name (account); - enabled = tp_account_is_enabled (account); settings = empathy_account_settings_new_for_account (account); @@ -1968,12 +1957,6 @@ enable_or_disable_account (EmpathyAccountsDialog *dialog, TpAccount *account, gboolean enabled) { - GtkTreeModel *model; - EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); - - /* Update the status in the model */ - model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview)); - /* Update the status-infobar in the details view */ accounts_dialog_update_status_infobar (dialog, account); @@ -2036,11 +2019,8 @@ static void accounts_dialog_set_selected_account (EmpathyAccountsDialog *dialog, TpAccount *account) { - GtkTreeSelection *selection; GtkTreeIter iter; - EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview)); if (accounts_dialog_get_account_iter (dialog, account, &iter)) select_and_scroll_to_iter (dialog, &iter); } diff --git a/src/empathy-auth-client.c b/src/empathy-auth-client.c index 68c4543a8..b7988e07e 100644 --- a/src/empathy-auth-client.c +++ b/src/empathy-auth-client.c @@ -159,7 +159,6 @@ verifier_verify_cb (GObject *source, GAsyncResult *result, gpointer user_data) { - gboolean res; EmpTLSCertificateRejectReason reason; GError *error = NULL; EmpathyTLSCertificate *certificate = NULL; @@ -170,7 +169,7 @@ verifier_verify_cb (GObject *source, "certificate", &certificate, NULL); - res = empathy_tls_verifier_verify_finish (EMPATHY_TLS_VERIFIER (source), + empathy_tls_verifier_verify_finish (EMPATHY_TLS_VERIFIER (source), result, &reason, &details, &error); if (error != NULL) diff --git a/src/empathy-chat-manager.c b/src/empathy-chat-manager.c index 6c92c25cb..a90c2d08c 100644 --- a/src/empathy-chat-manager.c +++ b/src/empathy-chat-manager.c @@ -32,7 +32,7 @@ enum { CLOSED_CHATS_CHANGED, - HANDLED_CHATS_CHANGED, + DISPLAYED_CHATS_CHANGED, LAST_SIGNAL }; @@ -49,7 +49,7 @@ struct _EmpathyChatManagerPriv /* Queue of (ChatData *) representing the closed chats */ GQueue *closed_queue; - guint num_handled_channels; + guint num_displayed_chat; TpBaseClient *handler; }; @@ -100,18 +100,36 @@ chat_data_free (ChatData *data) } static void +chat_destroyed_cb (gpointer data, + GObject *object) +{ + EmpathyChatManager *self = data; + EmpathyChatManagerPriv *priv = GET_PRIV (self); + + priv->num_displayed_chat--; + + DEBUG ("Chat destroyed; we are now displaying %u chats", + priv->num_displayed_chat); + + g_signal_emit (self, signals[DISPLAYED_CHATS_CHANGED], 0, + priv->num_displayed_chat); +} + +static void process_tp_chat (EmpathyChatManager *self, EmpathyTpChat *tp_chat, TpAccount *account, gint64 user_action_time) { + EmpathyChatManagerPriv *priv = GET_PRIV (self); EmpathyChat *chat = NULL; const gchar *id; id = empathy_tp_chat_get_id (tp_chat); if (!tp_str_empty (id)) { - chat = empathy_chat_window_find_chat (account, id); + chat = empathy_chat_window_find_chat (account, id, + empathy_tp_chat_is_sms_channel (tp_chat)); } if (chat != NULL) @@ -124,6 +142,16 @@ process_tp_chat (EmpathyChatManager *self, /* empathy_chat_new returns a floating reference as EmpathyChat is * a GtkWidget. This reference will be taken by a container * (a GtkNotebook) when we'll call empathy_chat_window_present_chat */ + + priv->num_displayed_chat++; + + DEBUG ("Chat displayed; we are now displaying %u chat", + priv->num_displayed_chat); + + g_signal_emit (self, signals[DISPLAYED_CHATS_CHANGED], 0, + priv->num_displayed_chat); + + g_object_weak_ref ((GObject *) chat, chat_destroyed_cb, self); } empathy_chat_window_present_chat (chat, user_action_time); @@ -191,24 +219,6 @@ tp_chat_ready_cb (GObject *object, } static void -channel_invalidated (TpChannel *channel, - guint domain, - gint code, - gchar *message, - EmpathyChatManager *self) -{ - EmpathyChatManagerPriv *priv = GET_PRIV (self); - - priv->num_handled_channels--; - - DEBUG ("Channel closed; we are now handling %u text channels", - priv->num_handled_channels); - - g_signal_emit (self, signals[HANDLED_CHATS_CHANGED], 0, - priv->num_handled_channels); -} - -static void handle_channels (TpSimpleHandler *handler, TpAccount *account, TpConnection *connection, @@ -219,9 +229,7 @@ handle_channels (TpSimpleHandler *handler, gpointer user_data) { EmpathyChatManager *self = (EmpathyChatManager *) user_data; - EmpathyChatManagerPriv *priv = GET_PRIV (self); GList *l; - gboolean handling = FALSE; for (l = channels; l != NULL; l = g_list_next (l)) { @@ -238,7 +246,7 @@ handle_channels (TpSimpleHandler *handler, continue; } - handling = TRUE; + DEBUG ("Now handling channel %s", tp_proxy_get_object_path (channel)); tp_chat = empathy_tp_chat_new (account, channel); @@ -254,23 +262,9 @@ handle_channels (TpSimpleHandler *handler, ctx->sig_id = g_signal_connect (tp_chat, "notify::ready", G_CALLBACK (tp_chat_ready_cb), ctx); } - - priv->num_handled_channels++; - - g_signal_connect (channel, "invalidated", - G_CALLBACK (channel_invalidated), self); } tp_handle_channels_context_accept (context); - - if (handling) - { - DEBUG ("Channels handled; we are now handling %u text channels", - priv->num_handled_channels); - - g_signal_emit (self, signals[HANDLED_CHATS_CHANGED], 0, - priv->num_handled_channels); - } } static void @@ -387,8 +381,8 @@ empathy_chat_manager_class_init ( G_TYPE_NONE, 1, G_TYPE_UINT, NULL); - signals[HANDLED_CHATS_CHANGED] = - g_signal_new ("handled-chats-changed", + signals[DISPLAYED_CHATS_CHANGED] = + g_signal_new ("displayed-chats-changed", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, 0, @@ -459,11 +453,3 @@ empathy_chat_manager_get_num_closed_chats (EmpathyChatManager *self) return g_queue_get_length (priv->closed_queue); } - -guint -empathy_chat_manager_get_num_handled_chats (EmpathyChatManager *self) -{ - EmpathyChatManagerPriv *priv = GET_PRIV (self); - - return priv->num_handled_channels; -} diff --git a/src/empathy-chat-manager.h b/src/empathy-chat-manager.h index ee43857f4..6d249b3e4 100644 --- a/src/empathy-chat-manager.h +++ b/src/empathy-chat-manager.h @@ -65,8 +65,6 @@ void empathy_chat_manager_closed_chat (EmpathyChatManager *self, void empathy_chat_manager_undo_closed_chat (EmpathyChatManager *self); guint empathy_chat_manager_get_num_closed_chats (EmpathyChatManager *self); -guint empathy_chat_manager_get_num_handled_chats (EmpathyChatManager *self); - G_END_DECLS #endif /* #ifndef __EMPATHY_CHAT_MANAGER_H__*/ diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 61a1c5d47..93d9df8d7 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -259,7 +259,6 @@ chat_window_create_label (EmpathyChatWindow *window, EmpathyChat *chat, gboolean is_tab_label) { - EmpathyChatWindowPriv *priv; GtkWidget *hbox; GtkWidget *name_label; GtkWidget *status_image; @@ -268,8 +267,6 @@ chat_window_create_label (EmpathyChatWindow *window, PangoAttrList *attr_list; PangoAttribute *attr; - priv = GET_PRIV (window); - /* The spacing between the button and the label. */ hbox = gtk_hbox_new (FALSE, 0); @@ -314,6 +311,15 @@ chat_window_create_label (EmpathyChatWindow *window, if (is_tab_label) { GtkWidget *close_button; + GtkWidget *sending_spinner; + + sending_spinner = gtk_spinner_new (); + + gtk_box_pack_start (GTK_BOX (hbox), sending_spinner, + FALSE, FALSE, 0); + g_object_set_data (G_OBJECT (chat), + "chat-window-tab-sending-spinner", + sending_spinner); close_button = gedit_close_button_new (); g_object_set_data (G_OBJECT (chat), "chat-window-tab-close-button", close_button); @@ -453,14 +459,14 @@ get_all_unread_messages (EmpathyChatWindowPriv *priv) static gchar * get_window_title_name (EmpathyChatWindowPriv *priv) { - const gchar *active_name; + gchar *active_name, *ret; guint nb_chats; guint current_unread_msgs; nb_chats = g_list_length (priv->chats); g_assert (nb_chats > 0); - active_name = empathy_chat_get_name (priv->current_chat); + active_name = empathy_chat_dup_name (priv->current_chat); current_unread_msgs = empathy_chat_get_nb_unread_messages ( priv->current_chat); @@ -468,9 +474,9 @@ get_window_title_name (EmpathyChatWindowPriv *priv) if (nb_chats == 1) { /* only one tab */ if (current_unread_msgs == 0) - return g_strdup (active_name); + ret = g_strdup (active_name); else - return g_strdup_printf (ngettext ( + ret = g_strdup_printf (ngettext ( "%s (%d unread)", "%s (%d unread)", current_unread_msgs), active_name, current_unread_msgs); @@ -482,7 +488,7 @@ get_window_title_name (EmpathyChatWindowPriv *priv) if (all_unread_msgs == 0) { /* no unread message */ - return g_strdup_printf (ngettext ( + ret = g_strdup_printf (ngettext ( "%s (and %u other)", "%s (and %u others)", nb_others), active_name, nb_others); @@ -490,7 +496,7 @@ get_window_title_name (EmpathyChatWindowPriv *priv) else if (all_unread_msgs == current_unread_msgs) { /* unread messages are in the current tab */ - return g_strdup_printf (ngettext ( + ret = g_strdup_printf (ngettext ( "%s (%d unread)", "%s (%d unread)", current_unread_msgs), active_name, current_unread_msgs); @@ -498,7 +504,7 @@ get_window_title_name (EmpathyChatWindowPriv *priv) else if (current_unread_msgs == 0) { /* unread messages are in other tabs */ - return g_strdup_printf (ngettext ( + ret = g_strdup_printf (ngettext ( "%s (%d unread from others)", "%s (%d unread from others)", all_unread_msgs), @@ -507,13 +513,17 @@ get_window_title_name (EmpathyChatWindowPriv *priv) else { /* unread messages are in all the tabs */ - return g_strdup_printf (ngettext ( + ret = g_strdup_printf (ngettext ( "%s (%d unread from all)", "%s (%d unread from all)", all_unread_msgs), active_name, all_unread_msgs); } } + + g_free (active_name); + + return ret; } static void @@ -637,7 +647,7 @@ chat_window_update_chat_tab_full (EmpathyChat *chat, EmpathyChatWindow *window; EmpathyChatWindowPriv *priv; EmpathyContact *remote_contact; - const gchar *name; + gchar *name; const gchar *id; TpAccount *account; const gchar *subject; @@ -648,6 +658,8 @@ chat_window_update_chat_tab_full (EmpathyChat *chat, const gchar *icon_name; GtkWidget *tab_image; GtkWidget *menu_image; + GtkWidget *sending_spinner; + guint nb_sending; window = chat_window_find_chat (chat); if (!window) { @@ -656,7 +668,7 @@ chat_window_update_chat_tab_full (EmpathyChat *chat, priv = GET_PRIV (window); /* Get information */ - name = empathy_chat_get_name (chat); + name = empathy_chat_dup_name (chat); account = empathy_chat_get_account (chat); subject = empathy_chat_get_subject (chat); remote_contact = empathy_chat_get_remote_contact (chat); @@ -675,6 +687,9 @@ chat_window_update_chat_tab_full (EmpathyChat *chat, else if (remote_contact && empathy_chat_is_composing (chat)) { icon_name = EMPATHY_IMAGE_TYPING; } + else if (empathy_chat_is_sms_channel (chat)) { + icon_name = EMPATHY_IMAGE_SMS; + } else if (remote_contact) { icon_name = empathy_icon_name_for_contact (remote_contact); } else { @@ -693,6 +708,16 @@ chat_window_update_chat_tab_full (EmpathyChat *chat, gtk_widget_hide (menu_image); } + /* Update the sending spinner */ + nb_sending = empathy_chat_get_n_messages_sending (chat); + sending_spinner = g_object_get_data (G_OBJECT (chat), + "chat-window-tab-sending-spinner"); + + g_object_set (sending_spinner, + "active", nb_sending > 0, + "visible", nb_sending > 0, + NULL); + /* Update tab tooltip */ tooltip = g_string_new (NULL); @@ -703,11 +728,29 @@ chat_window_update_chat_tab_full (EmpathyChat *chat, id = name; } + if (empathy_chat_is_sms_channel (chat)) { + append_markup_printf (tooltip, "%s ", _("SMS:")); + } + append_markup_printf (tooltip, "<b>%s</b><small> (%s)</small>", id, tp_account_get_display_name (account)); + if (nb_sending > 0) { + char *tmp = g_strdup_printf ( + ngettext ("Sending %d message", + "Sending %d messages", + nb_sending), + nb_sending); + + g_string_append (tooltip, "\n"); + g_string_append (tooltip, tmp); + + gtk_widget_set_tooltip_text (sending_spinner, tmp); + g_free (tmp); + } + if (!EMP_STR_EMPTY (status)) { append_markup_printf (tooltip, "\n<i>%s</i>", status); } @@ -738,6 +781,8 @@ chat_window_update_chat_tab_full (EmpathyChat *chat, if (priv->current_chat == chat) { chat_window_update (window, update_contact_menu); } + + g_free (name); } static void @@ -865,21 +910,24 @@ chat_window_favorite_toggled_cb (GtkToggleAction *toggle_action, EmpathyChatWindowPriv *priv = GET_PRIV (window); gboolean active; TpAccount *account; + gchar *name; const gchar *room; EmpathyChatroom *chatroom; active = gtk_toggle_action_get_active (toggle_action); account = empathy_chat_get_account (priv->current_chat); room = empathy_chat_get_id (priv->current_chat); + name = empathy_chat_dup_name (priv->current_chat); chatroom = empathy_chatroom_manager_ensure_chatroom ( priv->chatroom_manager, account, room, - empathy_chat_get_name (priv->current_chat)); + name); empathy_chatroom_set_favorite (chatroom, active); g_object_unref (chatroom); + g_free (name); } static void @@ -889,21 +937,24 @@ chat_window_always_urgent_toggled_cb (GtkToggleAction *toggle_action, EmpathyChatWindowPriv *priv = GET_PRIV (window); gboolean active; TpAccount *account; + gchar *name; const gchar *room; EmpathyChatroom *chatroom; active = gtk_toggle_action_get_active (toggle_action); account = empathy_chat_get_account (priv->current_chat); room = empathy_chat_get_id (priv->current_chat); + name = empathy_chat_dup_name (priv->current_chat); chatroom = empathy_chatroom_manager_ensure_chatroom ( priv->chatroom_manager, account, room, - empathy_chat_get_name (priv->current_chat)); + name); empathy_chatroom_set_always_urgent (chatroom, active); g_object_unref (chatroom); + g_free (name); } static void @@ -1086,7 +1137,6 @@ chat_window_tabs_next_activate_cb (GtkAction *action, EmpathyChatWindow *window) { EmpathyChatWindowPriv *priv; - EmpathyChat *chat; gint index_, numPages; gboolean wrap_around; @@ -1095,7 +1145,6 @@ chat_window_tabs_next_activate_cb (GtkAction *action, g_object_get (gtk_settings_get_default (), "gtk-keynav-wrap-around", &wrap_around, NULL); - chat = priv->current_chat; index_ = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook)); numPages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (priv->notebook)); @@ -1112,7 +1161,6 @@ chat_window_tabs_previous_activate_cb (GtkAction *action, EmpathyChatWindow *window) { EmpathyChatWindowPriv *priv; - EmpathyChat *chat; gint index_, numPages; gboolean wrap_around; @@ -1121,7 +1169,6 @@ chat_window_tabs_previous_activate_cb (GtkAction *action, g_object_get (gtk_settings_get_default (), "gtk-keynav-wrap-around", &wrap_around, NULL); - chat = priv->current_chat; index_ = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook)); numPages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (priv->notebook)); @@ -1335,8 +1382,9 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window, G_CALLBACK (chat_window_notification_closed_cb), window, 0); if (has_x_canonical_append) { + /* We have to set a not empty string to keep libnotify happy */ notify_notification_set_hint_string (notification, - EMPATHY_NOTIFY_MANAGER_CAP_X_CANONICAL_APPEND, ""); + EMPATHY_NOTIFY_MANAGER_CAP_X_CANONICAL_APPEND, "1"); } } @@ -1356,15 +1404,16 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window, static void chat_window_set_highlight_room_labels (EmpathyChat *chat) { - gchar *markup; + gchar *markup, *name; GtkWidget *widget; if (!empathy_chat_is_room (chat)) return; + name = empathy_chat_dup_name (chat); markup = g_markup_printf_escaped ( "<span color=\"red\" weight=\"bold\">%s</span>", - empathy_chat_get_name (chat)); + name); widget = g_object_get_data (G_OBJECT (chat), "chat-window-tab-label"); gtk_label_set_markup (GTK_LABEL (widget), markup); @@ -1372,6 +1421,7 @@ chat_window_set_highlight_room_labels (EmpathyChat *chat) widget = g_object_get_data (G_OBJECT (chat), "chat-window-menu-label"); gtk_label_set_markup (GTK_LABEL (widget), markup); + g_free (name); g_free (markup); } @@ -1810,7 +1860,7 @@ chat_window_drag_data_received (GtkWidget *widget, account = tp_account_manager_ensure_account (account_manager, account_id); if (account != NULL) - chat = empathy_chat_window_find_chat (account, contact_id); + chat = empathy_chat_window_find_chat (account, contact_id, FALSE); } if (account == NULL) { @@ -1821,7 +1871,7 @@ chat_window_drag_data_received (GtkWidget *widget, if (!chat) { empathy_chat_with_contact_id ( - account, contact_id, gtk_get_current_event_time ()); + account, contact_id, empathy_get_current_action_time ()); g_strfreev (strv); return; @@ -2176,13 +2226,11 @@ empathy_chat_window_get_default (gboolean room) } for (l = chat_windows; l; l = l->next) { - EmpathyChatWindowPriv *priv; EmpathyChatWindow *chat_window; GtkWidget *dialog; guint nb_rooms, nb_private; chat_window = l->data; - priv = GET_PRIV (chat_window); dialog = empathy_chat_window_get_dialog (chat_window); @@ -2272,6 +2320,12 @@ empathy_chat_window_add_chat (EmpathyChatWindow *window, g_signal_connect (chat, "notify::remote-contact", G_CALLBACK (chat_window_chat_notify_cb), NULL); + g_signal_connect (chat, "notify::sms-channel", + G_CALLBACK (chat_window_chat_notify_cb), + NULL); + g_signal_connect (chat, "notify::n-messages-sending", + G_CALLBACK (chat_window_chat_notify_cb), + NULL); chat_window_chat_notify_cb (chat); gtk_notebook_append_page_menu (GTK_NOTEBOOK (priv->notebook), child, label, popup_label); @@ -2375,7 +2429,8 @@ empathy_chat_window_switch_to_chat (EmpathyChatWindow *window, EmpathyChat * empathy_chat_window_find_chat (TpAccount *account, - const gchar *id) + const gchar *id, + gboolean sms_channel) { GList *l; @@ -2395,7 +2450,8 @@ empathy_chat_window_find_chat (TpAccount *account, chat = ll->data; if (account == empathy_chat_get_account (chat) && - !tp_strdiff (id, empathy_chat_get_id (chat))) { + !tp_strdiff (id, empathy_chat_get_id (chat)) && + sms_channel == empathy_chat_is_sms_channel (chat)) { return chat; } } @@ -2421,6 +2477,11 @@ empathy_chat_window_present_chat (EmpathyChat *chat, window = empathy_chat_window_get_default (empathy_chat_is_room (chat)); if (!window) { window = empathy_chat_window_new (); + + /* we want to display the newly created window even if we don't present + * it */ + priv = GET_PRIV (window); + gtk_widget_show (priv->dialog); } empathy_chat_window_add_chat (window, chat); diff --git a/src/empathy-chat-window.h b/src/empathy-chat-window.h index 5477479ac..2112b6647 100644 --- a/src/empathy-chat-window.h +++ b/src/empathy-chat-window.h @@ -59,7 +59,8 @@ struct _EmpathyChatWindowClass { GType empathy_chat_window_get_type (void); EmpathyChat * empathy_chat_window_find_chat (TpAccount *account, - const gchar *id); + const gchar *id, + gboolean sms_channel); void empathy_chat_window_present_chat (EmpathyChat *chat, gint64 timestamp); diff --git a/src/empathy-chat.c b/src/empathy-chat.c index 73d8ce87c..43ab00270 100644 --- a/src/empathy-chat.c +++ b/src/empathy-chat.c @@ -52,7 +52,7 @@ static gboolean use_timer = TRUE; static EmpathyChatManager *chat_mgr = NULL; static void -handled_chats_changed_cb (EmpathyChatManager *mgr, +displayed_chats_changed_cb (EmpathyChatManager *mgr, guint nb_chats, gpointer user_data) { @@ -81,8 +81,8 @@ activate_cb (GApplication *application) g_assert (chat_mgr == NULL); chat_mgr = empathy_chat_manager_dup_singleton (); - g_signal_connect (chat_mgr, "handled-chats-changed", - G_CALLBACK (handled_chats_changed_cb), GUINT_TO_POINTER (1)); + g_signal_connect (chat_mgr, "displayed-chats-changed", + G_CALLBACK (displayed_chats_changed_cb), GUINT_TO_POINTER (1)); } int diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index 6125ec895..00d2c8ab8 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -43,6 +43,7 @@ #include <libempathy-gtk/empathy-images.h> #include <libempathy-gtk/empathy-contact-dialogs.h> #include <libempathy-gtk/empathy-sound-manager.h> +#include <libempathy-gtk/empathy-ui-utils.h> #include "empathy-event-manager.h" #include "empathy-main-window.h" @@ -316,7 +317,7 @@ event_manager_approval_approve (EventManagerApproval *approval) } else { - timestamp = tp_user_action_time_from_x11 (gtk_get_current_event_time ()); + timestamp = empathy_get_current_action_time (); } g_assert (approval->operation != NULL); @@ -335,9 +336,6 @@ static void event_text_channel_process_func (EventPriv *event) { EmpathyTpChat *tp_chat; - gint64 timestamp; - - timestamp = tp_user_action_time_from_x11 (gtk_get_current_event_time ()); if (event->approval->handler != 0) { @@ -566,7 +564,6 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat, EmpathyContact *sender; const gchar *header; const gchar *msg; - TpChannel *channel; EventPriv *event; EmpathyEventManagerPriv *priv = GET_PRIV (approval->manager); @@ -583,8 +580,6 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat, header = empathy_contact_get_alias (sender); msg = empathy_message_get_body (message); - channel = empathy_tp_chat_get_channel (tp_chat); - if (event != NULL) event_update (approval->manager, event, EMPATHY_IMAGE_NEW_MESSAGE, header, msg); @@ -703,13 +698,9 @@ invite_dialog_response_cb (GtkDialog *dialog, gint response, EventManagerApproval *approval) { - EmpathyTpChat *tp_chat; - gtk_widget_destroy (GTK_WIDGET (approval->dialog)); approval->dialog = NULL; - tp_chat = EMPATHY_TP_CHAT (approval->handler_instance); - if (response != GTK_RESPONSE_OK) { /* close channel */ diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c index edb470cbb..e23b0b45a 100644 --- a/src/empathy-ft-manager.c +++ b/src/empathy-ft-manager.c @@ -696,11 +696,8 @@ static void ft_manager_start_transfer (EmpathyFTManager *manager, EmpathyFTHandler *handler) { - EmpathyFTManagerPriv *priv; gboolean is_outgoing; - priv = GET_PRIV (manager); - is_outgoing = !empathy_ft_handler_is_incoming (handler); DEBUG ("Start transfer, is outgoing %s", diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index b4c1254df..0ac08c856 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -145,6 +145,10 @@ struct _EmpathyMainWindowPriv { GtkWidget *edit_context; GtkWidget *edit_context_separator; + GtkActionGroup *balance_action_group; + GtkAction *view_balance_show_in_roster; + GtkWidget *balance_vbox; + guint size_timeout_id; /* reffed TpAccount* => visible GtkInfoBar* */ @@ -220,6 +224,8 @@ main_window_flash_foreach (GtkTreeModel *model, pixbuf = empathy_individual_store_get_individual_status_icon ( GET_PRIV (data->window)->individual_store, individual); + if (pixbuf != NULL) + g_object_ref (pixbuf); } gtk_tree_store_set (GTK_TREE_STORE (model), iter, @@ -240,6 +246,7 @@ main_window_flash_foreach (GtkTreeModel *model, g_object_unref (individual); tp_clear_object (&contact); + tp_clear_object (&pixbuf); return FALSE; } @@ -780,6 +787,294 @@ main_window_update_status (EmpathyMainWindow *window) g_list_free (children); } +static char * +main_window_account_to_action_name (TpAccount *account) +{ + char *r; + + /* action names can't have '/' in them, replace it with '.' */ + r = g_strdup (tp_account_get_path_suffix (account)); + r = g_strdelimit (r, "/", '.'); + + return r; +} + +static void +main_window_balance_activate_cb (GtkAction *action, + EmpathyMainWindow *window) +{ + const char *uri; + + uri = g_object_get_data (G_OBJECT (action), "manage-credit-uri"); + + if (!tp_str_empty (uri)) { + DEBUG ("Top-up credit URI: %s", uri); + empathy_url_show (GTK_WIDGET (window), uri); + } else { + DEBUG ("unknown protocol for top-up"); + } +} + +static void +main_window_balance_update_balance (GtkAction *action, + GValueArray *balance) +{ + TpAccount *account = g_object_get_data (G_OBJECT (action), "account"); + GtkWidget *label; + int amount = 0; + guint scale = G_MAXINT32; + const char *currency = ""; + char *money, *str; + + if (balance != NULL) + tp_value_array_unpack (balance, 3, + &amount, + &scale, + ¤cy); + + if (amount == 0 && + scale == G_MAXINT32 && + tp_str_empty (currency)) { + /* unknown balance */ + money = g_strdup ("--"); + } else { + char *tmp = empathy_format_currency (amount, scale, currency); + + money = g_strdup_printf ("%s %s", currency, tmp); + g_free (tmp); + } + + /* Translators: this string will be something like: + * Top up My Account ($1.23)..." */ + str = g_strdup_printf (_("Top up %s (%s)..."), + tp_account_get_display_name (account), + money); + + gtk_action_set_label (action, str); + g_free (str); + + /* update the money label in the roster */ + label = g_object_get_data (G_OBJECT (action), "money-label"); + + gtk_label_set_text (GTK_LABEL (label), money); + g_free (money); +} + +static void +main_window_setup_balance_got_balance_props (TpProxy *conn, + GHashTable *props, + const GError *in_error, + gpointer user_data, + GObject *action) +{ + GValueArray *balance = NULL; + const char *uri; + + if (in_error != NULL) { + DEBUG ("Failed to get account balance properties: %s", + in_error->message); + goto finally; + } + + balance = tp_asv_get_boxed (props, "AccountBalance", + TP_STRUCT_TYPE_CURRENCY_AMOUNT); + uri = tp_asv_get_string (props, "ManageCreditURI"); + + g_object_set_data_full (action, "manage-credit-uri", + g_strdup (uri), g_free); + gtk_action_set_sensitive (GTK_ACTION (action), !tp_str_empty (uri)); + +finally: + main_window_balance_update_balance (GTK_ACTION (action), balance); +} + +static void +main_window_balance_changed_cb (TpConnection *conn, + const GValueArray *balance, + gpointer user_data, + GObject *action) +{ + main_window_balance_update_balance (GTK_ACTION (action), + (GValueArray *) balance); +} + +static GtkAction * +main_window_setup_balance_create_action (EmpathyMainWindow *window, + TpAccount *account) +{ + EmpathyMainWindowPriv *priv = GET_PRIV (window); + GtkAction *action; + char *name, *ui; + guint merge_id; + GError *error = NULL; + + /* create the action group if required */ + if (priv->balance_action_group == NULL) { + priv->balance_action_group = + gtk_action_group_new ("balance-action-group"); + + gtk_ui_manager_insert_action_group (priv->ui_manager, + priv->balance_action_group, -1); + } + + /* create the action */ + name = main_window_account_to_action_name (account); + action = gtk_action_new (name, + tp_account_get_display_name (account), + _("Top up account credit"), + NULL); + g_object_bind_property (account, "icon-name", action, "icon-name", + G_BINDING_SYNC_CREATE); + + g_object_set_data (G_OBJECT (action), "account", account); + g_signal_connect (action, "activate", + G_CALLBACK (main_window_balance_activate_cb), window); + + gtk_action_group_add_action (priv->balance_action_group, action); + g_object_unref (action); + + ui = g_strdup_printf ( + "<ui>" + " <menubar name='menubar'>" + " <menu action='view'>" + " <placeholder name='view_balance_placeholder'>" + " <menuitem action='%s'/>" + " </placeholder>" + " </menu>" + " </menubar>" + "</ui>", + name); + + merge_id = gtk_ui_manager_add_ui_from_string (priv->ui_manager, + ui, -1, &error); + if (error != NULL) { + DEBUG ("Failed to add balance UI for %s: %s", + tp_account_get_display_name (account), + error->message); + g_error_free (error); + } + + g_object_set_data (G_OBJECT (action), + "merge-id", GUINT_TO_POINTER (merge_id)); + + g_free (name); + g_free (ui); + + return action; +} + +static GtkWidget * +main_window_setup_balance_create_widget (EmpathyMainWindow *window, + GtkAction *action) +{ + EmpathyMainWindowPriv *priv = GET_PRIV (window); + TpAccount *account; + GtkWidget *hbox, *image, *label, *button; + + account = g_object_get_data (G_OBJECT (action), "account"); + g_return_val_if_fail (TP_IS_ACCOUNT (account), NULL); + + hbox = gtk_hbox_new (FALSE, 6); + + /* protocol icon */ + image = gtk_image_new (); + gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, TRUE, 0); + g_object_bind_property (action, "icon-name", image, "icon-name", + G_BINDING_SYNC_CREATE); + + /* account name label */ + label = gtk_label_new (""); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); + g_object_bind_property (account, "display-name", label, "label", + G_BINDING_SYNC_CREATE); + + /* balance label */ + label = gtk_label_new (""); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0); + g_object_set_data (G_OBJECT (action), "money-label", label); + + /* top up button */ + button = gtk_button_new_with_label (_("Top Up...")); + gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, TRUE, 0); + g_signal_connect_swapped (button, "clicked", + G_CALLBACK (gtk_action_activate), action); + + gtk_box_pack_start (GTK_BOX (priv->balance_vbox), hbox, FALSE, TRUE, 0); + gtk_widget_show_all (hbox); + + /* tie the lifetime of the widget to the lifetime of the action */ + g_object_weak_ref (G_OBJECT (action), + (GWeakNotify) gtk_widget_destroy, hbox); + + return hbox; +} + +static void +main_window_setup_balance_conn_ready (GObject *conn, + GAsyncResult *result, + gpointer user_data) +{ + EmpathyMainWindow *window = user_data; + EmpathyMainWindowPriv *priv = GET_PRIV (window); + TpAccount *account = g_object_get_data (conn, "account"); + GtkAction *action; + GError *error = NULL; + + if (!tp_proxy_prepare_finish (conn, result, &error)) { + DEBUG ("Failed to prepare connection: %s", error->message); + + g_error_free (error); + return; + } + + if (!tp_proxy_has_interface_by_id (conn, + TP_IFACE_QUARK_CONNECTION_INTERFACE_BALANCE)) { + return; + } + + DEBUG ("Setting up balance for acct: %s", + tp_account_get_display_name (account)); + + /* create the action */ + action = main_window_setup_balance_create_action (window, account); + + if (action == NULL) + return; + + gtk_action_set_visible (priv->view_balance_show_in_roster, TRUE); + + /* create the display widget */ + main_window_setup_balance_create_widget (window, action); + + /* request the current balance and monitor for any changes */ + tp_cli_dbus_properties_call_get_all (conn, -1, + TP_IFACE_CONNECTION_INTERFACE_BALANCE, + main_window_setup_balance_got_balance_props, + window, NULL, G_OBJECT (action)); + + tp_cli_connection_interface_balance_connect_to_balance_changed ( + TP_CONNECTION (conn), main_window_balance_changed_cb, + window, NULL, G_OBJECT (action), NULL); +} + +static void +main_window_setup_balance (EmpathyMainWindow *window, + TpAccount *account) +{ + TpConnection *conn = tp_account_get_connection (account); + + if (conn == NULL) + return; + + /* need to prepare the connection: + * store the account on the connection */ + g_object_set_data (G_OBJECT (conn), "account", account); + tp_proxy_prepare_async (conn, NULL, + main_window_setup_balance_conn_ready, window); +} + static void main_window_connection_changed_cb (TpAccount *account, guint old_status, @@ -801,6 +1096,44 @@ main_window_connection_changed_cb (TpAccount *account, if (current == TP_CONNECTION_STATUS_DISCONNECTED) { empathy_sound_manager_play (priv->sound_mgr, GTK_WIDGET (window), EMPATHY_SOUND_ACCOUNT_DISCONNECTED); + + /* remove balance action if required */ + if (priv->balance_action_group != NULL) { + GtkAction *action; + char *name; + GList *a; + + name = main_window_account_to_action_name (account); + + action = gtk_action_group_get_action ( + priv->balance_action_group, name); + + if (action != NULL) { + guint merge_id; + + DEBUG ("Removing action"); + + merge_id = GPOINTER_TO_UINT (g_object_get_data ( + G_OBJECT (action), + "merge-id")); + + gtk_ui_manager_remove_ui (priv->ui_manager, + merge_id); + gtk_action_group_remove_action ( + priv->balance_action_group, action); + } + + g_free (name); + + a = gtk_action_group_list_actions ( + priv->balance_action_group); + + gtk_action_set_visible ( + priv->view_balance_show_in_roster, + g_list_length (a) > 0); + + g_list_free (a); + } } if (current == TP_CONNECTION_STATUS_CONNECTED) { @@ -809,6 +1142,7 @@ main_window_connection_changed_cb (TpAccount *account, /* Account connected without error, remove error message if any */ main_window_remove_error (window, account); + main_window_setup_balance (window, account); } } @@ -1250,7 +1584,7 @@ main_window_favorite_chatroom_join (EmpathyChatroom *chatroom) join_fav_account_sig_ctx *ctx; ctx = join_fav_account_sig_ctx_new (account, chatroom, - gtk_get_current_event_time ()); + empathy_get_current_action_time ()); ctx->sig_id = g_signal_connect_data (account, "status-changed", G_CALLBACK (account_status_changed_cb), ctx, @@ -1261,7 +1595,7 @@ main_window_favorite_chatroom_join (EmpathyChatroom *chatroom) return; } - join_chatroom (chatroom, gtk_get_current_event_time ()); + join_chatroom (chatroom, empathy_get_current_action_time ()); } static void @@ -1674,6 +2008,8 @@ account_manager_prepared_cb (GObject *source_object, window); g_hash_table_insert (priv->status_changed_handlers, account, GUINT_TO_POINTER (handler_id)); + + main_window_setup_balance (window, account); } g_signal_connect (manager, "account-validity-changed", @@ -1770,6 +2106,7 @@ empathy_main_window_init (EmpathyMainWindow *window) filename = empathy_file_lookup ("empathy-main-window.ui", "src"); gui = empathy_builder_get_file (filename, "main_vbox", &priv->main_vbox, + "balance_vbox", &priv->balance_vbox, "errors_vbox", &priv->errors_vbox, "auth_vbox", &priv->auth_vbox, "ui_manager", &priv->ui_manager, @@ -1787,6 +2124,7 @@ empathy_main_window_init (EmpathyMainWindow *window) "notebook", &priv->notebook, "no_entry_label", &priv->no_entry_label, "roster_scrolledwindow", &sw, + "view_balance_show_in_roster", &priv->view_balance_show_in_roster, NULL); g_free (filename); @@ -1947,6 +2285,14 @@ empathy_main_window_init (EmpathyMainWindow *window) /* Set window size. */ empathy_geometry_bind (GTK_WINDOW (window), GEOMETRY_NAME); + /* bind view_balance_show_in_roster */ + g_settings_bind (priv->gsettings_ui, "show-balance-in-roster", + priv->view_balance_show_in_roster, "active", + G_SETTINGS_BIND_DEFAULT); + g_object_bind_property (priv->view_balance_show_in_roster, "active", + priv->balance_vbox, "visible", + G_BINDING_SYNC_CREATE); + /* Enable event handling */ priv->call_observer = empathy_call_observer_dup_singleton (); priv->event_manager = empathy_event_manager_dup_singleton (); diff --git a/src/empathy-main-window.ui b/src/empathy-main-window.ui index 864be1d28..b21a07bac 100644 --- a/src/empathy-main-window.ui +++ b/src/empathy-main-window.ui @@ -70,6 +70,13 @@ </object> </child> <child> + <object class="GtkToggleAction" id="view_balance_show_in_roster"> + <property name="name">view_balance_show_in_roster</property> + <property name="label" translatable="yes">Credit Balance</property> + <property name="visible">False</property> + </object> + </child> + <child> <object class="GtkAction" id="view_show_map"> <property name="name">view_show_map</property> <property name="label" translatable="yes">Contacts on a _Map</property> @@ -265,6 +272,9 @@ <menuitem action="view_show_offline"/> <menuitem action="view_show_protocols"/> <separator/> + <menuitem action="view_balance_show_in_roster"/> + <placeholder name="view_balance_placeholder"/> + <separator/> <menuitem action="view_sort_by_name"/> <menuitem action="view_sort_by_status"/> <separator/> @@ -317,7 +327,8 @@ </packing> </child> <child> - <object class="GtkVBox" id="errors_vbox"> + <object class="GtkVBox" id="balance_vbox"> + <property name="spacing">3</property> <child> <placeholder/> </child> @@ -329,7 +340,7 @@ </packing> </child> <child> - <object class="GtkVBox" id="auth_vbox"> + <object class="GtkVBox" id="errors_vbox"> <child> <placeholder/> </child> @@ -341,6 +352,18 @@ </packing> </child> <child> + <object class="GtkVBox" id="auth_vbox"> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">4</property> + </packing> + </child> + <child> <object class="GtkNotebook" id="notebook"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -372,7 +395,7 @@ </child> </object> <packing> - <property name="position">4</property> + <property name="position">5</property> </packing> </child> </object> diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c index f27e8de03..a09a5f710 100644 --- a/src/empathy-new-chatroom-dialog.c +++ b/src/empathy-new-chatroom-dialog.c @@ -386,11 +386,8 @@ out: static void new_chatroom_dialog_update_widgets (EmpathyNewChatroomDialog *dialog) { - EmpathyAccountChooser *account_chooser; const gchar *protocol; - account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser); - if (dialog->account == NULL) return; @@ -535,8 +532,6 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist *room_list, EmpathyChatroom *chatroom, EmpathyNewChatroomDialog *dialog) { - GtkTreeView *view; - GtkTreeSelection *selection; GtkListStore *store; GtkTreeIter iter; gchar *members; @@ -550,8 +545,6 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist *room_list, empathy_chatroom_get_room (chatroom)); /* Add to model */ - view = GTK_TREE_VIEW (dialog->treeview); - selection = gtk_tree_view_get_selection (view); store = GTK_LIST_STORE (dialog->model); members = g_strdup_printf ("%d", empathy_chatroom_get_members_count (chatroom)); tmp = g_strdup_printf ("<b>%s</b>", empathy_chatroom_get_name (chatroom)); @@ -690,8 +683,8 @@ new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog) g_strstrip (room_name); DEBUG ("Requesting channel for '%s'", room_name); - empathy_join_muc (account, room_name, - gtk_get_current_event_time ()); + + empathy_join_muc (account, room_name, empathy_get_current_action_time ()); g_free (room_name); } diff --git a/src/empathy-notifications-approver.c b/src/empathy-notifications-approver.c index a87a6d30e..af6c139d2 100644 --- a/src/empathy-notifications-approver.c +++ b/src/empathy-notifications-approver.c @@ -219,6 +219,9 @@ add_notification_actions (EmpathyNotificationsApprover *self, break; case EMPATHY_EVENT_TYPE_AUTH: + /* translators: the 'Provide' button is displayed in a notification + * bubble when Empathy is asking for an account password; clicking on it + * brings the password popup. */ notify_notification_add_action (notification, "provide", _("Provide"), (NotifyActionCallback) notification_approve_cb, self, NULL); @@ -335,8 +338,9 @@ update_notification (EmpathyNotificationsApprover *self) NOTIFY_EXPIRES_DEFAULT); if (has_x_canonical_append) + /* We have to set a not empty string to keep libnotify happy */ notify_notification_set_hint_string (notification, - EMPATHY_NOTIFY_MANAGER_CAP_X_CANONICAL_APPEND, ""); + EMPATHY_NOTIFY_MANAGER_CAP_X_CANONICAL_APPEND, "1"); if (empathy_notify_manager_has_capability (self->priv->notify_mgr, EMPATHY_NOTIFY_MANAGER_CAP_ACTIONS)) diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c index 813637dca..f90724c7f 100644 --- a/src/empathy-preferences.c +++ b/src/empathy-preferences.c @@ -48,6 +48,9 @@ #include "empathy-preferences.h" +#define DEBUG_FLAG EMPATHY_DEBUG_OTHER +#include <libempathy/empathy-debug.h> + G_DEFINE_TYPE (EmpathyPreferences, empathy_preferences, GTK_TYPE_DIALOG); #define GET_PRIV(self) ((EmpathyPreferencesPriv *)((EmpathyPreferences *) self)->priv) @@ -57,7 +60,6 @@ struct _EmpathyPreferencesPriv { GtkWidget *checkbutton_show_smileys; GtkWidget *checkbutton_show_contacts_in_rooms; - GtkWidget *combobox_chat_theme; GtkWidget *checkbutton_separate_chat_windows; GtkWidget *checkbutton_events_notif_area; GtkWidget *checkbutton_autoconnect; @@ -81,6 +83,12 @@ struct _EmpathyPreferencesPriv { GtkWidget *checkbutton_location_resource_cell; GtkWidget *checkbutton_location_resource_gps; + GtkWidget *vbox_chat_theme; + GtkWidget *combobox_chat_theme; + GtkWidget *sw_chat_theme_preview; + EmpathyChatView *chat_theme_preview; + EmpathyThemeManager *theme_manager; + GSettings *gsettings; GSettings *gsettings_chat; GSettings *gsettings_loc; @@ -115,11 +123,11 @@ enum { }; enum { - COL_COMBO_IS_ADIUM, - COL_COMBO_VISIBLE_NAME, - COL_COMBO_NAME, - COL_COMBO_PATH, - COL_COMBO_COUNT + COL_THEME_VISIBLE_NAME, + COL_THEME_NAME, + COL_THEME_IS_ADIUM, + COL_THEME_ADIUM_PATH, + COL_THEME_COUNT }; enum { @@ -312,7 +320,7 @@ preferences_sound_cell_toggled_cb (GtkCellRendererToggle *toggle, { EmpathyPreferencesPriv *priv = GET_PRIV (preferences); GtkTreePath *path; - gboolean toggled, instore; + gboolean instore; GtkTreeIter iter; GtkTreeView *view; GtkTreeModel *model; @@ -322,7 +330,6 @@ preferences_sound_cell_toggled_cb (GtkCellRendererToggle *toggle, model = gtk_tree_view_get_model (view); path = gtk_tree_path_new_from_string (path_string); - toggled = gtk_cell_renderer_toggle_get_active (toggle); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, COL_SOUND_KEY, &key, @@ -411,7 +418,6 @@ preferences_languages_setup (EmpathyPreferences *preferences) GtkTreeView *view; GtkListStore *store; GtkTreeSelection *selection; - GtkTreeModel *model; GtkTreeViewColumn *column; GtkCellRenderer *renderer; guint col_offset; @@ -428,8 +434,6 @@ preferences_languages_setup (EmpathyPreferences *preferences) selection = gtk_tree_view_get_selection (view); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); - model = GTK_TREE_MODEL (store); - renderer = gtk_cell_renderer_toggle_new (); g_signal_connect (renderer, "toggled", G_CALLBACK (preferences_languages_cell_toggled_cb), @@ -646,6 +650,124 @@ preferences_languages_cell_toggled_cb (GtkCellRendererToggle *cell, } static void +preferences_preview_theme_append_message (EmpathyChatView *view, + EmpathyContact *sender, + EmpathyContact *receiver, + const gchar *text) +{ + EmpathyMessage *message; + + message = g_object_new (EMPATHY_TYPE_MESSAGE, + "sender", sender, + "receiver", receiver, + "body", text, + NULL); + + empathy_chat_view_append_message (view, message); + g_object_unref (message); +} + +static void +preferences_preview_theme_changed_cb (EmpathyThemeManager *manager, + EmpathyPreferences *preferences) +{ + EmpathyPreferencesPriv *priv = GET_PRIV (preferences); + TpDBusDaemon *dbus; + TpAccount *account; + EmpathyContact *juliet; + EmpathyContact *romeo; + + DEBUG ("Theme changed, update preview widget"); + + if (priv->chat_theme_preview != NULL) { + gtk_widget_destroy (GTK_WIDGET (priv->chat_theme_preview)); + } + priv->chat_theme_preview = empathy_theme_manager_create_view (manager); + gtk_container_add (GTK_CONTAINER (priv->sw_chat_theme_preview), + GTK_WIDGET (priv->chat_theme_preview)); + gtk_widget_show (GTK_WIDGET (priv->chat_theme_preview)); + + /* FIXME: It is ugly to add a fake conversation like that. + * Would be cool if we could request a TplLogManager for a fake + * conversation */ + dbus = tp_dbus_daemon_dup (NULL); + account = tp_account_new (dbus, + TP_ACCOUNT_OBJECT_PATH_BASE "cm/jabber/account", NULL); + juliet = g_object_new (EMPATHY_TYPE_CONTACT, + "account", account, + "id", "juliet", + /* translators: Contact name for the chat theme preview */ + "alias", _("Juliet"), + "is-user", FALSE, + NULL); + romeo = g_object_new (EMPATHY_TYPE_CONTACT, + "account", account, + "id", "romeo", + /* translators: Contact name for the chat theme preview */ + "alias", _("Romeo"), + "is-user", TRUE, + NULL); + + preferences_preview_theme_append_message (priv->chat_theme_preview, + /* translators: Quote from Romeo & Julier, for chat theme preview */ + juliet, romeo, _("O Romeo, Romeo, wherefore art thou Romeo?")); + preferences_preview_theme_append_message (priv->chat_theme_preview, + /* translators: Quote from Romeo & Julier, for chat theme preview */ + juliet, romeo, _("Deny thy father and refuse thy name;")); + preferences_preview_theme_append_message (priv->chat_theme_preview, + /* translators: Quote from Romeo & Julier, for chat theme preview */ + juliet, romeo, _("Or if thou wilt not, be but sworn my love")); + preferences_preview_theme_append_message (priv->chat_theme_preview, + /* translators: Quote from Romeo & Julier, for chat theme preview */ + juliet, romeo, _("And I'll no longer be a Capulet.")); + preferences_preview_theme_append_message (priv->chat_theme_preview, + /* translators: Quote from Romeo & Julier, for chat theme preview */ + romeo, juliet, _("Shall I hear more, or shall I speak at this?")); + + /* translators: Quote from Romeo & Julier, for chat theme preview */ + empathy_chat_view_append_event (priv->chat_theme_preview, _("Juliet has disconnected")); + + g_object_unref (juliet); + g_object_unref (romeo); + g_object_unref (account); + g_object_unref (dbus); +} + +static void +preferences_theme_changed_cb (GtkComboBox *combo, + EmpathyPreferences *preferences) +{ + EmpathyPreferencesPriv *priv = GET_PRIV (preferences); + GtkTreeIter iter; + + if (gtk_combo_box_get_active_iter (combo, &iter)) { + GtkTreeModel *model; + gboolean is_adium; + gchar *name; + gchar *path; + + model = gtk_combo_box_get_model (combo); + gtk_tree_model_get (model, &iter, + COL_THEME_IS_ADIUM, &is_adium, + COL_THEME_NAME, &name, + COL_THEME_ADIUM_PATH, &path, + -1); + + g_settings_set_string (priv->gsettings_chat, + EMPATHY_PREFS_CHAT_THEME, + name); + if (is_adium) { + g_settings_set_string (priv->gsettings_chat, + EMPATHY_PREFS_CHAT_ADIUM_PATH, + path); + } + + g_free (name); + g_free (path); + } +} + +static void preferences_theme_notify_cb (GSettings *gsettings, const gchar *key, gpointer user_data) @@ -658,38 +780,34 @@ preferences_theme_notify_cb (GSettings *gsettings, GtkTreeModel *model; GtkTreeIter iter; gboolean found = FALSE; + gboolean ok; conf_name = g_settings_get_string (gsettings, EMPATHY_PREFS_CHAT_THEME); conf_path = g_settings_get_string (gsettings, EMPATHY_PREFS_CHAT_ADIUM_PATH); combo = GTK_COMBO_BOX (priv->combobox_chat_theme); model = gtk_combo_box_get_model (combo); - if (gtk_tree_model_get_iter_first (model, &iter)) { + for (ok = gtk_tree_model_get_iter_first (model, &iter); + ok && !found; + ok = gtk_tree_model_iter_next (model, &iter)) { gboolean is_adium; gchar *name; gchar *path; - do { - gtk_tree_model_get (model, &iter, - COL_COMBO_IS_ADIUM, &is_adium, - COL_COMBO_NAME, &name, - COL_COMBO_PATH, &path, - -1); - - if (!tp_strdiff (name, conf_name)) { - if (tp_strdiff (name, "adium") || - !tp_strdiff (path, conf_path)) { - found = TRUE; - gtk_combo_box_set_active_iter (combo, &iter); - g_free (name); - g_free (path); - break; - } - } - - g_free (name); - g_free (path); - } while (gtk_tree_model_iter_next (model, &iter)); + gtk_tree_model_get (model, &iter, + COL_THEME_IS_ADIUM, &is_adium, + COL_THEME_NAME, &name, + COL_THEME_ADIUM_PATH, &path, + -1); + + if (!tp_strdiff (name, conf_name) && + (!is_adium || !tp_strdiff (path, conf_path))) { + found = TRUE; + gtk_combo_box_set_active_iter (combo, &iter); + } + + g_free (name); + g_free (path); } /* Fallback to the first one. */ @@ -704,38 +822,6 @@ preferences_theme_notify_cb (GSettings *gsettings, } static void -preferences_theme_changed_cb (GtkComboBox *combo, - EmpathyPreferences *preferences) -{ - EmpathyPreferencesPriv *priv = GET_PRIV (preferences); - GtkTreeModel *model; - GtkTreeIter iter; - gboolean is_adium; - gchar *name; - gchar *path; - - if (gtk_combo_box_get_active_iter (combo, &iter)) { - model = gtk_combo_box_get_model (combo); - - gtk_tree_model_get (model, &iter, - COL_COMBO_IS_ADIUM, &is_adium, - COL_COMBO_NAME, &name, - COL_COMBO_PATH, &path, - -1); - - g_settings_set_string (priv->gsettings_chat, - EMPATHY_PREFS_CHAT_THEME, - name); - if (is_adium == TRUE) - g_settings_set_string (priv->gsettings_chat, - EMPATHY_PREFS_CHAT_ADIUM_PATH, - path); - g_free (name); - g_free (path); - } -} - -static void preferences_themes_setup (EmpathyPreferences *preferences) { EmpathyPreferencesPriv *priv = GET_PRIV (preferences); @@ -751,22 +837,21 @@ preferences_themes_setup (EmpathyPreferences *preferences) cell_layout = GTK_CELL_LAYOUT (combo); /* Create the model */ - store = gtk_list_store_new (COL_COMBO_COUNT, - G_TYPE_BOOLEAN, /* Is an Adium theme */ - G_TYPE_STRING, /* Display name */ - G_TYPE_STRING, /* Theme name */ - G_TYPE_STRING); /* Theme path */ + store = gtk_list_store_new (COL_THEME_COUNT, + G_TYPE_STRING, /* Display name */ + G_TYPE_STRING, /* Theme name */ + G_TYPE_BOOLEAN, /* Is an Adium theme */ + G_TYPE_STRING); /* Adium theme path */ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), - COL_COMBO_VISIBLE_NAME, GTK_SORT_ASCENDING); + COL_THEME_VISIBLE_NAME, GTK_SORT_ASCENDING); /* Fill the model */ themes = empathy_theme_manager_get_themes (); for (i = 0; themes[i]; i += 2) { gtk_list_store_insert_with_values (store, NULL, -1, - COL_COMBO_IS_ADIUM, FALSE, - COL_COMBO_VISIBLE_NAME, _(themes[i + 1]), - COL_COMBO_NAME, themes[i], - COL_COMBO_PATH, NULL, + COL_THEME_VISIBLE_NAME, _(themes[i + 1]), + COL_THEME_NAME, themes[i], + COL_THEME_IS_ADIUM, FALSE, -1); } @@ -782,10 +867,10 @@ preferences_themes_setup (EmpathyPreferences *preferences) if (name != NULL && path != NULL) { gtk_list_store_insert_with_values (store, NULL, -1, - COL_COMBO_IS_ADIUM, TRUE, - COL_COMBO_VISIBLE_NAME, name, - COL_COMBO_NAME, "adium", - COL_COMBO_PATH, path, + COL_THEME_VISIBLE_NAME, name, + COL_THEME_NAME, "adium", + COL_THEME_IS_ADIUM, TRUE, + COL_THEME_ADIUM_PATH, path, -1); } g_hash_table_unref (info); @@ -796,7 +881,7 @@ preferences_themes_setup (EmpathyPreferences *preferences) renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (cell_layout, renderer, TRUE); gtk_cell_layout_set_attributes (cell_layout, renderer, - "text", COL_COMBO_VISIBLE_NAME, NULL); + "text", COL_THEME_VISIBLE_NAME, NULL); gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store)); g_object_unref (store); @@ -832,6 +917,8 @@ empathy_preferences_finalize (GObject *self) { EmpathyPreferencesPriv *priv = GET_PRIV (self); + g_object_unref (priv->theme_manager); + g_object_unref (priv->gsettings); g_object_unref (priv->gsettings_chat); g_object_unref (priv->gsettings_loc); @@ -883,7 +970,9 @@ empathy_preferences_init (EmpathyPreferences *preferences) "notebook", &priv->notebook, "checkbutton_show_smileys", &priv->checkbutton_show_smileys, "checkbutton_show_contacts_in_rooms", &priv->checkbutton_show_contacts_in_rooms, + "vbox_chat_theme", &priv->vbox_chat_theme, "combobox_chat_theme", &priv->combobox_chat_theme, + "sw_chat_theme_preview", &priv->sw_chat_theme_preview, "checkbutton_separate_chat_windows", &priv->checkbutton_separate_chat_windows, "checkbutton_events_notif_area", &priv->checkbutton_events_notif_area, "checkbutton_autoconnect", &priv->checkbutton_autoconnect, @@ -918,6 +1007,13 @@ empathy_preferences_init (EmpathyPreferences *preferences) priv->gsettings_ui = g_settings_new (EMPATHY_PREFS_UI_SCHEMA); priv->gsettings_logger = g_settings_new (EMPATHY_PREFS_LOGGER_SCHEMA); + /* Create chat theme preview, and track changes */ + priv->theme_manager = empathy_theme_manager_dup_singleton (); + tp_g_signal_connect_object (priv->theme_manager, "theme-changed", + G_CALLBACK (preferences_preview_theme_changed_cb), + preferences, 0); + preferences_preview_theme_changed_cb (priv->theme_manager, preferences); + preferences_themes_setup (preferences); preferences_setup_widgets (preferences); diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui index 4acc6f3c7..6bc17b761 100644 --- a/src/empathy-preferences.ui +++ b/src/empathy-preferences.ui @@ -1,308 +1,606 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <interface> <requires lib="gtk+" version="2.16"/> - <!-- interface-naming-policy toplevel-contextual --> - <object class="GtkNotebook" id="notebook"> + <object class="GtkNotebook" id="notebook"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="border_width">5</property> + <child> + <object class="GtkBox" id="vbox197"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="orientation">vertical</property> + <property name="spacing">18</property> + <child> + <object class="GtkFrame" id="frame3"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="border_width">5</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> <child> - <object class="GtkBox" id="vbox197"> + <object class="GtkAlignment" id="alignment11"> <property name="visible">True</property> - <property name="border_width">12</property> - <property name="spacing">18</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> <child> - <object class="GtkFrame" id="frame3"> + <object class="GtkBox" id="vbox199"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> - <object class="GtkAlignment" id="alignment11"> + <object class="GtkCheckButton" id="checkbutton_show_smileys"> + <property name="label" translatable="yes">Show _smileys as images</property> <property name="visible">True</property> - <property name="top_padding">6</property> - <property name="left_padding">12</property> - <child> - <object class="GtkBox" id="vbox199"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkCheckButton" id="checkbutton_show_smileys"> - <property name="label" translatable="yes">Show _smileys as images</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_show_contacts_in_rooms"> - <property name="label" translatable="yes">Show contact _list in rooms</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">3</property> - </packing> - </child> - </object> - </child> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> </child> - <child type="label"> - <object class="GtkLabel" id="label611"> + <child> + <object class="GtkCheckButton" id="checkbutton_show_contacts_in_rooms"> + <property name="label" translatable="yes">Show contact _list in rooms</property> <property name="visible">True</property> - <property name="label" translatable="yes">Appearance</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label611"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Appearance</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> <child> - <object class="GtkFrame" id="frame4"> + <object class="GtkBox" id="vbox218"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> - <object class="GtkAlignment" id="alignment12"> + <object class="GtkCheckButton" id="checkbutton_separate_chat_windows"> + <property name="label" translatable="yes">_Open new chats in separate windows</property> <property name="visible">True</property> - <property name="top_padding">6</property> - <property name="left_padding">12</property> - <child> - <object class="GtkBox" id="vbox218"> - <property name="orientation">vertical</property> - <property name="visible">True</property> - <child> - <object class="GtkCheckButton" id="checkbutton_separate_chat_windows"> - <property name="label" translatable="yes">_Open new chats in separate windows</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_events_notif_area"> - <property name="label" translatable="yes">Display incoming events in the notification area</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_autoconnect"> - <property name="label" translatable="yes">_Automatically connect on startup</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_logging"> - <property name="label" translatable="yes">Log conversations</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="position">3</property> - </packing> - </child> - </object> - </child> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> </child> - <child type="label"> - <object class="GtkLabel" id="label612"> + <child> + <object class="GtkCheckButton" id="checkbutton_events_notif_area"> + <property name="label" translatable="yes">Display incoming events in the notification area</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_autoconnect"> + <property name="label" translatable="yes">_Automatically connect on startup</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_logging"> + <property name="label" translatable="yes">Log conversations</property> <property name="visible">True</property> - <property name="label" translatable="yes">Behavior</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> </child> </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label612"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Behavior</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <child type="tab"> + <object class="GtkLabel" id="label602"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">General</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkCheckButton" id="checkbutton_notifications_enabled"> + <property name="label" translatable="yes">_Enable bubble notifications</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="vbox3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkCheckButton" id="checkbutton_notifications_disabled_away"> + <property name="label" translatable="yes">Disable notifications when _away or busy</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_notifications_focus"> + <property name="label" translatable="yes">Enable notifications when the _chat is not focused</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> <packing> <property name="expand">False</property> - <property name="fill">False</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> + <child> + <object class="GtkCheckButton" id="checkbutton_notifications_contact_signin"> + <property name="label" translatable="yes">Enable notifications when a contact comes online</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_notifications_contact_signout"> + <property name="label" translatable="yes">Enable notifications when a contact goes offline</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> </object> </child> - <child type="tab"> - <object class="GtkLabel" id="label602"> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="position">1</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Notifications</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox" id="outer_vbox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="orientation">vertical</property> + <property name="spacing">18</property> + <child> + <object class="GtkBox" id="vbox219"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkCheckButton" id="checkbutton_sounds_enabled"> + <property name="label" translatable="yes">_Enable sound notifications</property> <property name="visible">True</property> - <property name="label" translatable="yes">General</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> </object> <packing> - <property name="tab_fill">False</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> - <object class="GtkBox" id="vbox2"> + <object class="GtkAlignment" id="alignment32"> <property name="visible">True</property> - <property name="border_width">12</property> - <property name="spacing">6</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> <child> - <object class="GtkCheckButton" id="checkbutton_notifications_enabled"> - <property name="label" translatable="yes">_Enable bubble notifications</property> + <object class="GtkCheckButton" id="checkbutton_sounds_disabled_away"> + <property name="label" translatable="yes">Disable sounds when _away or busy</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox221"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="label645"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Play sound for events</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkAlignment" id="alignment33"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow19"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTreeView" id="treeview_sounds"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection1"/> + </child> + </object> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="position">2</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel" id="label607"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Sounds</property> + </object> + <packing> + <property name="position">2</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="orientation">vertical</property> + <property name="spacing">18</property> + <child> + <object class="GtkCheckButton" id="checkbutton_location_publish"> + <property name="label" translatable="yes">_Publish location to my contacts</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> <child> - <object class="GtkAlignment" id="alignment1"> + <object class="GtkBox" id="vbox4"> <property name="visible">True</property> - <property name="left_padding">12</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> - <object class="GtkBox" id="vbox3"> + <object class="GtkBox" id="hbox1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">6</property> - <property name="orientation">vertical</property> <child> - <object class="GtkCheckButton" id="checkbutton_notifications_disabled_away"> - <property name="label" translatable="yes">Disable notifications when _away or busy</property> + <object class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> + <property name="can_focus">False</property> + <property name="yalign">0</property> + <property name="stock">gtk-dialog-info</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkCheckButton" id="checkbutton_notifications_focus"> - <property name="label" translatable="yes">Enable notifications when the _chat is not focused</property> + <object class="GtkLabel" id="label6"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Reduced location accuracy means that nothing more precise than your city, state and country will be published. GPS coordinates will be accurate to 1 decimal place.</property> + <property name="wrap">True</property> + <attributes> + <attribute name="scale" value="0.80000000000000004"/> + </attributes> </object> <packing> + <property name="expand">False</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> - <child> - <object class="GtkCheckButton" id="checkbutton_notifications_contact_signin"> - <property name="label" translatable="yes">Enable notifications when a contact comes online</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_notifications_contact_signout"> - <property name="label" translatable="yes">Enable notifications when a contact goes offline</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="position">3</property> - </packing> - </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_location_reduce_accuracy"> + <property name="label" translatable="yes" comments="To translators: The longitude and latitude are rounded to closest 0,1 degrees, so for example 146,2345° is rounded to round(146,2345*10)/10 = 146,2 degrees.">_Reduce location accuracy</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> </child> </object> - <packing> - <property name="position">1</property> - </packing> </child> - <child type="tab"> - <object class="GtkLabel" id="label1"> + <child type="label"> + <object class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="label" translatable="yes">Notifications</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Privacy</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> - <packing> - <property name="position">1</property> - <property name="tab_fill">False</property> - </packing> </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> <child> - <object class="GtkBox" id="outer_vbox"> + <object class="GtkAlignment" id="alignment4"> <property name="visible">True</property> - <property name="border_width">12</property> - <property name="spacing">18</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> <child> - <object class="GtkBox" id="vbox219"> + <object class="GtkBox" id="vbox5"> <property name="visible">True</property> - <property name="spacing">6</property> + <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkCheckButton" id="checkbutton_sounds_enabled"> - <property name="label" translatable="yes">_Enable sound notifications</property> + <object class="GtkCheckButton" id="checkbutton_location_resource_gps"> + <property name="label" translatable="yes">_GPS</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> @@ -313,500 +611,355 @@ </packing> </child> <child> - <object class="GtkAlignment" id="alignment32"> + <object class="GtkCheckButton" id="checkbutton_location_resource_cell"> + <property name="label" translatable="yes">_Cellphone</property> <property name="visible">True</property> - <property name="left_padding">12</property> - <child> - <object class="GtkCheckButton" id="checkbutton_sounds_disabled_away"> - <property name="label" translatable="yes">Disable sounds when _away or busy</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - </child> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> - </object> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox221"> - <property name="visible">True</property> - <property name="spacing">6</property> - <property name="orientation">vertical</property> <child> - <object class="GtkLabel" id="label645"> + <object class="GtkCheckButton" id="checkbutton_location_resource_network"> + <property name="label" translatable="yes">_Network (IP, Wi-Fi)</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Play sound for events</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> </object> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment33"> - <property name="visible">True</property> - <property name="left_padding">12</property> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow19"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="treeview_sounds"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="headers_visible">False</property> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="position">1</property> - <property name="expand">True</property> + <property name="position">2</property> </packing> </child> </object> - <packing> - <property name="position">1</property> - </packing> </child> </object> - <packing> - <property name="position">2</property> - </packing> </child> - <child type="tab"> - <object class="GtkLabel" id="label607"> + <child type="label"> + <object class="GtkLabel" id="label5"> <property name="visible">True</property> - <property name="label" translatable="yes">Sounds</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Location sources:</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> - <packing> - <property name="position">2</property> - <property name="tab_fill">False</property> - </packing> </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="position">3</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Location</property> + </object> + <packing> + <property name="position">3</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox168"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="orientation">vertical</property> + <property name="spacing">18</property> + <child> + <object class="GtkFrame" id="frame7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> <child> - <object class="GtkBox" id="vbox1"> + <object class="GtkAlignment" id="alignment15"> <property name="visible">True</property> - <property name="border_width">12</property> - <property name="orientation">vertical</property> - <property name="spacing">18</property> - <child> - <object class="GtkCheckButton" id="checkbutton_location_publish"> - <property name="label" translatable="yes">_Publish location to my contacts</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> <child> - <object class="GtkFrame" id="frame1"> + <object class="GtkBox" id="vbox201"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> - <object class="GtkAlignment" id="alignment2"> + <object class="GtkScrolledWindow" id="scrolledwindow18"> <property name="visible">True</property> - <property name="top_padding">6</property> - <property name="left_padding">12</property> + <property name="can_focus">False</property> + <property name="shadow_type">in</property> <child> - <object class="GtkBox" id="vbox4"> + <object class="GtkTreeView" id="treeview_spell_checker"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkBox" id="hbox1"> - <property name="visible">True</property> - <property name="spacing">6</property> - <property name="orientation">horizontal</property> - <child> - <object class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="yalign">0</property> - <property name="stock">gtk-dialog-info</property> - </object> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="wrap">True</property> - <property name="label" translatable="yes">Reduced location accuracy means that nothing more precise than your city, state and country will be published. GPS coordinates will be accurate to 1 decimal place.</property> - <attributes> - <attribute name="scale" value="0.8"/> - </attributes> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_location_reduce_accuracy"> - <property name="label" translatable="yes" comments="To translators: The longitude and latitude are rounded to closest 0,1 degrees, so for example 146,2345° is rounded to round(146,2345*10)/10 = 146,2 degrees.">_Reduce location accuracy</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> + <property name="can_focus">True</property> + <property name="headers_visible">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection2"/> </child> </object> </child> </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> </child> - <child type="label"> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Privacy</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkFrame" id="frame5"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> <child> - <object class="GtkAlignment" id="alignment4"> + <object class="GtkBox" id="hbox155"> <property name="visible">True</property> - <property name="top_padding">6</property> - <property name="left_padding">12</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> <child> - <object class="GtkBox" id="vbox5"> + <object class="GtkImage" id="image422"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkCheckButton" id="checkbutton_location_resource_gps"> - <property name="label" translatable="yes">_GPS</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_location_resource_cell"> - <property name="label" translatable="yes">_Cellphone</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_location_resource_network"> - <property name="label" translatable="yes">_Network (IP, Wi-Fi)</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> + <property name="can_focus">False</property> + <property name="yalign">0</property> + <property name="stock">gtk-dialog-info</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label616"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">The list of languages reflects only the languages for which you have a dictionary installed.</property> + <property name="wrap">True</property> + <attributes> + <attribute name="scale" value="0.80000000000000004"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Location sources:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="position">2</property> - </packing> </child> </object> - <packing> - <property name="position">3</property> - </packing> </child> - <child type="tab"> - <object class="GtkLabel" id="label2"> + <child type="label"> + <object class="GtkLabel" id="label615"> <property name="visible">True</property> - <property name="label" translatable="yes">Location</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Enable spell checking for languages:</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> - <packing> - <property name="position">3</property> - <property name="tab_fill">False</property> - </packing> </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="position">4</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel" id="label567"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Spell Checking</property> + </object> + <packing> + <property name="position">4</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox206"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="orientation">vertical</property> + <property name="spacing">18</property> + <child> + <object class="GtkFrame" id="frame11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> <child> - <object class="GtkBox" id="vbox168"> + <object class="GtkAlignment" id="alignment19"> <property name="visible">True</property> - <property name="border_width">12</property> - <property name="spacing">18</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> <child> - <object class="GtkFrame" id="frame7"> + <object class="GtkBox" id="vbox_chat_theme"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> - <object class="GtkAlignment" id="alignment15"> + <object class="GtkBox" id="hbox139"> <property name="visible">True</property> - <property name="top_padding">6</property> - <property name="left_padding">12</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> <child> - <object class="GtkBox" id="vbox201"> + <object class="GtkLabel" id="label586"> <property name="visible">True</property> - <property name="spacing">6</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow18"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="treeview_spell_checker"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="headers_visible">False</property> - </object> - </child> - </object> - <packing> - <property name="position">0</property> - <property name="expand">True</property> - </packing> - </child> - <child> - <object class="GtkBox" id="hbox155"> - <property name="visible">True</property> - <property name="spacing">6</property> - <property name="orientation">horizontal</property> - <child> - <object class="GtkImage" id="image422"> - <property name="visible">True</property> - <property name="yalign">0</property> - <property name="stock">gtk-dialog-info</property> - </object> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label616"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="wrap">True</property> - <property name="label" translatable="yes">The list of languages reflects only the languages for which you have a dictionary installed.</property> - <attributes> - <attribute name="scale" value="0.8"/> - </attributes> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Chat Th_eme:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">combobox_chat_theme</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_chat_theme"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> </child> - <child type="label"> - <object class="GtkLabel" id="label615"> - <property name="visible">True</property> - <property name="label" translatable="yes">Enable spell checking for languages:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">4</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="label567"> - <property name="visible">True</property> - <property name="label" translatable="yes">Spell Checking</property> - </object> - <packing> - <property name="position">4</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox206"> - <property name="visible">True</property> - <property name="border_width">12</property> - <property name="spacing">18</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkFrame" id="frame11"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> <child> - <object class="GtkAlignment" id="alignment19"> - <property name="visible">True</property> - <property name="top_padding">6</property> - <property name="left_padding">12</property> + <object class="GtkBox" id="hbox_chat_theme_variant"> + <property name="visible">False</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> <child> - <object class="GtkBox" id="vbox207"> + <object class="GtkLabel" id="label4"> <property name="visible">True</property> - <property name="spacing">6</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkBox" id="hbox139"> - <property name="visible">True</property> - <property name="spacing">12</property> - <property name="orientation">horizontal</property> - <child> - <object class="GtkLabel" id="label586"> - <property name="visible">True</property> - <property name="label" translatable="yes">Chat Th_eme:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">combobox_chat_theme</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkComboBox" id="combobox_chat_theme"> - <property name="visible">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Theme Variant:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">combobox_chat_theme_variant</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_chat_theme_variant"> + <property name="visible">True</property> + <property name="can_focus">False</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> - <child type="label"> - <object class="GtkLabel" id="label626"> + <child> + <object class="GtkScrolledWindow" id="sw_chat_theme_preview"> <property name="visible">True</property> - <property name="label" translatable="yes">Appearance</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> + <property name="can_focus">True</property> + <property name="shadow_type">in</property> + <child> + <placeholder/> + </child> </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> </child> </object> - <packing> - <property name="position">5</property> - </packing> </child> - <child type="tab"> - <object class="GtkLabel" id="label624"> + <child type="label"> + <object class="GtkLabel" id="label626"> <property name="visible">True</property> - <property name="label" translatable="yes">Themes</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Appearance</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> - <packing> - <property name="position">5</property> - <property name="tab_fill">False</property> - </packing> </child> </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="position">5</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel" id="label624"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Themes</property> + </object> + <packing> + <property name="position">5</property> + <property name="tab_fill">False</property> + </packing> + </child> + </object> </interface> diff --git a/src/empathy-streamed-media-window.c b/src/empathy-streamed-media-window.c index 50d3f8ace..100a6b9f1 100644 --- a/src/empathy-streamed-media-window.c +++ b/src/empathy-streamed-media-window.c @@ -2713,7 +2713,7 @@ start_call (EmpathyStreamedMediaWindow *self) priv->call_started = TRUE; empathy_streamed_media_handler_start_call (priv->handler, - gtk_get_current_event_time ()); + empathy_get_current_action_time ()); if (empathy_streamed_media_handler_has_initial_video (priv->handler)) { diff --git a/src/ev-sidebar.c b/src/ev-sidebar.c index d0dd2b615..9c805372d 100644 --- a/src/ev-sidebar.c +++ b/src/ev-sidebar.c @@ -64,10 +64,8 @@ static void ev_sidebar_class_init (EvSidebarClass *ev_sidebar_class) { GObjectClass *g_object_class; - GtkWidgetClass *widget_class; g_object_class = G_OBJECT_CLASS (ev_sidebar_class); - widget_class = GTK_WIDGET_CLASS (ev_sidebar_class); g_type_class_add_private (g_object_class, sizeof (EvSidebarPrivate)); |