diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/empathy-accounts-dialog.c | 10 | ||||
-rw-r--r-- | src/empathy-call-window.c | 13 | ||||
-rw-r--r-- | src/empathy-call-window.ui | 4 | ||||
-rw-r--r-- | src/empathy-chat-window.c | 51 | ||||
-rw-r--r-- | src/empathy-chat-window.ui | 8 | ||||
-rw-r--r-- | src/empathy-event-manager.c | 85 | ||||
-rw-r--r-- | src/empathy-event-manager.h | 1 | ||||
-rw-r--r-- | src/empathy-main-window.c | 2 | ||||
-rw-r--r-- | src/empathy-map-view.c | 2 | ||||
-rw-r--r-- | src/empathy-new-chatroom-dialog.c | 6 | ||||
-rw-r--r-- | src/empathy-preferences.c | 38 | ||||
-rw-r--r-- | src/empathy-preferences.ui | 43 | ||||
-rw-r--r-- | src/empathy-sidebar.c | 2 | ||||
-rw-r--r-- | src/empathy-status-icon.c | 15 | ||||
-rw-r--r-- | src/empathy.c | 6 |
16 files changed, 244 insertions, 44 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index cd13bffb1..42485b7d1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -83,7 +83,7 @@ EXTRA_DIST = \ $(ui_DATA) if HAVE_LIBCHAMPLAIN -empathy_SOURCES += \ +empathy_handwritten_source += \ empathy-map-view.c \ empathy-map-view.h diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 1dcde458f..4e2f4392a 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -397,7 +397,7 @@ accounts_dialog_model_add_columns (EmpathyAccountsDialog *dialog) g_signal_connect (cell, "toggled", G_CALLBACK (accounts_dialog_enable_toggled_cb), dialog); - + /* Account column */ column = gtk_tree_view_column_new (); gtk_tree_view_column_set_title (column, _("Accounts")); @@ -440,7 +440,7 @@ accounts_dialog_model_select_first (EmpathyAccountsDialog *dialog) /* select first */ view = GTK_TREE_VIEW (dialog->treeview); model = gtk_tree_view_get_model (view); - + if (gtk_tree_model_get_iter_first (model, &iter)) { selection = gtk_tree_view_get_selection (view); gtk_tree_selection_select_iter (selection, &iter); @@ -510,7 +510,7 @@ accounts_dialog_get_account_iter (EmpathyAccountsDialog *dialog, GtkTreeSelection *selection; GtkTreeModel *model; gboolean ok; - + /* Update the status in the model */ view = GTK_TREE_VIEW (dialog->treeview); selection = gtk_tree_view_get_selection (view); @@ -730,7 +730,7 @@ accounts_dialog_connection_changed_cb (EmpathyAccountManager *manager, GtkTreeModel *model; GtkTreeIter iter; gboolean found; - + /* Update the status in the model */ model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->treeview)); @@ -1041,7 +1041,7 @@ accounts_dialog_destroy_cb (GtkWidget *widget, g_object_unref (dialog->account_manager); g_object_unref (dialog->mc); - + g_free (dialog); } diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 4ad1b2609..75c6abfc7 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -488,7 +488,7 @@ empathy_call_window_mic_volume_changed_cb (GtkAdjustment *adj, priv->volume = volume; /* Ensure that the toggle button is active if the volume is > 0 and inactive - * if it's smaller then 0 */ + * if it's smaller than 0 */ if ((volume > 0) != gtk_toggle_tool_button_get_active ( GTK_TOGGLE_TOOL_BUTTON (priv->mic_button))) gtk_toggle_tool_button_set_active ( @@ -1201,13 +1201,17 @@ empathy_call_window_disconnected (EmpathyCallWindow *self) gtk_action_set_sensitive (priv->redial, TRUE); gtk_widget_set_sensitive (priv->redial_button, TRUE); - /* Reseting the send_video and camera_buton to their initial state */ + /* Reseting the send_video, camera_buton and mic_button to their + initial state */ gtk_widget_set_sensitive (priv->camera_button, FALSE); + gtk_widget_set_sensitive (priv->mic_button, FALSE); gtk_action_set_sensitive (priv->send_video, FALSE); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->send_video), initial_video); gtk_toggle_tool_button_set_active ( GTK_TOGGLE_TOOL_BUTTON (priv->camera_button), initial_video); + gtk_toggle_tool_button_set_active ( + GTK_TOGGLE_TOOL_BUTTON (priv->mic_button), TRUE); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->show_preview), FALSE); @@ -1348,6 +1352,8 @@ empathy_call_window_connected (gpointer user_data) gtk_action_set_sensitive (priv->redial, FALSE); gtk_widget_set_sensitive (priv->redial_button, FALSE); + gtk_widget_set_sensitive (priv->mic_button, TRUE); + empathy_call_window_update_avatars_visibility (call, self); g_object_unref (call); @@ -1850,6 +1856,9 @@ empathy_call_window_mic_toggled_cb (GtkToggleToolButton *toggle, EmpathyCallWindowPriv *priv = GET_PRIV (window); gboolean active; + if (priv->audio_input == NULL) + return; + active = (gtk_toggle_tool_button_get_active (toggle)); if (active) diff --git a/src/empathy-call-window.ui b/src/empathy-call-window.ui index 57d9efced..9e7c0962d 100644 --- a/src/empathy-call-window.ui +++ b/src/empathy-call-window.ui @@ -19,7 +19,7 @@ </child> <child> <object class="GtkAction" id="menuhangup"> - <property name="stock_id">gtk-cancel</property> + <property name="icon_name">call-stop</property> <property name="name">menuhangup</property> <property name="label" translatable="yes">Hang up</property> </object> @@ -89,7 +89,7 @@ <property name="visible">True</property> <property name="is_important">True</property> <property name="label" translatable="yes">Hang up</property> - <property name="stock_id">gtk-cancel</property> + <property name="icon_name">call-stop</property> </object> <packing> <property name="homogeneous">True</property> diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 118c7375e..898897b5f 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -77,6 +77,7 @@ typedef struct { GtkUIManager *ui_manager; GtkAction *menu_conv_insert_smiley; GtkAction *menu_conv_favorite; + GtkAction *menu_conv_toggle_contacts; GtkAction *menu_edit_cut; GtkAction *menu_edit_copy; @@ -547,6 +548,8 @@ chat_window_conv_activate_cb (GtkAction *action, { EmpathyChatWindowPriv *priv = GET_PRIV (window); gboolean is_room; + gboolean active; + EmpathyContact *remote_contact = NULL; /* Favorite room menu */ is_room = empathy_chat_is_room (priv->current_chat); @@ -565,6 +568,22 @@ chat_window_conv_activate_cb (GtkAction *action, GTK_TOGGLE_ACTION (priv->menu_conv_favorite), found); } gtk_action_set_visible (priv->menu_conv_favorite, is_room); + + /* Show contacts menu */ + g_object_get (priv->current_chat, + "remote-contact", &remote_contact, + "show-contacts", &active, + NULL); + if (remote_contact == NULL) { + gtk_toggle_action_set_active ( + GTK_TOGGLE_ACTION (priv->menu_conv_toggle_contacts), + active); + } + gtk_action_set_visible (priv->menu_conv_toggle_contacts, + (remote_contact == NULL)); + if (remote_contact != NULL) { + g_object_unref (remote_contact); + } } static void @@ -602,12 +621,24 @@ chat_window_favorite_toggled_cb (GtkToggleAction *toggle_action, g_object_unref (chatroom); return; } - + if (!active && chatroom) { empathy_chatroom_manager_remove (priv->chatroom_manager, chatroom); } } +static void +chat_window_contacts_toggled_cb (GtkToggleAction *toggle_action, + EmpathyChatWindow *window) +{ + EmpathyChatWindowPriv *priv = GET_PRIV (window); + gboolean active; + + active = gtk_toggle_action_get_active (toggle_action); + + empathy_chat_set_show_contacts (priv->current_chat, active); +} + static const gchar * chat_get_window_id_for_geometry (EmpathyChat *chat) { @@ -1179,7 +1210,7 @@ chat_window_focus_in_event_cb (GtkWidget *widget, priv->chats_new_msg = g_list_remove (priv->chats_new_msg, priv->current_chat); chat_window_set_urgency_hint (window, FALSE); - + /* Update the title, since we now mark all unread messages as read. */ chat_window_update_chat_tab (priv->current_chat); @@ -1208,7 +1239,7 @@ chat_window_drag_data_received (GtkWidget *widget, id = (const gchar*) selection->data; DEBUG ("DND contact from roster with id:'%s'", id); - + strv = g_strsplit (id, "/", 2); account_id = strv[0]; contact_id = strv[1]; @@ -1236,18 +1267,18 @@ chat_window_drag_data_received (GtkWidget *widget, g_object_unref (account); g_strfreev (strv); - old_window = chat_window_find_chat (chat); + old_window = chat_window_find_chat (chat); if (old_window) { if (old_window == window) { gtk_drag_finish (context, TRUE, FALSE, time); return; } - + empathy_chat_window_move_chat (old_window, window, chat); } else { empathy_chat_window_add_chat (window, chat); } - + /* Added to take care of any outstanding chat events */ empathy_chat_window_present_chat (chat); @@ -1278,7 +1309,7 @@ chat_window_drag_data_received (GtkWidget *widget, gtk_drag_finish (context, TRUE, FALSE, time); return; } - + priv->dnd_same_window = FALSE; } @@ -1368,6 +1399,7 @@ empathy_chat_window_init (EmpathyChatWindow *window) "ui_manager", &priv->ui_manager, "menu_conv_insert_smiley", &priv->menu_conv_insert_smiley, "menu_conv_favorite", &priv->menu_conv_favorite, + "menu_conv_toggle_contacts", &priv->menu_conv_toggle_contacts, "menu_edit_cut", &priv->menu_edit_cut, "menu_edit_copy", &priv->menu_edit_copy, "menu_edit_paste", &priv->menu_edit_paste, @@ -1384,6 +1416,7 @@ empathy_chat_window_init (EmpathyChatWindow *window) "menu_conv", "activate", chat_window_conv_activate_cb, "menu_conv_clear", "activate", chat_window_clear_activate_cb, "menu_conv_favorite", "toggled", chat_window_favorite_toggled_cb, + "menu_conv_toggle_contacts", "toggled", chat_window_contacts_toggled_cb, "menu_conv_close", "activate", chat_window_close_activate_cb, "menu_edit", "activate", chat_window_edit_activate_cb, "menu_edit_cut", "activate", chat_window_cut_activate_cb, @@ -1565,14 +1598,14 @@ empathy_chat_window_add_chat (EmpathyChatWindow *window, /* If this window has just been created, position it */ if (priv->chats == NULL) { empathy_geometry_load (chat_get_window_id_for_geometry (chat), &x, &y, &w, &h); - + if (x >= 0 && y >= 0) { /* Let the window manager position it if we don't have * good x, y coordinates. */ gtk_window_move (GTK_WINDOW (priv->dialog), x, y); } - + if (w > 0 && h > 0) { /* Use the defaults from the ui file if we don't have * good w, h geometry. diff --git a/src/empathy-chat-window.ui b/src/empathy-chat-window.ui index 0d5a83180..8c8ea7d00 100644 --- a/src/empathy-chat-window.ui +++ b/src/empathy-chat-window.ui @@ -32,6 +32,13 @@ </object> </child> <child> + <object class="GtkToggleAction" id="menu_conv_toggle_contacts"> + <property name="name">menu_conv_toggle_contacts</property> + <property name="active">TRUE</property> + <property name="label" translatable="yes">_Show Contact List</property> + </object> + </child> + <child> <object class="GtkAction" id="menu_conv_close"> <property name="stock_id">gtk-close</property> <property name="name">menu_conv_close</property> @@ -137,6 +144,7 @@ <menuitem action="menu_conv_clear"/> <menuitem action="menu_conv_insert_smiley"/> <menuitem action="menu_conv_favorite"/> + <menuitem action="menu_conv_toggle_contacts"/> <separator/> <menuitem action="menu_conv_close"/> </menu> diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index 1ee619e58..35c91c48c 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -26,6 +26,7 @@ #include <telepathy-glib/util.h> +#include <libempathy/empathy-account-manager.h> #include <libempathy/empathy-dispatcher.h> #include <libempathy/empathy-tp-contact-factory.h> #include <libempathy/empathy-contact-manager.h> @@ -37,6 +38,7 @@ #include <extensions/extensions.h> +#include <libempathy-gtk/empathy-conf.h> #include <libempathy-gtk/empathy-images.h> #include <libempathy-gtk/empathy-contact-dialogs.h> #include <libempathy-gtk/empathy-ui-utils.h> @@ -50,6 +52,8 @@ #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyEventManager) +#define NOTIFICATION_TIMEOUT 2 /* seconds */ + typedef struct { EmpathyEventManager *manager; EmpathyDispatchOperation *operation; @@ -247,6 +251,13 @@ event_remove (EventPriv *event) event_free (event); } +static gboolean +autoremove_event_timeout_cb (EventPriv *event) +{ + event_remove (event); + return FALSE; +} + static void event_manager_add (EmpathyEventManager *manager, EmpathyContact *contact, const gchar *icon_name, const gchar *header, const gchar *message, @@ -260,6 +271,7 @@ event_manager_add (EmpathyEventManager *manager, EmpathyContact *contact, event->public.icon_name = g_strdup (icon_name); event->public.header = g_strdup (header); event->public.message = g_strdup (message); + event->public.must_ack = (func != NULL); event->inhibit = FALSE; event->func = func; event->user_data = user_data; @@ -269,6 +281,12 @@ event_manager_add (EmpathyEventManager *manager, EmpathyContact *contact, DEBUG ("Adding event %p", event); priv->events = g_slist_prepend (priv->events, event); g_signal_emit (event->manager, signals[EVENT_ADDED], 0, event); + + if (!event->public.must_ack) + { + g_timeout_add_seconds (NOTIFICATION_TIMEOUT, + (GSourceFunc) autoremove_event_timeout_cb, event); + } } static void @@ -956,6 +974,65 @@ event_manager_pendings_changed_cb (EmpathyContactList *list, g_free (header); } +static void +event_manager_presence_changed_cb (EmpathyContactMonitor *monitor, + EmpathyContact *contact, + TpConnectionPresenceType current, + TpConnectionPresenceType previous, + EmpathyEventManager *manager) +{ + McAccount *account; + gboolean just_connected; + EmpathyAccountManager *account_manager; + gchar *header = NULL; + gboolean preference = FALSE; + + account = empathy_contact_get_account (contact); + account_manager = empathy_account_manager_dup_singleton (); + just_connected = empathy_account_manager_is_account_just_connected ( + account_manager, account); + + g_object_unref (account_manager); + if (just_connected) + return; + + if (tp_connection_presence_type_cmp_availability (previous, + TP_CONNECTION_PRESENCE_TYPE_OFFLINE) > 0) + { + /* contact was online */ + empathy_conf_get_bool (empathy_conf_get (), + EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNOUT, &preference); + if (preference && tp_connection_presence_type_cmp_availability (current, + TP_CONNECTION_PRESENCE_TYPE_OFFLINE) <= 0) + { + /* someone is logging off */ + header = g_strdup_printf (_("%s is now offline."), + empathy_contact_get_name (contact)); + + event_manager_add (manager, contact, GTK_STOCK_DIALOG_INFO, header, + NULL, NULL, NULL, NULL); + } + } + else + { + /* contact was offline */ + empathy_conf_get_bool (empathy_conf_get (), + EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNIN, &preference); + if (preference && tp_connection_presence_type_cmp_availability (current, + TP_CONNECTION_PRESENCE_TYPE_OFFLINE) > 0) + { + /* someone is logging in */ + header = g_strdup_printf (_("%s is now online."), + empathy_contact_get_name (contact)); + + event_manager_add (manager, contact, GTK_STOCK_DIALOG_INFO, header, + NULL, NULL, NULL, NULL); + } + } + g_free (header); +} + + static GObject * event_manager_constructor (GType type, guint n_props, @@ -1034,6 +1111,12 @@ empathy_event_manager_init (EmpathyEventManager *manager) { EmpathyEventManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, EMPATHY_TYPE_EVENT_MANAGER, EmpathyEventManagerPriv); + EmpathyContactMonitor *monitor; + EmpathyContactList *list_iface; + + list_iface = EMPATHY_CONTACT_LIST (empathy_contact_manager_dup_singleton ()); + monitor = empathy_contact_list_get_monitor (list_iface); + g_object_unref (list_iface); manager->priv = priv; @@ -1043,6 +1126,8 @@ empathy_event_manager_init (EmpathyEventManager *manager) G_CALLBACK (event_manager_approve_channel_cb), manager); g_signal_connect (priv->contact_manager, "pendings-changed", G_CALLBACK (event_manager_pendings_changed_cb), manager); + g_signal_connect (monitor, "contact-presence-changed", + G_CALLBACK (event_manager_presence_changed_cb), manager); } EmpathyEventManager * diff --git a/src/empathy-event-manager.h b/src/empathy-event-manager.h index 42fd0c090..af73c8ea7 100644 --- a/src/empathy-event-manager.h +++ b/src/empathy-event-manager.h @@ -53,6 +53,7 @@ typedef struct { gchar *icon_name; gchar *header; gchar *message; + gboolean must_ack; } EmpathyEvent; GType empathy_event_manager_get_type (void) G_GNUC_CONST; diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 5830d2b71..e92817a0b 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -197,7 +197,7 @@ main_window_flash_cb (EmpathyMainWindow *window) events = empathy_event_manager_get_events (window->event_manager); for (l = events; l; l = l->next) { data.event = l->data; - if (!data.event->contact) { + if (!data.event->contact || !data.event->must_ack) { continue; } diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c index 99c496b23..86e15bdff 100644 --- a/src/empathy-map-view.c +++ b/src/empathy-map-view.c @@ -161,7 +161,7 @@ map_view_contacts_foreach (GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { - EmpathyMapView *window = (EmpathyMapView*) user_data; + EmpathyMapView *window = (EmpathyMapView *) user_data; EmpathyContact *contact; ClutterActor *marker; ClutterActor *texture; diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c index 563665932..da90cbb49 100644 --- a/src/empathy-new-chatroom-dialog.c +++ b/src/empathy-new-chatroom-dialog.c @@ -362,7 +362,7 @@ new_chatroom_dialog_update_widgets (EmpathyNewChatroomDialog *dialog) McProfile *profile; const gchar *protocol; const gchar *room; - + account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser); account = empathy_account_chooser_dup_account (account_chooser); profile = mc_account_get_profile (account); @@ -545,7 +545,7 @@ new_chatroom_dialog_listing_cb (EmpathyTpRoomlist *room_list, /* Update the throbber */ if (listing) { - ephy_spinner_start (EPHY_SPINNER (dialog->throbber)); + ephy_spinner_start (EPHY_SPINNER (dialog->throbber)); } else { ephy_spinner_stop (EPHY_SPINNER (dialog->throbber)); } @@ -572,7 +572,7 @@ new_chatroom_dialog_model_row_activated_cb (GtkTreeView *tree_view, static void new_chatroom_dialog_model_selection_changed (GtkTreeSelection *selection, EmpathyNewChatroomDialog *dialog) -{ +{ GtkTreeModel *model; GtkTreeIter iter; gchar *room = NULL; diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c index 4c88db675..0e2299cac 100644 --- a/src/empathy-preferences.c +++ b/src/empathy-preferences.c @@ -52,6 +52,7 @@ typedef struct { GtkWidget *checkbutton_show_avatars; GtkWidget *checkbutton_compact_contact_list; GtkWidget *checkbutton_show_smileys; + GtkWidget *checkbutton_show_contacts_in_rooms; GtkWidget *combobox_chat_theme; GtkWidget *hbox_adium_theme; GtkWidget *filechooserbutton_adium_theme; @@ -68,6 +69,8 @@ typedef struct { GtkWidget *checkbutton_notifications_enabled; GtkWidget *checkbutton_notifications_disabled_away; GtkWidget *checkbutton_notifications_focus; + GtkWidget *checkbutton_notifications_contact_signin; + GtkWidget *checkbutton_notifications_contact_signout; GtkWidget *treeview_spell_checker; @@ -199,6 +202,12 @@ preferences_setup_widgets (EmpathyPreferences *preferences) preferences_hookup_toggle_button (preferences, EMPATHY_PREFS_NOTIFICATIONS_FOCUS, preferences->checkbutton_notifications_focus); + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNIN, + preferences->checkbutton_notifications_contact_signin); + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNOUT, + preferences->checkbutton_notifications_contact_signout); preferences_hookup_sensitivity (preferences, EMPATHY_PREFS_NOTIFICATIONS_ENABLED, @@ -206,6 +215,12 @@ preferences_setup_widgets (EmpathyPreferences *preferences) preferences_hookup_sensitivity (preferences, EMPATHY_PREFS_NOTIFICATIONS_ENABLED, preferences->checkbutton_notifications_focus); + preferences_hookup_sensitivity (preferences, + EMPATHY_PREFS_NOTIFICATIONS_ENABLED, + preferences->checkbutton_notifications_contact_signin); + preferences_hookup_sensitivity (preferences, + EMPATHY_PREFS_NOTIFICATIONS_ENABLED, + preferences->checkbutton_notifications_contact_signout); preferences_hookup_toggle_button (preferences, EMPATHY_PREFS_SOUNDS_ENABLED, @@ -237,6 +252,10 @@ preferences_setup_widgets (EmpathyPreferences *preferences) EMPATHY_PREFS_CHAT_SHOW_SMILEYS, preferences->checkbutton_show_smileys); + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_CHAT_SHOW_CONTACTS_IN_ROOMS, + preferences->checkbutton_show_contacts_in_rooms); + preferences_hookup_radio_button (preferences, EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM, preferences->radiobutton_contact_list_sort_by_name); @@ -457,7 +476,7 @@ preferences_languages_add (EmpathyPreferences *preferences) codes != NULL); if (!codes) { gtk_widget_set_sensitive (preferences->treeview_spell_checker, FALSE); - } + } for (l = codes; l; l = l->next) { GtkTreeIter iter; @@ -655,12 +674,12 @@ preferences_widget_sync_string (const gchar *key, GtkWidget *widget) GEnumValue *enum_value; GSList *list; GtkWidget *toggle_widget; - + /* Get index from new string */ type = empathy_contact_list_store_sort_get_type (); enum_class = G_ENUM_CLASS (g_type_class_peek (type)); enum_value = g_enum_get_value_by_nick (enum_class, value); - + if (enum_value) { list = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget)); toggle_widget = g_slist_nth_data (list, enum_value->value); @@ -722,7 +741,7 @@ preferences_notify_int_cb (EmpathyConf *conf, const gchar *key, gpointer user_data) { - preferences_widget_sync_int (key, user_data); + preferences_widget_sync_int (key, user_data); } static void @@ -912,14 +931,14 @@ preferences_radio_button_toggled_cb (GtkWidget *button, GType type; GEnumClass *enum_class; GEnumValue *enum_value; - + group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); - + /* Get string from index */ type = empathy_contact_list_store_sort_get_type (); enum_class = G_ENUM_CLASS (g_type_class_peek (type)); enum_value = g_enum_get_value (enum_class, g_slist_index (group, button)); - + if (!enum_value) { g_warning ("No GEnumValue for EmpathyContactListSort with GtkRadioButton index:%d", g_slist_index (group, button)); @@ -952,7 +971,7 @@ preferences_theme_adium_update_validity (EmpathyPreferences *preferences, const gchar *path) { #ifdef HAVE_WEBKIT - if (empathy_theme_adium_is_valid (path)) { + if (empathy_adium_path_is_valid (path)) { gtk_widget_hide (preferences->label_invalid_adium_theme); } else { gtk_widget_show (preferences->label_invalid_adium_theme); @@ -1190,6 +1209,7 @@ empathy_preferences_show (GtkWindow *parent) "checkbutton_show_avatars", &preferences->checkbutton_show_avatars, "checkbutton_compact_contact_list", &preferences->checkbutton_compact_contact_list, "checkbutton_show_smileys", &preferences->checkbutton_show_smileys, + "checkbutton_show_contacts_in_rooms", &preferences->checkbutton_show_contacts_in_rooms, "combobox_chat_theme", &preferences->combobox_chat_theme, "hbox_adium_theme", &preferences->hbox_adium_theme, "filechooserbutton_adium_theme", &preferences->filechooserbutton_adium_theme, @@ -1201,6 +1221,8 @@ empathy_preferences_show (GtkWindow *parent) "checkbutton_notifications_enabled", &preferences->checkbutton_notifications_enabled, "checkbutton_notifications_disabled_away", &preferences->checkbutton_notifications_disabled_away, "checkbutton_notifications_focus", &preferences->checkbutton_notifications_focus, + "checkbutton_notifications_contact_signin", &preferences->checkbutton_notifications_contact_signin, + "checkbutton_notifications_contact_signout", &preferences->checkbutton_notifications_contact_signout, "checkbutton_sounds_enabled", &preferences->checkbutton_sounds_enabled, "checkbutton_sounds_disabled_away", &preferences->checkbutton_sounds_disabled_away, "treeview_sounds", &preferences->treeview_sounds, diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui index 6ae92d17c..2b9f85579 100644 --- a/src/empathy-preferences.ui +++ b/src/empathy-preferences.ui @@ -37,7 +37,6 @@ <child> <object class="GtkVBox" id="vbox199"> <property name="visible">True</property> - <property name="spacing">6</property> <child> <object class="GtkCheckButton" id="checkbutton_compact_contact_list"> <property name="label" translatable="yes">Show co_mpact contact list</property> @@ -86,6 +85,22 @@ <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> </object> @@ -295,6 +310,32 @@ <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> </child> </object> diff --git a/src/empathy-sidebar.c b/src/empathy-sidebar.c index caca6b5e3..7b70229e2 100644 --- a/src/empathy-sidebar.c +++ b/src/empathy-sidebar.c @@ -165,7 +165,7 @@ empathy_sidebar_set_property (GObject *object, switch (prop_id) { case PROP_CURRENT_PAGE: - empathy_sidebar_set_page (sidebar, g_value_get_object (value)); + empathy_sidebar_set_page (sidebar, g_value_get_object (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c index 9c2194880..d6520ff7c 100644 --- a/src/empathy-status-icon.c +++ b/src/empathy-status-icon.c @@ -229,13 +229,14 @@ status_icon_event_added_cb (EmpathyEventManager *manager, DEBUG ("New event %p", event); priv->event = event; - priv->showing_event_icon = TRUE; - - status_icon_update_icon (icon); - status_icon_update_tooltip (icon); + if (event->must_ack) { + priv->showing_event_icon = TRUE; + status_icon_update_icon (icon); + status_icon_update_tooltip (icon); + } status_icon_update_notification (icon); - if (!priv->blink_timeout) { + if (!priv->blink_timeout && priv->showing_event_icon) { priv->blink_timeout = g_timeout_add (BLINK_TIMEOUT, (GSourceFunc) status_icon_blink_timeout_cb, icon); @@ -260,7 +261,7 @@ status_icon_event_removed_cb (EmpathyEventManager *manager, /* update notification anyway, as it's safe and we might have been * changed presence in the meanwhile - */ + */ status_icon_update_notification (icon); if (!priv->event && priv->blink_timeout) { @@ -378,7 +379,7 @@ status_icon_key_press_event_cb (GtkWidget *window, } return FALSE; } - + static void status_icon_activate_cb (GtkStatusIcon *status_icon, EmpathyStatusIcon *icon) diff --git a/src/empathy.c b/src/empathy.c index fc6b5118c..85124d1e9 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -286,13 +286,13 @@ create_salut_account (void) account = mc_account_create (profile); mc_account_set_display_name (account, _("People nearby")); - + nickname = e_contact_get (contact, E_CONTACT_NICKNAME); first_name = e_contact_get (contact, E_CONTACT_GIVEN_NAME); last_name = e_contact_get (contact, E_CONTACT_FAMILY_NAME); email = e_contact_get (contact, E_CONTACT_EMAIL_1); jid = e_contact_get (contact, E_CONTACT_IM_JABBER_HOME_1); - + if (!tp_strdiff (nickname, "nickname")) { g_free (nickname); nickname = NULL; @@ -634,7 +634,7 @@ main (int argc, char *argv[]) (idle), TP_CONNECTION_PRESENCE_TYPE_OFFLINE) <= 0) { empathy_idle_set_state (idle, MC_PRESENCE_AVAILABLE); } - + create_salut_account (); /* Setting up UI */ |