diff options
-rw-r--r-- | NEWS | 61 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | docs/libempathy-gtk/Makefile.am | 1 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 12 | ||||
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-theme-boxes.c | 2 | ||||
-rw-r--r-- | libempathy/empathy-contact.c | 37 | ||||
-rw-r--r-- | libempathy/empathy-contact.h | 4 | ||||
-rw-r--r-- | libempathy/empathy-time.c | 5 | ||||
-rw-r--r-- | src/empathy-map-view.c | 278 |
10 files changed, 268 insertions, 146 deletions
@@ -1,3 +1,64 @@ +NEW in 2.27.3 +============== +Bugs fixed: + - Fixed #522069, Improve message styles with themes/plugins (ala Adium) + - Fixed #548707, "New Account" title and "I already have an account" checkbox are contradictory (Guillaume Desmottes) + - Fixed #548716, First text field when adding account (e.g. "Login ID") isn't focused by default (Dimitris Zenios) + - Fixed #560787, Should support IPv4 file transfer + - Fixed #562981, make sametime support official (Guillaume Desmottes) + - Fixed #563675, Does not show any error messages when FT channel request fails + - Fixed #563896, "Conditional jump or move depends on uninitialised value" when sending a file + - Fixed #564259, Tooltips in the MUC user list + - Fixed #574478, Conversation not showing up in taskbar + - Fixed #574878, can't rename account while the account is connecting + - Fixed #574980, Audio/Video Chat windows don't show contact name + - Fixed #575415, Should switch from libglade to GtkBuilder + - Fixed #576405, Crash when a FT was cancelled + - Fixed #578497, failure to cancel file transfer + - Fixed #579725, Implement debug dialog using o.fd.Tp.Debug + - Fixed #579992, Import of XMPP accounts sets port (Jonny Lamb) + - Fixed #580921, Weird behaviour with MUC members in current master + - Fixed #582191, The call windows should have a "redial" button. + - Fixed #582736, Merge ft_rework branch + - Fixed #582773, Empathy puts cheesy strings in my subscription requests + - Fixed #582774, When no video is being sent, the video output and preview should show an icon instead of being black. + - Fixed #583548, Python exemple is broken + - Fixed #583785, Display a summary at the end of configure + - Fixed #584061, IRC server for FreeNode is out of date (Guillaume Desmottes) + - Fixed #584102, New tube API is now stable + - Fixed #584147, The Map View doesn't have a loading throbber + - Fixed #584206, Add the method empathy_contact_can_stream_tubes in the empathy-tp-contact-factory + - Fixed #584462, user list stays empty + - Fixed #584463, Contact menu is empty + - Fixed #584518, Critical error in publish_to_all_connections + - Fixed #584635, Sorting contacts by State doesn't place Available as top + - Fixed #584639, Remove "View"/"Show" prefixes from View menu items + - Fixed #584672, Add a right-click menu to conversation window tabs + - Fixed #584755, Empathy doesn't show buddy list in IRC + - Fixed #584807, EmpathyTpTube must die + - Fixed #584830, Invalid read in new_connection_cb + - Fixed #584924, GObjectify EmpathyProfileChooser + - Fixed #584989, Asserts if a new group appears with the same name as an old one. + - Fixed #585055, make distcheck is broken + - Fixed #585078, Doesn't use address from Hostip + - Fixed #585080, Lot of contacts are missing avatars + - Fixed #585092, Tab tooltips show "(null)" for contacts without presence + - Fixed #585201, Crashed when I disconnected + - Fixed #585231, Asserts in dispatcher_start_dispatching when I reconnect to IRC (Will Thompson) + - Fixed #585279, Crashed when accepting a FT failed + - Fixed #585640, Only English should be used for i18n + - Fixed #585669, GNOME Goal: Clean up GLib and GTK+ includes in empathy (Luis Menina) + - Fixed #585788, Capitalisation incorrect (Guillaume Desmottes) + - Fixed #571666, [2/3] Empathy should publish my geolocation + - Fixed #571667, [3/3] Empathy should display my location + +Translations: + - Updated es Translation (Jorge Gonzalez) + - Updated he Translation (Mark Krapivner) + - Updated hu Translation (Gabor Kelemen) + - Updated nb Translation (Kjartan Maraas) + - Updated pa Translation (A S Alam) + NEW in 2.27.2 ============== Bugs fixed: diff --git a/configure.ac b/configure.ac index c921c40cd..ce87cb873 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(Empathy, 2.27.3, http://bugzilla.gnome.org/browse.cgi?product=empathy) +AC_INIT(Empathy, 2.27.4, http://bugzilla.gnome.org/browse.cgi?product=empathy) AC_PREREQ(2.59) AC_COPYRIGHT([ Copyright (C) 2003-2007 Imendio AB @@ -9,11 +9,11 @@ AC_COPYRIGHT([ # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) # (Interfaces added: CURRENT++, AGE++, REVISION=0) # (No interfaces changed: REVISION++) -LIBEMPATHY_CURRENT=25 +LIBEMPATHY_CURRENT=26 LIBEMPATHY_AGE=0 LIBEMPATHY_REVISION=0 -LIBEMPATHY_GTK_CURRENT=23 +LIBEMPATHY_GTK_CURRENT=24 LIBEMPATHY_GTK_AGE=0 LIBEMPATHY_GTK_REVISION=0 @@ -35,8 +35,8 @@ ENCHANT_REQUIRED=1.2.0 ISO_CODES_REQUIRED=0.35 LIBNOTIFY_REQUIRED=0.4.4 LIBCANBERRA_GTK_REQUIRED=0.4 -LIBCHAMPLAIN_REQUIRED=0.3.0 -LIBCHAMPLAIN_GTK_REQUIRED=0.3.0 +LIBCHAMPLAIN_REQUIRED=0.3.3 +LIBCHAMPLAIN_GTK_REQUIRED=0.3.3 CLUTTER_GTK_REQUIRED=0.8.2 GEOCLUE_REQUIRED=0.11 WEBKIT_REQUIRED=1.1.7 diff --git a/docs/libempathy-gtk/Makefile.am b/docs/libempathy-gtk/Makefile.am index 1a666bafb..14e7396f9 100644 --- a/docs/libempathy-gtk/Makefile.am +++ b/docs/libempathy-gtk/Makefile.am @@ -10,6 +10,7 @@ DOC_MAIN_SGML_FILE=libempathy-gtk-docs.sgml # Extra options to supply to gtkdoc-scan SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" +SCANGOBJ_OPTIONS=--type-init-func="g_type_init();g_thread_init(NULL);" # The directory containing the source code. Relative to $(srcdir) DOC_SOURCE_DIR=$(top_srcdir)/libempathy-gtk diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 6c1015364..12a139303 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -105,7 +105,7 @@ typedef struct #if HAVE_LIBCHAMPLAIN GtkWidget *viewport_map; GtkWidget *map_view_embed; - ClutterActor *map_view; + ChamplainView *map_view; #endif /* Groups */ @@ -1420,9 +1420,9 @@ contact_widget_location_update (EmpathyContactWidget *information) ClutterActor *marker; ChamplainLayer *layer; - information->map_view = champlain_view_new (); - information->map_view_embed = champlain_view_embed_new ( - CHAMPLAIN_VIEW (information->map_view)); + information->map_view_embed = gtk_champlain_embed_new (); + information->map_view = gtk_champlain_embed_get_view ( + GTK_CHAMPLAIN_EMBED (information->map_view_embed)); gtk_container_add (GTK_CONTAINER (information->viewport_map), information->map_view_embed); @@ -1431,14 +1431,14 @@ contact_widget_location_update (EmpathyContactWidget *information) NULL); layer = champlain_layer_new (); - champlain_view_add_layer (CHAMPLAIN_VIEW (information->map_view), layer); + champlain_view_add_layer (information->map_view, layer); marker = champlain_marker_new_with_text ( empathy_contact_get_name (information->contact), NULL, NULL, NULL); champlain_base_marker_set_position (CHAMPLAIN_BASE_MARKER (marker), lat, lon); clutter_container_add (CLUTTER_CONTAINER (layer), marker, NULL); - champlain_view_center_on (CHAMPLAIN_VIEW(information->map_view), lat, lon); + champlain_view_center_on (information->map_view, lat, lon); gtk_widget_show_all (information->viewport_map); } #endif diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 82384acd1..321d1998c 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -500,7 +500,8 @@ theme_adium_append_message (EmpathyChatView *view, } /* Get the right html/func to add the message */ - if (priv->last_contact == sender) { + func = "appendMessage"; + if (empathy_contact_equal (priv->last_contact, sender)) { func = "appendNextMessage"; if (empathy_contact_is_user (sender)) { html = priv->out_nextcontent_html; @@ -512,7 +513,6 @@ theme_adium_append_message (EmpathyChatView *view, } } if (!html) { - func = "appendMessage"; if (empathy_contact_is_user (sender)) { html = priv->out_content_html; len = priv->out_content_len; diff --git a/libempathy-gtk/empathy-theme-boxes.c b/libempathy-gtk/empathy-theme-boxes.c index 199132956..64d95d4f2 100644 --- a/libempathy-gtk/empathy-theme-boxes.c +++ b/libempathy-gtk/empathy-theme-boxes.c @@ -210,7 +210,7 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme, /* Only insert a header if the previously inserted block is not the same * as this one. */ - if (last_contact == contact) { + if (empathy_contact_equal (last_contact, contact)) { return; } diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 8e07fb9f6..bad6ef470 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -1082,3 +1082,40 @@ empathy_contact_set_location (EmpathyContact *contact, priv->location = g_hash_table_ref (location); g_object_notify (G_OBJECT (contact), "location"); } + +/** + * empathy_contact_equal: + * @contact1: an #EmpathyContact + * @contact2: an #EmpathyContact + * + * Returns FALSE if one of the contacts is NULL but the other is not. + * Otherwise returns TRUE if both pointer are equal or if they bith + * refer to the same id. + * It's only necessary to call this function if your contact objects + * come from logs where contacts are created dynamically and comparing + * pointers is not enough. + */ +gboolean +empathy_contact_equal (gconstpointer contact1, + gconstpointer contact2) +{ + EmpathyContact *c1; + EmpathyContact *c2; + const gchar *id1; + const gchar *id2; + + if ((contact1 == NULL) != (contact2 == NULL)) { + return FALSE; + } + if (contact1 == contact2) { + return TRUE; + } + c1 = EMPATHY_CONTACT (contact1); + c2 = EMPATHY_CONTACT (contact2); + id1 = empathy_contact_get_id (c1); + id2 = empathy_contact_get_id (c2); + if (!tp_strdiff (id1, id2)) { + return TRUE; + } + return FALSE; +} diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h index f4418768e..f88831342 100644 --- a/libempathy/empathy-contact.h +++ b/libempathy/empathy-contact.h @@ -125,7 +125,9 @@ gboolean empathy_avatar_save_to_file (EmpathyAvatar *avatar, GHashTable * empathy_contact_get_location (EmpathyContact *contact); void empathy_contact_set_location (EmpathyContact *contact, - GHashTable *location); + GHashTable *location); +gboolean empathy_contact_equal (gconstpointer contact1, + gconstpointer contact2); G_END_DECLS diff --git a/libempathy/empathy-time.c b/libempathy/empathy-time.c index 64350404c..5a934a5e3 100644 --- a/libempathy/empathy-time.c +++ b/libempathy/empathy-time.c @@ -152,6 +152,11 @@ empathy_time_to_string_relative (time_t then) return g_strdup_printf (ngettext ("%d day ago", "%d days ago", seconds), seconds); } + else if (seconds < (60 * 60 * 24 * 30)) { + seconds /= 60 * 60 * 24 * 7; + return g_strdup_printf (ngettext ("%d week ago", + "%d weeks ago", seconds), seconds); + } else { seconds /= 60 * 60 * 24 * 30; return g_strdup_printf (ngettext ("%d month ago", diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c index 05f5291d2..99c496b23 100644 --- a/src/empathy-map-view.c +++ b/src/empathy-map-view.c @@ -56,20 +56,6 @@ typedef struct { ChamplainLayer *layer; } EmpathyMapView; -static void map_view_destroy_cb (GtkWidget *widget, - EmpathyMapView *window); -static gboolean map_view_contacts_foreach (GtkTreeModel *model, - GtkTreePath *path, - GtkTreeIter *iter, - gpointer user_data); -static void map_view_zoom_in_cb (GtkWidget *widget, - EmpathyMapView *window); -static void map_view_zoom_out_cb (GtkWidget *widget, - EmpathyMapView *window); -static void map_view_contact_location_notify (GObject *gobject, - GParamSpec *arg1, - gpointer user_data); - static void map_view_state_changed (ChamplainView *view, GParamSpec *gobject, @@ -84,112 +70,6 @@ map_view_state_changed (ChamplainView *view, ephy_spinner_stop (EPHY_SPINNER (window->throbber)); } -GtkWidget * -empathy_map_view_show (void) -{ - static EmpathyMapView *window = NULL; - GtkBuilder *gui; - GtkWidget *sw; - GtkWidget *embed; - GtkWidget *throbber_holder; - gchar *filename; - GtkTreeModel *model; - EmpathyContactList *list_iface; - EmpathyContactListStore *list_store; - - if (window) - { - empathy_window_present (GTK_WINDOW (window->window), TRUE); - return window->window; - } - - window = g_slice_new0 (EmpathyMapView); - - /* Set up interface */ - filename = empathy_file_lookup ("empathy-map-view.ui", "src"); - gui = empathy_builder_get_file (filename, - "map_view", &window->window, - "zoom_in", &window->zoom_in, - "zoom_out", &window->zoom_out, - "map_scrolledwindow", &sw, - "throbber", &throbber_holder, - NULL); - g_free (filename); - - empathy_builder_connect (gui, window, - "map_view", "destroy", map_view_destroy_cb, - "zoom_in", "clicked", map_view_zoom_in_cb, - "zoom_out", "clicked", map_view_zoom_out_cb, - NULL); - - g_object_unref (gui); - - /* Clear the static pointer to window if the dialog is destroyed */ - g_object_add_weak_pointer (G_OBJECT (window->window), (gpointer *) &window); - - list_iface = EMPATHY_CONTACT_LIST (empathy_contact_manager_dup_singleton ()); - list_store = empathy_contact_list_store_new (list_iface); - empathy_contact_list_store_set_show_groups (list_store, FALSE); - empathy_contact_list_store_set_show_avatars (list_store, TRUE); - g_object_unref (list_iface); - - window->throbber = ephy_spinner_new (); - ephy_spinner_set_size (EPHY_SPINNER (window->throbber), - GTK_ICON_SIZE_LARGE_TOOLBAR); - gtk_widget_show (window->throbber); - gtk_container_add (GTK_CONTAINER (throbber_holder), window->throbber); - - window->list_store = list_store; - - /* Set up map view */ - window->map_view = CHAMPLAIN_VIEW (champlain_view_new ()); - g_object_set (G_OBJECT (window->map_view), "zoom-level", 1, - "scroll-mode", CHAMPLAIN_SCROLL_MODE_KINETIC, NULL); - champlain_view_center_on (window->map_view, 36, 0); - - embed = champlain_view_embed_new (window->map_view); - gtk_container_add (GTK_CONTAINER (sw), - GTK_WIDGET (embed)); - gtk_widget_show_all (embed); - - window->layer = g_object_ref (champlain_layer_new ()); - champlain_view_add_layer (window->map_view, window->layer); - - g_signal_connect (window->map_view, "notify::state", - G_CALLBACK (map_view_state_changed), window); - - /* Set up contact list. */ - model = GTK_TREE_MODEL (window->list_store); - gtk_tree_model_foreach (model, map_view_contacts_foreach, window); - - empathy_window_present (GTK_WINDOW (window->window), TRUE); - return window->window; -} - -static void -map_view_destroy_cb (GtkWidget *widget, - EmpathyMapView *window) -{ - GList *item; - - item = clutter_container_get_children (CLUTTER_CONTAINER (window->layer)); - while (item != NULL) - { - EmpathyContact *contact; - ChamplainMarker *marker; - - marker = CHAMPLAIN_MARKER (item->data); - contact = g_object_get_data (G_OBJECT (marker), "contact"); - g_signal_handlers_disconnect_by_func (contact, map_view_contact_location_notify, marker); - - item = g_list_next (item); - } - - g_object_unref (window->list_store); - g_object_unref (window->layer); - g_slice_free (EmpathyMapView, window); -} - static void map_view_marker_update_position (ChamplainMarker *marker, EmpathyContact *contact) @@ -228,15 +108,53 @@ map_view_marker_update_position (ChamplainMarker *marker, } static void -map_view_contact_location_notify (GObject *gobject, +map_view_contact_location_notify (EmpathyContact *contact, GParamSpec *arg1, - gpointer user_data) + ChamplainMarker *marker) { - ChamplainMarker *marker = CHAMPLAIN_MARKER (user_data); - EmpathyContact *contact = EMPATHY_CONTACT (gobject); map_view_marker_update_position (marker, contact); } +static void +map_view_zoom_in_cb (GtkWidget *widget, + EmpathyMapView *window) +{ + champlain_view_zoom_in (window->map_view); +} + +static void +map_view_zoom_out_cb (GtkWidget *widget, + EmpathyMapView *window) +{ + champlain_view_zoom_out (window->map_view); +} + +static gboolean +marker_clicked_cb (ChamplainMarker *marker, + ClutterButtonEvent *event, + EmpathyContact *contact) +{ + GtkWidget *menu; + + if (event->button != 3) + return FALSE; + + menu = empathy_contact_menu_new (contact, + EMPATHY_CONTACT_FEATURE_CHAT | + EMPATHY_CONTACT_FEATURE_CALL | + EMPATHY_CONTACT_FEATURE_LOG | + EMPATHY_CONTACT_FEATURE_INFO); + + if (menu == NULL) + return FALSE; + + gtk_widget_show (menu); + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + event->button, event->time); + + return FALSE; +} + static gboolean map_view_contacts_foreach (GtkTreeModel *model, GtkTreePath *path, @@ -296,11 +214,16 @@ map_view_contacts_foreach (GtkTreeModel *model, champlain_marker_set_text (CHAMPLAIN_MARKER (marker), label); g_free (label); + clutter_actor_set_reactive (CLUTTER_ACTOR (marker), TRUE); + g_signal_connect (marker, "button-release-event", + G_CALLBACK (marker_clicked_cb), contact); + clutter_container_add (CLUTTER_CONTAINER (window->layer), marker, NULL); g_signal_connect (contact, "notify::location", G_CALLBACK (map_view_contact_location_notify), marker); - g_object_set_data_full (G_OBJECT (marker), "contact", g_object_ref (contact), g_object_unref); + g_object_set_data_full (G_OBJECT (marker), "contact", + g_object_ref (contact), g_object_unref); map_view_marker_update_position (CHAMPLAIN_MARKER (marker), contact); @@ -309,15 +232,108 @@ map_view_contacts_foreach (GtkTreeModel *model, } static void -map_view_zoom_in_cb (GtkWidget *widget, +map_view_destroy_cb (GtkWidget *widget, EmpathyMapView *window) { - champlain_view_zoom_in (window->map_view); + GList *item; + + item = clutter_container_get_children (CLUTTER_CONTAINER (window->layer)); + while (item != NULL) + { + EmpathyContact *contact; + ChamplainMarker *marker; + + marker = CHAMPLAIN_MARKER (item->data); + contact = g_object_get_data (G_OBJECT (marker), "contact"); + g_signal_handlers_disconnect_by_func (contact, + map_view_contact_location_notify, marker); + + item = g_list_next (item); + } + + g_object_unref (window->list_store); + g_object_unref (window->layer); + g_slice_free (EmpathyMapView, window); } -static void -map_view_zoom_out_cb (GtkWidget *widget, - EmpathyMapView *window) +GtkWidget * +empathy_map_view_show (void) { - champlain_view_zoom_out (window->map_view); + static EmpathyMapView *window = NULL; + GtkBuilder *gui; + GtkWidget *sw; + GtkWidget *embed; + GtkWidget *throbber_holder; + gchar *filename; + GtkTreeModel *model; + EmpathyContactList *list_iface; + EmpathyContactListStore *list_store; + + if (window) + { + empathy_window_present (GTK_WINDOW (window->window), TRUE); + return window->window; + } + + window = g_slice_new0 (EmpathyMapView); + + /* Set up interface */ + filename = empathy_file_lookup ("empathy-map-view.ui", "src"); + gui = empathy_builder_get_file (filename, + "map_view", &window->window, + "zoom_in", &window->zoom_in, + "zoom_out", &window->zoom_out, + "map_scrolledwindow", &sw, + "throbber", &throbber_holder, + NULL); + g_free (filename); + + empathy_builder_connect (gui, window, + "map_view", "destroy", map_view_destroy_cb, + "zoom_in", "clicked", map_view_zoom_in_cb, + "zoom_out", "clicked", map_view_zoom_out_cb, + NULL); + + g_object_unref (gui); + + /* Clear the static pointer to window if the dialog is destroyed */ + g_object_add_weak_pointer (G_OBJECT (window->window), (gpointer *) &window); + + list_iface = EMPATHY_CONTACT_LIST (empathy_contact_manager_dup_singleton ()); + list_store = empathy_contact_list_store_new (list_iface); + empathy_contact_list_store_set_show_groups (list_store, FALSE); + empathy_contact_list_store_set_show_avatars (list_store, TRUE); + g_object_unref (list_iface); + + window->throbber = ephy_spinner_new (); + ephy_spinner_set_size (EPHY_SPINNER (window->throbber), + GTK_ICON_SIZE_LARGE_TOOLBAR); + gtk_widget_show (window->throbber); + gtk_container_add (GTK_CONTAINER (throbber_holder), window->throbber); + + window->list_store = list_store; + + /* Set up map view */ + embed = gtk_champlain_embed_new (); + window->map_view = gtk_champlain_embed_get_view (GTK_CHAMPLAIN_EMBED (embed)); + g_object_set (G_OBJECT (window->map_view), "zoom-level", 1, + "scroll-mode", CHAMPLAIN_SCROLL_MODE_KINETIC, NULL); + champlain_view_center_on (window->map_view, 36, 0); + + gtk_container_add (GTK_CONTAINER (sw), embed); + gtk_widget_show_all (embed); + + window->layer = g_object_ref (champlain_layer_new ()); + champlain_view_add_layer (window->map_view, window->layer); + + g_signal_connect (window->map_view, "notify::state", + G_CALLBACK (map_view_state_changed), window); + + /* Set up contact list. */ + model = GTK_TREE_MODEL (window->list_store); + gtk_tree_model_foreach (model, map_view_contacts_foreach, window); + + empathy_window_present (GTK_WINDOW (window->window), TRUE); + return window->window; } + |