1. 01 Mar, 2016 1 commit
  2. 24 Feb, 2011 1 commit
  3. 19 Feb, 2011 1 commit
  4. 03 Jan, 2011 1 commit
  5. 21 Sep, 2009 1 commit
  6. 24 Jun, 2009 1 commit
    • Daniel Elstner's avatar
      Fix build with recent glibmm releases · a78ad731
      Daniel Elstner authored
      * src/filebuffer.cc (FileBuffer::on_mark_deleted): Use swap() to
      reset Glib::RefPtr<> because neither clear() nor reset() can be
      relied upon to be there.
      * src/filetree.cc (FileTree::save_file_at_iter): ditto,
      (FileTree::find_matches_at_path_iter): ditto,
      (FileTree::on_selection_changed): ditto.
      a78ad731
  7. 16 Jan, 2007 1 commit
  8. 14 Jan, 2007 2 commits
    • Daniel Elstner's avatar
      Clean up the code a bit. In particular, change occurrences of · 4fa17b0f
      Daniel Elstner authored
      * src/filetree.{cc,h}: Clean up the code a bit.  In particular,
      change occurrences of Gtk::TreePath to Gtk::TreeModel::Path.
      * src/filetreeprivate.{cc,h}: Likewise.
      
      * src/sharedptr.h (Util::SharedPtr::SharedPtr): Inline.
      (Util::SharedPtr::~SharedPtr): Remove assertion and inline.
      * src/sharedptr.cc: Remove now empty file.
      
      * Makefile.am (src_regexxer_SOURCES): Remove src/sharedptr.cc.
      
      svn path=/trunk/; revision=634
      4fa17b0f
    • Daniel Elstner's avatar
      Move function to the global namespace. Putting it inside an anonymous · 1aecc9f9
      Daniel Elstner authored
      * src/filetree.cc (regexxer_create_file_tree): Move function to
      the global namespace.  Putting it inside an anonymous namespace
      just obfuscated the code, as this function is exported for the
      world to see.
      * src/statusline.cc (regexxer_create_status_line): Likewise.
      
      svn path=/trunk/; revision=633
      1aecc9f9
  9. 13 Jan, 2007 1 commit
    • Daniel Elstner's avatar
      :find_recursively): Replace uses of Glib::filename_display_name() by · 28d68a4f
      Daniel Elstner authored
      * src/filetree.cc (FileTree::find_recursively): Replace uses of
      Glib::filename_display_name() by Glib::filename_display_basename()
      to enable translation of well-known locations in future.  Store
      the full path in the directory stack.
      (FileTree::find_fill_dirstack): Convert the full path from the
      stack to a displayable name with Glib::filename_display_basename().
      (FileTree::save_file_at_iter): Determine the basename for
      use in the error message with Glib::filename_display_basename().
      
      * src/mainwindow.cc (MainWindow::set_title_filename): Call
      Glib::filename_display_basename() to get the filename to be
      displayed in the window title.
      
      * src/filetreeprivate.{cc,h}: Some early spring cleaning.
      
      svn path=/trunk/; revision=630
      28d68a4f
  10. 11 Jan, 2007 1 commit
    • Daniel Elstner's avatar
      :create_with_error_message): Use UTF-8 encoded typographically correct · ab2411fc
      Daniel Elstner authored
      * src/filebuffer.cc (FileBuffer::create_with_error_message): Use
      UTF-8 encoded typographically correct apostrophe in the title
      string.
      * src/filetree.cc (FileTree::find_recursively): Replace call to
      Util::filename_to_utf8_fallback() by Glib::filename_display_name().
      (FileTree::find_fill_dirstack): Likewise.
      (FileTree::save_file_at_iter): Use UTF-8 encoded typographically
      correct quote characters in the error message string.
      (FileTree::load_file_with_fallback): Likewise.
      
      * src/pcreshell.cc (throw_regex_error): New function to throw a
      Pcre::Error exception with a properly formatted error message.
      (Pcre::Pattern::Pattern): Use throw_regex_error().
      
      * src/prefdialog.cc (PrefDialog::on_entry_fallback_activate):
      Use proper Unicode quotes in error message string.
      
      * src/mainwindow.cc (MainWindow::initialize): Run the search
      automatically only if also a filename pattern has been specified
      on the command line.
      (MainWindow::confirm_quit_request): Use proper Unicode apostrophe
      in the error message.
      (MainWindow::on_find_files): Likewise.  Also remove the code to
      format an error message for regex exceptions, as Pcre::Error now
      already carries a user-friendly message.
      (MainWindow::set_title_filename): Replace calls to
      Util::filename_to_utf8_fallback() by Glib::filename_display_name().
      
      * src/stringutils.{cc,h} (Util::shell_pattern_to_regex): Minor
      optimization twiddling.
      (Util::substitute_references): Likewise.
      (Util::filename_to_utf8_fallback): Remove function, as we can
      now simply use Glib::filename_display_name() instead.
      (Util::convert_to_ascii): Remove; no longer used anywhere.
      (Util::shorten_pathname): Use G_IS_DIR_SEPARATOR() instead of
      comparing against G_DIR_SEPARATOR directly.  Necessary because
      on win32 both '/' and '\' are accepted as directory separators.
      
      * ui/regexxer.schemas.in: Reformat and use proper Unicode quotes
      and apostrophes.
      * ui/prefdialog.glade: Likewise.  Also remove some property
      specifications which assigned default values anyway.
      * ui/mainwindow.glade: As above, strip pointless property settings.
      
      * en.po: Remove English "translation" as proper Unicode quotes and
      apostrophes are now used directly in the untranslated messages.
      * LINGUAS: Remove "en" from list.
      * POTFILES.in: Prepend [encoding: UTF-8] to list of files.
      
      svn path=/trunk/; revision=623
      ab2411fc
  11. 06 Jan, 2007 1 commit
    • Daniel Elstner's avatar
      Update copyright notice: The postal address of the Free Software · 7335f7fb
      Daniel Elstner authored
      * src/*.{cc,h}: Update copyright notice:  The postal address of
      the Free Software Foundation changed, and my email address too.
      Also, remove the statement I had inserted which explicitely
      disallowed using a later version of the license.  I think I do
      not have to ask for permission from contributors, since the
      copyright notice only mentions me as the copyright holder, so
      technically everyone automatically transferred her copyright
      to me.  Anyway, the change is utterly minor and the notice now
      matches what everyone else is using.
      Also use the opportunity to get rid of the version control
      substitutions and the trailing empty line in every file.
      * ui/aboutdialog.glade: Update my email address.
      
      svn path=/trunk/; revision=589
      7335f7fb
  12. 21 Nov, 2006 1 commit
  13. 14 Jul, 2004 1 commit
    • Daniel Elstner's avatar
      :find_matches): Add a feedback slot parameter and invoke it for every · 36bfa838
      Daniel Elstner authored
      * src/filebuffer.{cc,h} (FileBuffer::find_matches): Add a feedback
      slot parameter and invoke it for every matching line.  The current
      line number and the subject string are passed as arguments to the
      feedback slot.
      
      * src/filetree.{cc,h} (FileTree::signal_feedback): New signal.
      (FileTree::find_matches_at_path_iter): Pass a feedback slot to
      FileBuffer::find_matches() that forwards to signal_feedback()
      with the fileinfo object bound as third argument.
      
      * src/mainwindow.{cc,h} (print_location): New handler for the
      feedback signal which prints the location of the match to standard
      output, in the same format as used by 'grep -n'.
      (InitState::feedback): New bool member.
      (MainWindow::initialize): Connect the filetree's signal_feedback
      to print_location if the init state's feedback flag is true.
      
      * src/main.cc (parse_command_line): Add the --line-number command
      line argument, intended to work just like the grep equivalent.
      36bfa838
  14. 05 Jul, 2004 1 commit
    • Daniel Elstner's avatar
      :find_matches_at_path_iter): Use reference arguments instead of pointers. · 1f7800c0
      Daniel Elstner authored
      * src/filetree.{cc,h} (FileTree::find_matches_at_path_iter): Use
      reference arguments instead of pointers.  Make use of sigc::ref()
      to bind a reference argument to a signal handler.
      (FileTree::replace_matches_at_path_iter): ditto
      (FileTree::save_file_at_iter): Likewise.  Also get rid of the
      on-demand creation of error_list, because it's unnecessary and
      not exception-safe.  The caller is responsible for instantiating
      the MessageList now.
      1f7800c0
  15. 19 Jun, 2004 1 commit
    • Daniel Elstner's avatar
      Add -DGTKMM_DISABLE_DEPRECATED. · 3ef92965
      Daniel Elstner authored
      * src/Makefile.am (global_defines): Add -DGTKMM_DISABLE_DEPRECATED.
      
      * src/filetree.cc (FileTree::FileTree): Replace the deprecated
      set_sort_column_id() by set_sort_column().
      * src/filetreeprivate.cc
      (FileTree::ScopedBlockSorting::ScopedBlockSorting): ditto
      (FileTree::ScopedBlockSorting::~ScopedBlockSorting): ditto.
      
      * src/mainwindow.cc (MainWindow::on_go_next): Use scroll_to()
      in place of the deprecated scroll_to_mark().
      3ef92965
  16. 16 Jun, 2004 1 commit
    • Daniel Elstner's avatar
      Include <libglademm/xml.h> instead of the whole <libglademm.h> to save a · d1535787
      Daniel Elstner authored
      * src/aboutdialog.cc: Include <libglademm/xml.h> instead of the
      whole <libglademm.h> to save a tiny bit of compile time.
      * src/controller.cc: ditto.
      
      * src/filebuffer.cc: Same here, and also replace <gconfmm.h> by
      <gconfmm/client.h>.
      * src/filetree.cc: ditto
      * src/mainwindow.cc: ditto
      * src/prefdialog.cc: ditto.
      d1535787
  17. 09 Jun, 2004 3 commits
    • Daniel Elstner's avatar
      :find_add_file): Create the FileInfo object in advance before inserting · ebef5405
      Daniel Elstner authored
      * src/filetree.cc (FileTree::find_add_file): Create the FileInfo
      object in advance before inserting the new row in order to improve
      exception safety.
      (FileTree::find_fill_dirstack): Same here for the DirInfo object.
      ebef5405
    • Daniel Elstner's avatar
      :next_match_file): Move code from FileTree::next_match_file() here. · 046e063b
      Daniel Elstner authored
      * src/filetreeprivate.{cc,h} (FileTreePrivate::next_match_file):
      Move code from FileTree::next_match_file() here.
      (FileTreePrivate::prev_match_file):
      Move code from FileTree::prev_match_file() here.
      
      * src/filetree.{cc,h} (FileTree::next_match_file): Remove.
      (FileTree::prev_match_file): Remove.
      046e063b
    • Daniel Elstner's avatar
      :next_match_file): Replace the collapse_stack parameter by a single · 7101175f
      Daniel Elstner authored
      * src/filetree.{cc,h} (FileTree::next_match_file): Replace the
      collapse_stack parameter by a single Gtk::TreeModel::Path pointer,
      because we really don't have to collapse each expanded child row
      explicitely.  Simplify the implementation accordingly.
      (FileTree::prev_match_file): ditto.
      (FileTree::select_next_file): Get rid of the collapse_stack
      container and use a simple Gtk::TreeModel::Path variable instead.
      7101175f
  18. 08 Jun, 2004 1 commit
    • Daniel Elstner's avatar
      :find_add_file): New method. Move the actual file-adding parts from · 67ae46c5
      Daniel Elstner authored
      * src/filetree.{cc,h} (FileTree::find_add_file): New method.
      Move the actual file-adding parts from find_check_file() here.
      (FileTree::find_recursively): Move the file testing previously
      done in find_check_file() into this method in order to make the
      recursion more obvious.  Also handle Glib::Dir exceptions right
      here, so that the caller doesn't have to handle them.
      (FileTree::find_files): Remove the try/catch block enclosing the
      call to find_recursively().  We no longer need to do it twice.
      (FileTree::find_check_file): Remove.
      67ae46c5
  19. 03 Jun, 2004 1 commit
  20. 01 Jun, 2004 8 commits
    • Daniel Elstner's avatar
      :find_files): Slightly clarify the call to Gtk::TreePath's constructor. · 27f9931a
      Daniel Elstner authored
      * src/filetree.cc (FileTree::find_files): Slightly clarify
      the call to Gtk::TreePath's constructor.
      27f9931a
    • Daniel Elstner's avatar
      :expand_and_select): Replace the calls to TreeSelection::select() and · 842bd708
      Daniel Elstner authored
      * src/filetree.cc (FileTree::expand_and_select): Replace the
      calls to TreeSelection::select() and TreeView::scroll_to_row()
      by a single TreeView::set_cursor() call.
      (FileTree::find_files): After the tree has been filled in, the
      first call to expand_and_select() doesn't always scroll to the
      selected row (no matter if set_cursor() or scroll_to_row() is
      used there).  Explicitely scroll to the first row after filling
      the tree to work around this problem.
      842bd708
    • Daniel Elstner's avatar
      :load_file_with_fallback): Get the UTF-8 encoded basename from the · 3a7bba4f
      Daniel Elstner authored
      * src/filetree.cc (FileTree::load_file_with_fallback): Get the
      UTF-8 encoded basename from the filename column of the tree model
      instead of stripping and converting fileinfo->fullname all over
      again.
      3a7bba4f
    • Daniel Elstner's avatar
      :find_increment_file_count): There is no need for the reverse_iterator · 231b4cb1
      Daniel Elstner authored
      * src/filetree.cc (FileTree::find_increment_file_count): There
      is no need for the reverse_iterator abstraction here -- just use
      plain iterators and decrement them.
      231b4cb1
    • Daniel Elstner's avatar
      :prev_match_file): As it turns out keeping track of the parent iterator · 42393d3d
      Daniel Elstner authored
      * src/filetree.cc (FileTree::prev_match_file): As it turns out
      keeping track of the parent iterator does have some merit.  While
      there was nothing wrong with the previous change, I discovered
      that the parent's children can be indexed in order to obtain an
      iterator pointing to the previous row.  At least for deep trees
      this is likely to be faster than resolving the whole path via
      Gtk::TreeModel::get_iter().
      42393d3d
    • Daniel Elstner's avatar
      :prev_match_file): There is no need to keep track of the parent iterator; · 2a02038b
      Daniel Elstner authored
      * src/filetree.cc (FileTree::prev_match_file): There is no need to
      keep track of the parent iterator; just use Gtk::TreePath::size()
      and TreePath::up().  Also use TreePath::push_back() instead of the
      deprecated TreePath::append_index().
      2a02038b
    • Daniel Elstner's avatar
      :find_matches_at_path_iter): Rename from find_matches_at_iter(): add a · ff3a7767
      Daniel Elstner authored
      * src/filetree.{cc,h} (FileTree::find_matches_at_path_iter):
      Rename from find_matches_at_iter(): add a path parameter and
      use it instead of obtaining the path from the iter argument.
      (FileTree::replace_matches_at_path_iter): Rename from
      replace_matches_at_iter(): add a path parameter and use it.
      (FileTree::find_matches): Use TreeModel::foreach() rather than
      foreach_iter() in order to gain a minor performance improvement
      by taking advantage of the supplied Gtk::TreePath.
      (FileTree::replace_all_matches): ditto.
      ff3a7767
    • Daniel Elstner's avatar
      :on_treestore_rows_reordered): New signal handler which updates the match · 03e0df4a
      Daniel Elstner authored
      * src/filetree.{cc,h} (FileTree::on_treestore_rows_reordered):
      New signal handler which updates the match boundaries defined by
      the [path_match_first_, path_match_last_] range.  Previously this
      has been handled in on_treestore_sort_column_changed(), which is
      unfortunately called before the actual sorting takes place.
      (FileTree::on_treestore_sort_column_changed): Remove.
      (FileTree::FileTree): Connect to signal_rows_reordered() instead
      of signal_sort_column_changed().
      03e0df4a
  21. 31 May, 2004 1 commit
    • Daniel Elstner's avatar
      :instance): New static method which replaces the filetree_columns() · bbd42ddc
      Daniel Elstner authored
      * src/filetreeprivate.{cc,h} (FileTreeColumns::instance): New
      static method which replaces the filetree_columns() function,
      for consistency with RegexxerTags::instance().
      (filetree_columns): Remove.
      
      * src/filetree.cc: Replace all instances of filetree_columns()
      with FileTreeColumns::instance().
      bbd42ddc
  22. 30 May, 2004 1 commit
  23. 27 May, 2004 1 commit
    • Daniel Elstner's avatar
      On failure, don't fall back to the locale encoding anymore but straight to · 5052d823
      Daniel Elstner authored
      * src/stringutils.cc (filename_to_utf8_fallback): On failure,
      don't fall back to the locale encoding anymore but straight to
      plain ASCII.  Thus from now on, this function will never throw
      for errors of type ConvertError::ILLEGAL_SEQUENCE.  Also cover
      the new G_FILENAME_ENCODING variable in the warning message.
      
      * src/filetree.cc (FileTree::find_files): Remove the explicit
      handling of Glib::ConvertError.
      5052d823
  24. 25 May, 2004 2 commits
  25. 21 May, 2004 3 commits
    • Daniel Elstner's avatar
      New exception class. · 981ba25d
      Daniel Elstner authored
      * src/fileio.h (ErrorBinaryFile): New exception class.
      
      * src/fileio.cc (load_iochannel): Throw ErrorBinaryFile if the
      input stream contains '\0' bytes, rather than just returning a
      null pointer.
      (load_file): Throw ErrorBinaryFile if the file could not be
      loaded in either of the specified encodings.
      
      * src/filetree.cc (FileTree::load_file_with_fallback): Handle
      the ErrorBinaryFile exception.
      981ba25d
    • Daniel Elstner's avatar
      :replace_all_matches): Substitute Gtk::TreeIter with · 30dce6a1
      Daniel Elstner authored
      * src/filetree.cc (FileTree::replace_all_matches): Substitute
      Gtk::TreeIter with Gtk::TreeModel::iterator for consistency.
      30dce6a1
    • Daniel Elstner's avatar
      :replace_all_matches): Make sure path_match_first_ points to the first · f16081e8
      Daniel Elstner authored
      * src/filetree.cc (FileTree::replace_all_matches): Make sure
      path_match_first_ points to the first file that still has matches
      after a replace operation was interrupted.
      f16081e8
  26. 17 May, 2004 2 commits
    • Daniel Elstner's avatar
      :FileTree): Make the file column take up available space with · 2a537cbb
      Daniel Elstner authored
      * src/filetree.cc (FileTree::FileTree): Make the file column
      take up available space with set_expand(true).
      2a537cbb
    • Daniel Elstner's avatar
      Bump version to 0.8. (PKG_CHECK_MODULES): Require gconfmm-2.6 >= 2.6.1. · c43b74d7
      Daniel Elstner authored
      * configure.ac (AC_INIT): Bump version to 0.8.
      (PKG_CHECK_MODULES): Require gconfmm-2.6 >= 2.6.1.
      (REGEXXER_GCONFMM_VALUE_HACK): Remove.
      
      * src/miscutils.{cc,h}
      (check_for_broken_gconfmm_value_changed): Remove.
      (has_broken_gconfmm_value_changed): Remove.
      
      * src/main.cc (main): Remove call to gconfmm bug runtime test.
      
      * src/filebuffer.cc (on_config_value_changed): Remove hack.
      * src/filetree.cc (on_config_value_changed): ditto
      * src/mainwindow.cc (on_config_value_changed): ditto.
      * src/prefdialog.{cc,h} (on_config_value_changed_hack): Remove.
      c43b74d7