Updating branch refs/heads/master
         to 2563fc285fb1b58ee9c7984b9a710b5668ef3c10 (commit)
       from a0b89f341abe283462ad6f5c476b9d37ee644774 (commit)

commit 2563fc285fb1b58ee9c7984b9a710b5668ef3c10
Author: Nick Schermer <[email protected]>
Date:   Wed Apr 4 18:42:18 2007 +0000

        * 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.
    
    (Old svn revision: 25382)

 ChangeLog                      |   16 +++++++++++++---
 mousepad/mousepad-document.c   |   28 +++++++++++++++-------------
 mousepad/mousepad-search-bar.c |   18 ++++++++----------
 mousepad/mousepad-window.c     |   24 ++++++++++++------------
 po/POTFILES.in                 |   16 +++++++++++++++-
 5 files changed, 63 insertions(+), 39 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bd78621..cddff48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,19 @@
 2007-04-04     Nick Schermer <[email protected]>
+       * 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 <[email protected]>
 
        * 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,8 +22,8 @@
        * 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 <[email protected]>
 
diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c
index a538dc5..65d1f29 100644
--- a/mousepad/mousepad-document.c
+++ b/mousepad/mousepad-document.c
@@ -436,10 +436,10 @@ mousepad_document_toggle_overwrite (GtkTextView      
*textview,
 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_document_find (MousepadDocument    *document,
 
   _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 @@ mousepad_document_delete_selection (MousepadDocument 
*document)
 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 @@ mousepad_document_select_all (MousepadDocument *document)
 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 @@ void
 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 @@ mousepad_document_line_numbers (MousepadDocument *document,
   *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;
 }
 
 
diff --git a/mousepad/mousepad-search-bar.c b/mousepad/mousepad-search-bar.c
index 733b22b..8bf889d 100644
--- a/mousepad/mousepad-search-bar.c
+++ b/mousepad/mousepad-search-bar.c
@@ -302,16 +302,14 @@ mousepad_search_bar_find_string (MousepadSearchBar 
*search_bar,
 
   /* 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);
diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index 66af452..1acb2c1 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -1526,16 +1526,16 @@ mousepad_window_recent_escape_underscores (const gchar 
*str)
       next = g_utf8_next_char (str);
 
       switch (*str)
-                   {
-                           case '_':
-                                   g_string_append (result, "__");
-                                   break;
-                           default:
-                                   g_string_append_len (result, str, next - 
str);
-                                   break;
-                   }
-
-                 str = next;
+        {
+          case '_':
+            g_string_append (result, "__");
+            break;
+          default:
+            g_string_append_len (result, str, next - str);
+            break;
+        }
+
+      str = next;
     }
 
   return g_string_free (result, FALSE);
@@ -2434,9 +2434,9 @@ void
 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))
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b144c68..6a2bb24 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -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
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to