[Xfce4-commits] r25382 - in mousepad/branches/nick_0_3: . mousepad po

Nick Schermer nick at xfce.org
Wed Apr 4 20:42:18 CEST 2007


Author: nick
Date: 2007-04-04 18:42:18 +0000 (Wed, 04 Apr 2007)
New Revision: 25382

Modified:
   mousepad/branches/nick_0_3/ChangeLog
   mousepad/branches/nick_0_3/mousepad/mousepad-document.c
   mousepad/branches/nick_0_3/mousepad/mousepad-search-bar.c
   mousepad/branches/nick_0_3/mousepad/mousepad-window.c
   mousepad/branches/nick_0_3/po/POTFILES.in
Log:
	* po/: Update the POTFILES.in file and regenerate the pot file.
	* mousepad/mousepad-document.c: Make the scroll offset smaller, so the
	  textview doesn't jump around while searching.
	* mousepad/mousepad-search-bar.c: Make sure the search signal is send
	  when the search field is empty after a backspace, so no text is selected in
	  the buffer.
	* Remove some leftover tabs.
	* mousepad/mousepad-{search-bar,document,window).*: Added function for
	* Various performance improvements and code cleanups.

Modified: mousepad/branches/nick_0_3/ChangeLog
===================================================================
--- mousepad/branches/nick_0_3/ChangeLog	2007-04-04 18:35:50 UTC (rev 25381)
+++ mousepad/branches/nick_0_3/ChangeLog	2007-04-04 18:42:18 UTC (rev 25382)
@@ -1,9 +1,19 @@
 2007-04-04	Nick Schermer <nick at xfce.org>
+	* po/: Update the POTFILES.in file and regenerate the pot file.
+	* mousepad/mousepad-document.c: Make the scroll offset smaller, so the
+	  textview doesn't jump around while searching.
+	* mousepad/mousepad-search-bar.c: Make sure the search signal is send
+	  when the search field is empty after a backspace, so no text is selected in
+	  the buffer.
+	* Remove some leftover tabs.
 
+
+2007-04-04	Nick Schermer <nick at xfce.org>
+
 	* configure.in.in: Mousepad does not depend on exo anymore. Only
 	  when you run in maintainer-mode, exo-csource is required.
 	* mousepad/mousepad-document.*: Renamed mousepad-screen to mousepad-document.
-	* mousepad/mousepad-{search-bar,document,window).*: Added function for 
+	* mousepad/mousepad-{search-bar,document,window).*: Added function for
 	  searching, including the type-ahead search bar.
 	* mousepad/mousepad-statusbar.*: A custom statusbar suitable for displaying
 	  the tooltips, overwrite/insert and the line- and column-number.
@@ -12,9 +22,9 @@
 	* mousepad/mousepad-marshal.list: Custom marshal for sending search signals.
 	* mousepad/mousepad-types.h: Search types (a mousepad-enum-types.{c,h} is
 	  generated during build).
-	* Various performance inprovements and code cleanups.
-	
+	* Various performance improvements and code cleanups.
 
+
 2007-03-03	Nick Schermer <nick at xfce.org>
 
 	* mousepad/mousepad-dialogs.{c,h}: Add response actions for Mousepad so it's

Modified: mousepad/branches/nick_0_3/mousepad/mousepad-document.c
===================================================================
--- mousepad/branches/nick_0_3/mousepad/mousepad-document.c	2007-04-04 18:35:50 UTC (rev 25381)
+++ mousepad/branches/nick_0_3/mousepad/mousepad-document.c	2007-04-04 18:42:18 UTC (rev 25382)
@@ -436,10 +436,10 @@
 static void
 mousepad_document_scroll_to_visible_area (MousepadDocument *document)
 {
-	/* scroll to visible area */
+  /* scroll to visible area */
   gtk_text_view_scroll_to_mark (document->textview,
                                 gtk_text_buffer_get_insert (document->buffer),
-                                0.25, FALSE, 0.0, 0.0);
+                                0.02, FALSE, 0.0, 0.0);
 }
 
 
@@ -686,11 +686,13 @@
 
   _mousepad_return_val_if_fail (MOUSEPAD_IS_DOCUMENT (document), FALSE);
   _mousepad_return_val_if_fail (GTK_IS_TEXT_BUFFER (document->buffer), FALSE);
+  _mousepad_return_val_if_fail (string != NULL, FALSE);
 
   /* get the bounds */
   gtk_text_buffer_get_bounds (document->buffer, &doc_start, &doc_end);
   gtk_text_buffer_get_selection_bounds (document->buffer, &sel_start, &sel_end);
 
+  /* set the correct starting point for the search */
   if (flags & MOUSEPAD_SEARCH_FORWARDS)
     {
       start = sel_end;
@@ -873,9 +875,9 @@
 void
 mousepad_document_select_all (MousepadDocument *document)
 {
-	GtkTextIter start, end;
+  GtkTextIter start, end;
 
-	/* get the start and end iter */
+  /* get the start and end iter */
   gtk_text_buffer_get_bounds (document->buffer, &start, &end);
 
   /* select everything between those iters */
@@ -887,10 +889,10 @@
 void
 mousepad_document_focus_textview (MousepadDocument *document)
 {
-	_mousepad_return_if_fail (MOUSEPAD_IS_DOCUMENT (document));
+  _mousepad_return_if_fail (MOUSEPAD_IS_DOCUMENT (document));
 
-	/* focus the textview */
-	gtk_widget_grab_focus (GTK_WIDGET (document->textview));
+  /* focus the textview */
+  gtk_widget_grab_focus (GTK_WIDGET (document->textview));
 }
 
 
@@ -899,12 +901,12 @@
 mousepad_document_jump_to_line (MousepadDocument *document,
                                 gint              line_number)
 {
-	GtkTextIter iter;
+  GtkTextIter iter;
 
-	_mousepad_return_if_fail (MOUSEPAD_IS_DOCUMENT (document));
+  _mousepad_return_if_fail (MOUSEPAD_IS_DOCUMENT (document));
 
-	/* move the cursor */
-	gtk_text_buffer_get_iter_at_line (document->buffer, &iter, line_number-1);
+  /* move the cursor */
+  gtk_text_buffer_get_iter_at_line (document->buffer, &iter, line_number-1);
   gtk_text_buffer_place_cursor (document->buffer, &iter);
 
   /* make sure the cursor is in the visible area */
@@ -941,8 +943,8 @@
   *current_line = gtk_text_iter_get_line (&iter) + 1;
 
   /* get the last line number */
-	gtk_text_buffer_get_end_iter (document->buffer, &iter);
-	*last_line = gtk_text_iter_get_line (&iter) + 1;
+  gtk_text_buffer_get_end_iter (document->buffer, &iter);
+  *last_line = gtk_text_iter_get_line (&iter) + 1;
 }
 
 

Modified: mousepad/branches/nick_0_3/mousepad/mousepad-search-bar.c
===================================================================
--- mousepad/branches/nick_0_3/mousepad/mousepad-search-bar.c	2007-04-04 18:35:50 UTC (rev 25381)
+++ mousepad/branches/nick_0_3/mousepad/mousepad-search-bar.c	2007-04-04 18:42:18 UTC (rev 25382)
@@ -302,17 +302,15 @@
 
   /* get the entry string */
   string = gtk_entry_get_text (GTK_ENTRY (search_bar->entry));
-  if (string != NULL && *string != '\0')
-    {
-      /* send the signal and wait for the result */
-      g_signal_emit (G_OBJECT (search_bar), search_bar_signals[FIND_STRING], 0,
-                     string, flags, &result);
-    }
-  else
-    {
-      result = TRUE;
-    }
 
+  /* send the signal and wait for the result */
+  g_signal_emit (G_OBJECT (search_bar), search_bar_signals[FIND_STRING], 0,
+                 string, flags, &result);
+
+  /* make sure the search entry is not red when no text was typed */
+  if (string == NULL || *string == '\0')
+    result = TRUE;
+
   /* change the entry style */
   mousepad_search_bar_nothing_found (search_bar, !result);
 }

Modified: mousepad/branches/nick_0_3/mousepad/mousepad-window.c
===================================================================
--- mousepad/branches/nick_0_3/mousepad/mousepad-window.c	2007-04-04 18:35:50 UTC (rev 25381)
+++ mousepad/branches/nick_0_3/mousepad/mousepad-window.c	2007-04-04 18:42:18 UTC (rev 25382)
@@ -1526,16 +1526,16 @@
       next = g_utf8_next_char (str);
 
       switch (*str)
-		    {
-			    case '_':
-				    g_string_append (result, "__");
-				    break;
-			    default:
-				    g_string_append_len (result, str, next - str);
-				    break;
-		    }
+        {
+          case '_':
+            g_string_append (result, "__");
+            break;
+          default:
+            g_string_append_len (result, str, next - str);
+            break;
+        }
 
-		  str = next;
+      str = next;
     }
 
   return g_string_free (result, FALSE);
@@ -2434,9 +2434,9 @@
 mousepad_gtk_set_tooltip (GtkWidget   *widget,
                           const gchar *tooltip)
 {
-	static GtkTooltips *tooltips = NULL;
+  static GtkTooltips *tooltips = NULL;
 
-	_mousepad_return_if_fail (GTK_IS_WIDGET (widget));
+  _mousepad_return_if_fail (GTK_IS_WIDGET (widget));
 
   /* allocate the shared tooltips on-demand */
   if (G_UNLIKELY (tooltips == NULL))

Modified: mousepad/branches/nick_0_3/po/POTFILES.in
===================================================================
--- mousepad/branches/nick_0_3/po/POTFILES.in	2007-04-04 18:35:50 UTC (rev 25381)
+++ mousepad/branches/nick_0_3/po/POTFILES.in	2007-04-04 18:42:18 UTC (rev 25382)
@@ -1,6 +1,20 @@
+#
+# Sources
+#
 mousepad/main.c
 mousepad/mousepad-application.c
 mousepad/mousepad-dbus.c
+mousepad/mousepad-dialogs.c
+mousepad/mousepad-document.c
+mousepad/mousepad-exo.c
+mousepad/mousepad-file.c
 mousepad/mousepad-preferences.c
-mousepad/mousepad-textview.c
+mousepad/mousepad-search-bar.c
+mousepad/mousepad-statusbar.c
+mousepad/mousepad-view.c
 mousepad/mousepad-window.c
+
+#
+# Desktop Files
+#
+Mousepad.desktop.in.in
\ No newline at end of file



More information about the Xfce4-commits mailing list