empathy r1984 - in trunk: libempathy-gtk src



Author: xclaesse
Date: Tue Dec 16 09:23:59 2008
New Revision: 1984
URL: http://svn.gnome.org/viewvc/empathy?rev=1984&view=rev

Log:
Replace _get_selection_bounds by _get_has_selection

Modified:
   trunk/libempathy-gtk/empathy-chat-simple-view.c
   trunk/libempathy-gtk/empathy-chat-view.c
   trunk/libempathy-gtk/empathy-chat-view.h
   trunk/libempathy-gtk/empathy-chat.c
   trunk/src/empathy-chat-window.c

Modified: trunk/libempathy-gtk/empathy-chat-simple-view.c
==============================================================================
--- trunk/libempathy-gtk/empathy-chat-simple-view.c	(original)
+++ trunk/libempathy-gtk/empathy-chat-simple-view.c	Tue Dec 16 09:23:59 2008
@@ -746,9 +746,7 @@
 }
 
 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 @@
 	
 	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 @@
 	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;

Modified: trunk/libempathy-gtk/empathy-chat-view.c
==============================================================================
--- trunk/libempathy-gtk/empathy-chat-view.c	(original)
+++ trunk/libempathy-gtk/empathy-chat-view.c	Tue Dec 16 09:23:59 2008
@@ -106,16 +106,12 @@
 }
 
 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;
 }

Modified: trunk/libempathy-gtk/empathy-chat-view.h
==============================================================================
--- trunk/libempathy-gtk/empathy-chat-view.h	(original)
+++ trunk/libempathy-gtk/empathy-chat-view.h	Tue Dec 16 09:23:59 2008
@@ -53,9 +53,7 @@
 	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_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,

Modified: trunk/libempathy-gtk/empathy-chat.c
==============================================================================
--- trunk/libempathy-gtk/empathy-chat.c	(original)
+++ trunk/libempathy-gtk/empathy-chat.c	Tue Dec 16 09:23:59 2008
@@ -1740,7 +1740,7 @@
 	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 @@
 
 	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);

Modified: trunk/src/empathy-chat-window.c
==============================================================================
--- trunk/src/empathy-chat-window.c	(original)
+++ trunk/src/empathy-chat-window.c	Tue Dec 16 09:23:59 2008
@@ -656,14 +656,13 @@
 	}
 
 	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->current_chat->input_text_view));
-	if (gtk_text_buffer_get_selection_bounds (buffer, NULL, NULL)) {
+	if (gtk_text_buffer_get_has_selection (buffer)) {
 		gtk_widget_set_sensitive (priv->menu_edit_copy, TRUE);
 		gtk_widget_set_sensitive (priv->menu_edit_cut, TRUE);
 	} else {
 		gboolean selection;
 
-		selection = empathy_chat_view_get_selection_bounds (priv->current_chat->view, 
-								   NULL, NULL);
+		selection = empathy_chat_view_get_has_selection (priv->current_chat->view);
 
 		gtk_widget_set_sensitive (priv->menu_edit_cut, FALSE);
 		gtk_widget_set_sensitive (priv->menu_edit_copy, selection);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]