diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-06-15 19:43:33 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-06-15 19:43:33 +0800 |
commit | 779239e5698e387aa19836b3079fbad5f271c559 (patch) | |
tree | ce630d290db76eb67f30a59026685e7997ee7287 | |
parent | 65117be024913a3a6ee38b85b4c36118a99cb379 (diff) | |
parent | 468edbcfb17c5d67d945debf2f019dfd9974ccf9 (diff) | |
download | gsoc2013-empathy-779239e5698e387aa19836b3079fbad5f271c559.tar gsoc2013-empathy-779239e5698e387aa19836b3079fbad5f271c559.tar.gz gsoc2013-empathy-779239e5698e387aa19836b3079fbad5f271c559.tar.bz2 gsoc2013-empathy-779239e5698e387aa19836b3079fbad5f271c559.tar.lz gsoc2013-empathy-779239e5698e387aa19836b3079fbad5f271c559.tar.xz gsoc2013-empathy-779239e5698e387aa19836b3079fbad5f271c559.tar.zst gsoc2013-empathy-779239e5698e387aa19836b3079fbad5f271c559.zip |
Merge branch 'gseal'
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | libempathy-gtk/empathy-avatar-chooser.c | 8 | ||||
-rw-r--r-- | libempathy-gtk/empathy-chat-text-view.c | 45 | ||||
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 2 |
5 files changed, 26 insertions, 41 deletions
diff --git a/configure.ac b/configure.ac index 859c94a70..8e09f4dea 100644 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,7 @@ AC_COPYRIGHT([ # Minimal version required GLIB_REQUIRED=2.22.0 -GTK_REQUIRED=2.20.0 +GTK_REQUIRED=2.21.2 GCONF_REQUIRED=1.2.0 TELEPATHY_GLIB_REQUIRED=0.11.7 TELEPATHY_LOGGER=0.1.1 @@ -53,9 +53,9 @@ UNIQUE_REQUIRED=1.1.2 # maintainer mode is forced ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"]) GNOME_MAINTAINER_MODE_DEFINES -#if test $USE_MAINTAINER_MODE = yes; then -# AC_DEFINE(GSEAL_ENABLE, [], [Seal public structs to force usage of accessors]) -#fi +if test $USE_MAINTAINER_MODE = yes; then + AC_DEFINE(GSEAL_ENABLE, [], [Seal public structs to force usage of accessors]) +fi AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c index 6e6c28310..7a39f65f1 100644 --- a/libempathy-gtk/empathy-avatar-chooser.c +++ b/libempathy-gtk/empathy-avatar-chooser.c @@ -725,7 +725,8 @@ avatar_chooser_drag_motion_cb (GtkWidget *widget, priv = GET_PRIV (chooser); - for (p = context->targets; p != NULL; p = p->next) { + for (p = gdk_drag_context_list_targets (context); p != NULL; + p = p->next) { gchar *possible_type; possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data)); @@ -764,11 +765,12 @@ avatar_chooser_drag_drop_cb (GtkWidget *widget, priv = GET_PRIV (chooser); - if (context->targets == NULL) { + if (gdk_drag_context_list_targets (context) == NULL) { return FALSE; } - for (p = context->targets; p != NULL; p = p->next) { + for (p = gdk_drag_context_list_targets (context); + p != NULL; p = p->next) { char *possible_type; possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data)); diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c index 9e31e4987..0f7400f1d 100644 --- a/libempathy-gtk/empathy-chat-text-view.c +++ b/libempathy-gtk/empathy-chat-text-view.c @@ -333,23 +333,18 @@ chat_text_view_populate_popup (EmpathyChatTextView *view, static gboolean chat_text_view_is_scrolled_down (EmpathyChatTextView *view) { - GtkWidget *sw; - - sw = gtk_widget_get_parent (GTK_WIDGET (view)); - if (GTK_IS_SCROLLED_WINDOW (sw)) { - GtkAdjustment *vadj; - gdouble value; - gdouble upper; - gdouble page_size; - - vadj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw)); - value = gtk_adjustment_get_value (vadj); - upper = gtk_adjustment_get_upper (vadj); - page_size = gtk_adjustment_get_page_size (vadj); - - if (value < upper - page_size) { - return FALSE; - } + GtkAdjustment *vadj; + gdouble value; + gdouble upper; + gdouble page_size; + + vadj = gtk_text_view_get_vadjustment (GTK_TEXT_VIEW (view)); + value = gtk_adjustment_get_value (vadj); + upper = gtk_adjustment_get_upper (vadj); + page_size = gtk_adjustment_get_page_size (vadj); + + if (value < upper - page_size) { + return FALSE; } return TRUE; @@ -493,13 +488,8 @@ chat_text_view_size_allocate (GtkWidget *widget, if (down) { GtkAdjustment *adj; - GtkWidget *sw; - - sw = gtk_widget_get_parent (widget); - if (!GTK_IS_SCROLLED_WINDOW (sw)) - return; - adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw)); + adj = gtk_text_view_get_vadjustment (GTK_TEXT_VIEW (widget)); gtk_adjustment_set_value (adj, gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj)); @@ -677,17 +667,10 @@ chat_text_view_scroll_cb (EmpathyChatTextView *view) EmpathyChatTextViewPriv *priv; GtkAdjustment *adj; gdouble max_val; - GtkWidget *sw; priv = GET_PRIV (view); - sw = gtk_widget_get_parent (GTK_WIDGET (view)); - if (!GTK_IS_SCROLLED_WINDOW (sw)) { - chat_text_view_scroll_stop (view); - return FALSE; - } - - adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw)); + adj = gtk_text_view_get_vadjustment (GTK_TEXT_VIEW (view)); max_val = gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj); g_return_val_if_fail (priv->scroll_time != NULL, FALSE); diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index de36d6921..ae78b52cb 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -1559,8 +1559,8 @@ chat_input_key_press_event_cb (GtkWidget *widget, */ view = GTK_TEXT_VIEW (chat->input_text_view); - if (gtk_im_context_filter_keypress (view->im_context, event)) { - GTK_TEXT_VIEW (chat->input_text_view)->need_im_reset = TRUE; + if (gtk_text_view_im_context_filter_keypress (view, event)) { + gtk_text_view_reset_im_context (view); return TRUE; } diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 242cd9b6d..208306c3d 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -451,7 +451,7 @@ contact_list_view_contact_drag_received (GtkWidget *view, data = g_slice_new0 (DndGetContactData); data->new_group = new_group; data->old_group = old_group; - data->action = context->action; + data->action = gdk_drag_context_get_selected_action (context); /* FIXME: We should probably wait for the cb before calling * gtk_drag_finish */ |