aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-12-16 17:23:59 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-12-16 17:23:59 +0800
commit6bc52fff8a6d0b0a2f40fb707d1e423ce64249a3 (patch)
treea28fee7adb1fc6e8da6a37db74a9e02e3681e412 /libempathy-gtk
parente8032530b2520ad3c700c404f2822bd406100552 (diff)
downloadgsoc2013-empathy-6bc52fff8a6d0b0a2f40fb707d1e423ce64249a3.tar
gsoc2013-empathy-6bc52fff8a6d0b0a2f40fb707d1e423ce64249a3.tar.gz
gsoc2013-empathy-6bc52fff8a6d0b0a2f40fb707d1e423ce64249a3.tar.bz2
gsoc2013-empathy-6bc52fff8a6d0b0a2f40fb707d1e423ce64249a3.tar.lz
gsoc2013-empathy-6bc52fff8a6d0b0a2f40fb707d1e423ce64249a3.tar.xz
gsoc2013-empathy-6bc52fff8a6d0b0a2f40fb707d1e423ce64249a3.tar.zst
gsoc2013-empathy-6bc52fff8a6d0b0a2f40fb707d1e423ce64249a3.zip
Replace _get_selection_bounds by _get_has_selection
svn path=/trunk/; revision=1984
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat-simple-view.c8
-rw-r--r--libempathy-gtk/empathy-chat-view.c10
-rw-r--r--libempathy-gtk/empathy-chat-view.h8
-rw-r--r--libempathy-gtk/empathy-chat.c6
4 files changed, 11 insertions, 21 deletions
diff --git a/libempathy-gtk/empathy-chat-simple-view.c b/libempathy-gtk/empathy-chat-simple-view.c
index 13cce79b4..186317d57 100644
--- a/libempathy-gtk/empathy-chat-simple-view.c
+++ b/libempathy-gtk/empathy-chat-simple-view.c
@@ -746,9 +746,7 @@ chat_simple_view_scroll (EmpathyChatView *view,
}
static gboolean
-chat_simple_view_get_selection_bounds (EmpathyChatView *view,
- GtkTextIter *start,
- GtkTextIter *end)
+chat_simple_view_get_has_selection (EmpathyChatView *view)
{
GtkTextBuffer *buffer;
@@ -756,7 +754,7 @@ chat_simple_view_get_selection_bounds (EmpathyChatView *view,
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
- return gtk_text_buffer_get_selection_bounds (buffer, start, end);
+ return gtk_text_buffer_get_has_selection (buffer);
}
static void
@@ -1223,7 +1221,7 @@ chat_view_iface_init (EmpathyChatViewIface *iface)
iface->set_margin = chat_simple_view_set_margin;
iface->scroll = chat_simple_view_scroll;
iface->scroll_down = chat_simple_view_scroll_down;
- iface->get_selection_bounds = chat_simple_view_get_selection_bounds;
+ iface->get_has_selection = chat_simple_view_get_has_selection;
iface->clear = chat_simple_view_clear;
iface->find_previous = chat_simple_view_find_previous;
iface->find_next = chat_simple_view_find_next;
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index dbf9cafcb..bb0db85e1 100644
--- a/libempathy-gtk/empathy-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -106,16 +106,12 @@ empathy_chat_view_scroll (EmpathyChatView *view,
}
gboolean
-empathy_chat_view_get_selection_bounds (EmpathyChatView *view,
- GtkTextIter *start,
- GtkTextIter *end)
+empathy_chat_view_get_has_selection (EmpathyChatView *view)
{
g_return_val_if_fail (EMPATHY_IS_CHAT_VIEW (view), FALSE);
- if (EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->get_selection_bounds) {
- return EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->get_selection_bounds (view,
- start,
- end);
+ if (EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->get_has_selection) {
+ return EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->get_has_selection (view);
}
return FALSE;
}
diff --git a/libempathy-gtk/empathy-chat-view.h b/libempathy-gtk/empathy-chat-view.h
index a96b114b2..1c4bd32cb 100644
--- a/libempathy-gtk/empathy-chat-view.h
+++ b/libempathy-gtk/empathy-chat-view.h
@@ -53,9 +53,7 @@ struct _EmpathyChatViewIface {
void (*scroll) (EmpathyChatView *view,
gboolean allow_scrolling);
void (*scroll_down) (EmpathyChatView *view);
- gboolean (*get_selection_bounds) (EmpathyChatView *view,
- GtkTextIter *start,
- GtkTextIter *end);
+ gboolean (*get_has_selection) (EmpathyChatView *view);
void (*clear) (EmpathyChatView *view);
gboolean (*find_previous) (EmpathyChatView *view,
const gchar *search_criteria,
@@ -88,9 +86,7 @@ void empathy_chat_view_append_event (EmpathyChatView *view,
void empathy_chat_view_scroll (EmpathyChatView *view,
gboolean allow_scrolling);
void empathy_chat_view_scroll_down (EmpathyChatView *view);
-gboolean empathy_chat_view_get_selection_bounds (EmpathyChatView *view,
- GtkTextIter *start,
- GtkTextIter *end);
+gboolean empathy_chat_view_get_has_selection (EmpathyChatView *view);
void empathy_chat_view_clear (EmpathyChatView *view);
gboolean empathy_chat_view_find_previous (EmpathyChatView *view,
const gchar *search_criteria,
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 6d2cb0118..ec6a46664 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1740,7 +1740,7 @@ empathy_chat_cut (EmpathyChat *chat)
g_return_if_fail (EMPATHY_IS_CHAT (chat));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
- if (gtk_text_buffer_get_selection_bounds (buffer, NULL, NULL)) {
+ if (gtk_text_buffer_get_has_selection (buffer)) {
GtkClipboard *clipboard;
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
@@ -1756,13 +1756,13 @@ empathy_chat_copy (EmpathyChat *chat)
g_return_if_fail (EMPATHY_IS_CHAT (chat));
- if (empathy_chat_view_get_selection_bounds (chat->view, NULL, NULL)) {
+ if (empathy_chat_view_get_has_selection (chat->view)) {
empathy_chat_view_copy_clipboard (chat->view);
return;
}
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
- if (gtk_text_buffer_get_selection_bounds (buffer, NULL, NULL)) {
+ if (gtk_text_buffer_get_has_selection (buffer)) {
GtkClipboard *clipboard;
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);