1. 06 Jan, 2007 2 commits
    • Daniel Elstner's avatar
      :on_about): Replace custom about dialog with stock GTK+ one. · 0ec5e36d
      Daniel Elstner authored
      * src/mainwindow.{cc,h} (MainWindow::on_about): Replace custom
      about dialog with stock GTK+ one.
      (on_about_dialog_response): Rename from on_about_dialog_hide().
      Add unused function parameter for the response ID.
      * src/aboutdialog.{cc,h}: Remove now superfluous files.
      * ui/aboutdialog.glade: Likewise.
      
      * Makefile.am (src_regexxer_SOURCES): Remove src/aboutdialog.{cc,h}
      from the list of source files.
      (dist_pkgdata_DATA): Remove ui/aboutdialog.glade from list.
      * configure.ac (REGEXXER_MODULES): Require gtkmm 2.6, in which the
      stock about dialog first appeared.
      
      * POTFILES.in: Remove ui/aboutdialog.glade.
      
      svn path=/trunk/; revision=594
      0ec5e36d
    • 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
  2. 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
  3. 13 Jul, 2004 2 commits
    • Daniel Elstner's avatar
      :autorun_idle): New method which first invokes the file search and the · 58c000c7
      Daniel Elstner authored
      * src/mainwindow.{cc,h} (MainWindow::autorun_idle): New method
      which first invokes the file search and the regex search after
      that, unless the user hit the Stop button in between.
      (MainWindow::initialize): Connect Glib::signal_idle() to the new
      autorun_idle() method instead of controller_.find_files.slot().
      (MainWindow::busy_action_leave): Don't reset busy_action_cancel_
      so that autorun_idle() can test this flag to determine whether
      the busy action was cancelled by the user.
      58c000c7
    • Daniel Elstner's avatar
      Make sure the preprocessor directives in the test program start in the · 7fb371e9
      Daniel Elstner authored
      * macros/pcre.m4 (PCRE_CHECK_UTF8): Make sure the preprocessor
      directives in the test program start in the first column, just
      in case we do hit on some ancient compiler that requires it.
      
      * macros/misc.m4 (REGEXXER_LIB_POPT): New macro that checks
      whether libpopt and popt.h are available and usable.
      
      * configure.ac: Use REGEXXER_LIB_POPT().
      * src/Makefile.am (regexxer_LDADD): Add $(POPT_LIBS).
      
      * src/mainwindow.{cc,h} (InitState): New struct that defines
      the initial state of main window's entry boxes and check buttons.
      (MainWindow::initialize): New method to initialize the UI elements
      with the values defined by a InitState object.
      
      * src/translation.{cc,h} (initialize_gettext): Remove the call to
      bind_textdomain_codeset().
      (enable_utf8_gettext): New function that calls
      bind_textdomain_codeset() if available.  The separation became
      necessary in order to allow for the command line help message to
      be printed to the console in locale encoding.
      
      * src/main.cc (parse_command_line): New function which parses the
      command line arguments and returns an InitState object.
      (main): Invoke parse_command_line(), enable_utf8_gettext() and
      MainWindow::initialize() as appropriate.
      7fb371e9
  4. 29 Jun, 2004 2 commits
    • Daniel Elstner's avatar
      New string constant defining the name of the selection to use for the · a4366774
      Daniel Elstner authored
      * src/mainwindow.cc (selection_clipboard): New string constant
      defining the name of the selection to use for the clipboard.
      (MainWindow::on_cut): Use the selection_clipboard constant.
      (MainWindow::on_copy): ditto
      (MainWindow::on_paste): ditto.
      a4366774
    • Daniel Elstner's avatar
      :edit_actions): Rename from clip_actions. (Controller::erase): Add action. · 72c80d30
      Daniel Elstner authored
      * src/controller.{cc,h} (Controller::edit_actions): Rename from
      clip_actions.
      (Controller::erase): Add action.
      (Controller::load_xml): Fetch cut, copy, paste and delete menu
      items from the glade file.
      
      * src/mainwindow.{cc,h} (MainWindow::on_{cut,copy,paste,erase}):
      Add and implement new signal handlers.
      (MainWindow::connect_signals): Connect the cut, copy, paste and
      erase actions to the new signal handlers.
      (MainWindow::on_filetree_switch_buffer): Enable or disable the
      edit actions based on the editability of the file buffer.
      72c80d30
  5. 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
  6. 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
  7. 08 Jun, 2004 1 commit
  8. 30 May, 2004 2 commits
    • Daniel Elstner's avatar
      :on_conf_value_changed): Remove "using namespace Gtk" directive which · 85bef70b
      Daniel Elstner authored
      * src/mainwindow.cc (MainWindow::on_conf_value_changed): Remove
      "using namespace Gtk" directive which became pointless after the
      last change.
      85bef70b
    • Daniel Elstner's avatar
      Remove configuration option because it doesn't seem to be necessary · ff38f48d
      Daniel Elstner authored
      * regexxer.schemas.in (override_direction): Remove configuration
      option because it doesn't seem to be necessary anymore.  That is,
      the current GTK+ release gets the direction of Latin text in RTL
      locales right now.
      
      * src/globalstrings.h (conf_key_override_direction): Remove.
      * src/mainwindow.cc (MainWindow::on_conf_value_changed): Remove
      the code that handles the "override_direction" config option.
      * src/prefdialog.{cc,h} (PrefDialog): ditto.
      * ui/prefdialog.glade (button_override_direction): Remove.
      ff38f48d
  9. 28 May, 2004 2 commits
    • Daniel Elstner's avatar
      :get_folder_fullname): New method that expands the entered folder name and · a34715f3
      Daniel Elstner authored
      * src/mainwindow.{cc,h} (MainWindow::get_folder_fullname): New
      method that expands the entered folder name and converts it to
      filename encoding.  An error message is displayed to the user
      if the conversion fails.
      (MainWindow::on_select_folder): Use get_folder_fullname().
      (MainWindow::on_find_files): ditto.
      a34715f3
    • Daniel Elstner's avatar
      Operate directly in filename encoding since all callers need to convert · 9fdeba17
      Daniel Elstner authored
      * src/stringutils.{cc,h} (expand_pathname): Operate directly in
      filename encoding since all callers need to convert one way or
      the other anyway.  Change type of parameter and return value to
      std::string accordingly.
      (shorten_pathname): ditto.
      
      * src/mainwindow.cc (MainWindow::MainWindow): Reverse order of
      the calls to filename_to_utf8_fallback() and shorten_pathname().
      (MainWindow::on_select_folder): ditto
      (MainWindow::on_find_files): ditto.
      
      * src/mainwindow.{cc,h} (MainWindow::set_title_filename): Change
      parameter type to std::string and call filename_to_utf8_fallback().
      Also remove the default argument from the declaration, and get rid
      of the logic that handles the empty string.
      (MainWindow::MainWindow): Call window_->set_title() directly in
      order to set the default title, instead of passing an empty string
      to set_title_filename().
      (MainWindow::on_filetree_switch_buffer): ditto.
      9fdeba17
  10. 21 May, 2004 2 commits
  11. 20 May, 2004 2 commits
    • Daniel Elstner's avatar
      Break apart a couple of uber-long lines. · 335699cb
      Daniel Elstner authored
      * src/mainwindow.cc: Break apart a couple of uber-long lines.
      335699cb
    • Daniel Elstner's avatar
      New string constant which defines the package title string plus · cc61618f
      Daniel Elstner authored
      * src/aboutdialog.cc (package_title): New string constant which
      defines the package title string plus surrounding markup.
      (AboutDialog::create): Use the separated package_title constant.
      
      * src/aboutdialog.{cc,h} (AboutDialog::create): Change the return
      type to std::auto_ptr<Gtk::Dialog> because copying-destroys-source
      is just what we want.   Calling release() to achieve exactly that
      was a silly idea to begin with.
      cc61618f
  12. 19 May, 2004 1 commit
    • Daniel Elstner's avatar
      Make glade-2 replace its old-style magic "class names" with proper · adcc91c8
      Daniel Elstner authored
      * ui/mainwindow.glade (toolbar): Make glade-2 replace its old-style
      magic "class names" with proper GtkToolItem and derivated elements.
      Note that you'll need to apply the patch for #142761 in order to
      make changing the toolbar style at runtime work.
      (combo_pattern): Replace deprecated GtkCombo with GtkComboBoxEntry.
      
      * src/controller.cc (ControlItem::add_widgets): Allow for both
      Gtk::ToolButton and Gtk::Button widgets, and detect at runtime
      which type to use.
      
      * src/mainwindow.cc (MainWindow::load_xml): Due to #142755, we
      currently have to use get_child() on combo_pattern to gain access
      to the entry widget.  Also, a hack was necessary to attach the
      tooltip to the entry without instantiating another Gtk::Tooltips
      object.
      
      * src/mainwindow.h: Remove a couple of unused forward declarations.
      adcc91c8
  13. 18 May, 2004 1 commit
  14. 17 May, 2004 1 commit
    • 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
  15. 16 May, 2004 2 commits
    • Daniel Elstner's avatar
      Use Gtk::FileChooserDialog instead of the old Gtk::FileSelection. · ccde4929
      Daniel Elstner authored
      * src/mainwindow.cc (on_select_folder): Use Gtk::FileChooserDialog
      instead of the old Gtk::FileSelection.
      ccde4929
    • Daniel Elstner's avatar
      Removes the <requires lib="gnome"/> line that was inserted by buggy · 797604cf
      Daniel Elstner authored
      2004-05-16  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* ui/prefdialog.glade: Removes the <requires lib="gnome"/> line
      	that was inserted by buggy glade-2.
      
      2004-05-14  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/filetree.cc: Replace instances of `...' in message strings
      	with "...".  Since the translator is supposed to use double-quotes
      	it would be confusing to use single quotes in the original string.
      	* src/mainwindow.cc: ditto
      	* src/prefdialog.cc: ditto.
      
      2004-05-14  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* ui/mainwindow.glade (button_find_files): Use a custom image and
      	label instead of a stock item as button content, so that it can be
      	more clearly distinguished from button_find_matches.
      
      2004-05-13  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* ui/mainwindow.glade: Reintroduce tearoff menu items by manually
      	inserting the necessary XML elements.
      
      2004-05-12  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/fileio.cc: Remove the libgnome-vfsmm code already enclosed
      	by #if 0 ... #endif.  It's all in the CVS history anyway.
      	* src/filetree.cc: ditto.
      
      2004-05-12  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/imagebutton.{cc,h}: Remove files as they're no longer used.
      	* src/Makefile.am (regexxer_SOURCES): Remove imagebutton.{cc,h}.
      
      2004-05-10  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/globalstrings.h (glade_mainwindow_filename): New string.
      
      	* src/mainwindow.{cc,h}: Use libglademm to load the UI at runtime,
      	and make the actual Gtk::Window a member of class MainWindow.
      	Remove the old UI creation code.
      
      	* src/controller.{cc,h} (Controller::load_xml): The menu bar,
      	toolbar and action area is now contained in mainwindow.glade,
      	and thus this new method wholly replaces the old code which
      	generated those widgets.
      	(ControlItem::add_widgets): New helper method intented to help
      	reducing the code size.
      
      	* src/filetree.cc (regexxer_create_file_tree): New function.
      	* src/statusline.cc (regexxer_create_status_line): New function.
      
      	* src/main.cc (main): Access the Gtk::Window by using the new
      	accessor method Regexxer::MainWindow::get_window().
      
      2004-05-10  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* ui/mainwindow.glade: New file defining the main window's UI.
      	* ui/Makefile.am (dist_glade_DATA): Add mainwindow.glade.
      
      2004-05-10  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/globalstrings.h (glade_aboutdialog_filename): New string.
      
      	* src/aboutdialog.{cc,h}: Use libglademm to load the dialog UI
      	at runtime, and replace class AboutDialog by a single create()
      	function in namespace Regexxer::AboutDialog.  Remove the old
      	UI creation code.
      
      	* src/mainwindow.{cc,h} (MainWindow::about_dialog_): Change type
      	to std::auto_ptr<Gtk::Dialog> since AboutDialog no longer exists.
      	Replace all references to AboutDialog in the implementation too.
      	(MainWindow::on_about): Make use of the new AboutDialog::create().
      
      2004-05-10  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* ui/aboutdialog.glade: New file defining the UI of the about
      	dialog.
      	* ui/Makefile.am (dist_glade_DATA): Add aboutdialog.glade.
      
      2004-05-10  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/prefdialog.cc (PrefDialog::load_xml): Remove superfluous
      	sub-block.
      
      2004-05-10  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/prefdialog.cc (regexxer_create_font_selection_button):
      	Add missing parameters to the function signature.
      	(regexxer_create_color_selection_button): ditto.
      
      2004-05-10  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/Makefile.am (global_defines): Define REGEXXER_PKGDATADIR.
      
      	* src/globalstrings.h (glade_prefdialog_filename): New string.
      
      	* src/prefdialog.{cc,h}: Use libglademm to load the dialog UI
      	at runtime, and make the actual dialog widget a data member of
      	class PrefDialog.  Remove the old UI creation code.
      
      	* src/mainwindow.cc (MainWindow::on_preferences): Use the new
      	PrefDialog::get_dialog() accessor to get the actual widget.
      
      2004-05-10  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* ui: New directory for glade XML files.
      	* ui/.cvsignore: New file.
      	* ui/Makefile.am: New file.
      	* ui/prefdialog.glade: New file defining the UI of the preferences
      	dialog.
      
      	* configure.ac (PKG_CHECK_MODULES): Check for libglademm-2.0.
      	(AC_CONFIG_FILES): Add ui/Makefile.
      
      	* Makefile.am (SUBDIRS): Add ui.
      
      0.7:
      
      2004-05-08  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* AUTHORS: Add Murray Cumming.
      	* NEWS: Update.
      
      2004-05-08  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/translation.{cc,h} (sgettext): Ditch the sgettext() approach,
      	because it's not likely to be supported by libglade when regexxer
      	starts using that at some point.  Until now there are no ambiguous
      	messages in regexxer, and we can switch back when the need arises.
      
      	* src/controller.cc: Remove the disambiguing "...|" prefix from all
      	translatable messages.
      	* src/filebuffer.cc: ditto
      	* src/filetree.cc: ditto
      	* src/mainwindow.cc: ditto
      	* src/prefdialog.cc: ditto
      	* src/statusline.cc: ditto.
      
      2004-05-07  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/main.cc (stock_icon_info): Rename to 'stock_icon_about',
      	as it should have been called in the first place.  Apparently
      	I misinterpreted a change in the German GNOME translation as
      	project-wide switch to a new name for "About".  Now I realize
      	why Murray changed that string a while ago...
      
      	* src/controller.{cc,h} (Controller::info): Rename to 'about'.
      	* src/mainwindow.{cc,h} (MainWindow::on_info): Rename to 'on_about'.
      
      2004-05-06  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/translation.cc (compose_impl): Simplify the loop in order to
      	avoid the need for look-ahead via Util::next().
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/translation.cc (compose_impl): Apparently there's no need
      	to use Glib::Unicode::isdigit() since digit_value() is defined to
      	return -1 for non-digits anyway.
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/translation.{cc,h} (compose): Add a set of overloaded utility
      	functions to be used to compose a text message from a format string
      	and up to three string arguments.  This allows the translator to
      	arrange the arguments as required by the language.
      
      	* src/filetree.cc (FileTree::save_file_at_iter): Make use of
      	Util::compose() instead of separately piecing strings together.
      	Also, translate the format string via gettext().
      	(load_file_with_fallback): ditto
      	* src/mainwindow.cc (MainWindow::on_exec_search): ditto
      	* src/prefdialog.cc (PrefDialog::on_entry_fallback_activate):
      	ditto.
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/miscutils.cc: Compile the runtime check for that gconfmm
      	bug only if REGEXXER_ENABLE_GCONFMM_VALUE_HACK is defined, as it
      	currently always is.
      
      	* src/main.cc (main): Test for REGEXXER_ENABLE_GCONFMM_VALUE_HACK
      	around the call to Util::check_for_broken_gconfmm_value_changed().
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/translation.{cc,h} (initialize_gettext): New utility
      	function to take care of setting up the text domain.
      
      	* src/main.cc (main): Use initialize_gettext().
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* ABOUT-NLS: Add missing file to fix the build.
      
      	* src/aboutdialog.cc: Translate all user-visible strings except
      	for those instances where positional parameter substitution is
      	required for proper results.  I'll deal with those ones later.
      	* src/controller.cc: ditto
      	* src/filebuffer.cc: ditto
      	* src/filetree.cc: ditto
      	* src/main.cc: ditto
      	* src/mainwindow.cc: ditto
      	* src/pcreshell.cc: ditto
      	* src/prefdialog.cc: ditto
      	* src/statusline.cc: ditto.
      
      	* src/translation.h (N_): #define to gettext_noop(s) rather than
      	simply (s).  This doesn't actually make a difference but I think
      	the intent is clearer that way.
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	Add support for message translation via gettext.
      
      	* po: New directory, containing all the gettext stuff.
      	* config.rpath: New file added by gettextize.
      	* mkinstalldirs: ditto.
      
      	* Makefile.am (dist_noinst_SCRIPTS): Add config.rpath.
      
      	* autogen.sh: Don't remove mkinstalldirs because it's not
      	installed by automake --add-missing, and gettext uses it.
      	(WARNINGS): Comment-out in order to reduce the flood of warnings
      	triggered by all the old m4 code in system macros.
      
      	* configure.ac: Invoke AM_GNU_GETTEXT().
      	(AC_CONFIG_FILES): Add po/Makefile.in.
      
      	* NEWS: Update.
      
      	* src/translation.{cc,h}: New files implementing gettext() support.
      	* src/statusline.cc: Translate the label of the "Stop" button.
      	* src/main.cc (main): Add code to initialize the text domain.
      
      	* src/Makefile.am (regexxer_SOURCES): Add translation.{cc,h}.
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/miscutils.{cc,h} (check_for_broken_gconfmm_value_changed):
      	Implement a truly evil run-time check for that gconfmm bug.
      	Although this one is already fixed in CVS, there's no release out
      	yet and for now I wouldn't like regexxer to depend on it anyway.
      	(has_broken_gconfmm_value_changed): Provide an accessor function
      	to the global flag indicating whether gconfmm is broken.
      
      	* src/main.cc (main): Call check_for_broken_gconfmm_value_changed().
      
      	* configure.ac (REGEXXER_GCONFMM_VALUE_HACK): Make this macro
      	call has_broken_gconfmm_value_changed() to determine whether the
      	work-around has to be applied.
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/filebuffer.cc (FileBuffer::replace_match): Invoke on_insert()
      	directly in case of empty-by-empty replace in order to avoid this
      	nasty special-case where a FileBufferActionRemoveMatch object in
      	the stack is not followed by either an insert or an erase action.
      	This finally fixes the last one of undo system bugs known to me.
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* configure.ac (AC_INIT): Bump version number to 0.7.
      
      2004-05-05  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* src/*.{cc,h}: Apply a minor change of my coding style.  From
      	now on, I put a space between a keyword and the following opening
      	parenthesis.  That is, after for, while, if, switch and catch, with
      	sizeof being the only (I think rather intuitive) exception.
      
      	* src/globalstrings.h: New file containing (you guess it) global
      	string definitions.  Currently these are mostly fully qualified
      	GConf key names.
      
      	* src/configdata.{cc,h}: Delete, as we're now using GConf.
      
      	* src/Makefile.am (regexxer_SOURCES): Modify accordingly.
      
      	* src/aboutdialog.cc: Prefix URL and mail strings with U+202D
      	LEFT-TO-RIGHT OVERRIDE in order to avoid the current mess in
      	RTL environments.
      	(ContributorBox::ContributorBox): Escape the 'what' string by
      	passing it to Glib::Markup::escape_text(), just in case.
      
      	* src/controller.cc (add_widget_button): Reverse parameters
      	for consistency with the other helper functions.
      	(Controller::create_action_area): Make the implementation reflect
      	this change.
      
      	* src/filebuffer.{cc,h} (RegexxerTags::on_conf_value_changed):
      	New signal handler listening to GConf value changes.
      	(RegexxerTags::instance): Return the RefPtr<> by value rather
      	than by reference, because as it turns out the extra indirection
      	largely offsets the advantage gained by avoiding one additional
      	ref/unref cycle.
      	(FileBuffer::set_match_color): Remove; this setter is no longer
      	necessary since we're now listing to GConf changes and apply them
      	immediately.
      	(set_current_color): ditto
      	(get_match_color): ditto
      	(get_current_color): ditto.
      	(FileBuffer::weak_undo_stack_): Introduce a new data member used to
      	record all UndoAction objects that reference MatchData instances.
      	This is unfortunately necessary in order to be able to remove
      	UndoActions without actually doing the undo operation, for instance
      	when running find_matches() again.
      	(notify_weak_undos): New function dealing with the weak references.
      	(undo_add_weak): ditto
      	(undo_remove_weak): ditto.
      	(signal_match_count_changed): Remove the count argument as this
      	information can easily be obtained by using the appropriate getter.
      	(create_with_error_message): Invoke Unicode::ispunct() instead of
      	testing for '.' explicitely.
      	(is_freeable): Return true only if there are no UndoAction objects
      	around referencing this FileBuffer.
      	(find_matches): Call notify_weak_undos() to get rid of any
      	references by UndoAction objects to this FileBuffer.
      	(get_line_preview): Make this method strongly exception-safe.
      	(on_apply_tag): New virtual method implementation, needed in order
      	to filter tag apply operations caused by inserting from clipboard.
      	This avoids confusion caused by highlighting text as match which
      	is not recorded as such internally.
      
      	* src/undostack.{cc,h}: Provide a way to interrupt a running undo
      	operation (i.e. by clicking the 'Stop' button in the GUI).
      	(do_undo): Add a slot parameter for this purpose.
      	(undo): ditto.
      
      	* src/filebufferundo.{cc,h} (do_undo): Make use of the new slot
      	parameter in order to allow for interuption of the undo process.
      	(FileBufferActionRemoveMatch): Make use of the weak notification
      	mechanism now provided by FileBuffer.
      
      	* src/fileshared.h (MatchData::get_match_length): Remove this
      	pointless accessor function.
      
      	* src/fileshared.cc (MatchData::~MatchData): Be extra careful
      	and remove the quark pointing to the MatchData instance from the
      	mark object.
      
      	* src/filetree.{cc,h} (FileTree::on_conf_value_changed): New
      	signal handler listening to GConf value changes.
      	(set_fallback_encoding): Remove this now pointless accessor.
      	(get_fallback_encoding): ditto.
      	(expand_and_select): Get rid of compatibility code for GTK+ < 2.2.
      	(on_buffer_match_count_changed): Adapt to the changes made to
      	FileBuffer::signal_match_count_changed.
      
      	* src/filetreeprivate.cc (collatekey_sort_func): Use std::memcmp()
      	instead of std::strcmp() as the former allows for inlining of the
      	string operation by gcc.
      	(FileTree::BufferActionShell::do_undo): Make use of the new slot
      	parameter in order to allow for interuption of the undo process.
      
      	* src/main.cc (set_default_window_icon): New name, formerly
      	regexxer_set_window_icon().  Replace the pixbuf list stuff with
      	a simple call to Gtk::Window::set_default_icon_from_file().
      	(trap_gconf_exceptions): New global exception handler callback,
      	invoked whenever an exception escapes from a C++ handler of
      	a GObject signal.  Our particular handler is used to filter any
      	Gnome::Conf::Error exceptions, thus in essence ignoring them.
      	This way we don't need to deal with exceptions in each handler
      	of the GConf "value_changed" signal.
      	(initialize_configuration): New function to be invoked by main()
      	in order to load the initial configuration values.  By emitting
      	an artificial "value_changed" signal for each entry in regexxer's
      	GConf directory, the need for separate initialization code for
      	each key is neatly avoided.
      	(main): Accomodate the changes listed above.
      
      	* src/mainwindow.{cc,h} (MainWindow::on_conf_value_changed):
      	New signal handler listening to GConf value changes.
      	(on_preferences): Remove all the code dealing with individual
      	configuration values, since we're now using a decentralized change
      	notification approach instead.
      	(load_configuration): Ditch this.
      	(save_configuration): ditto.
      	(confirm_quit_request): Honor the fact that the new GTK+ file
      	selector doesn't append '/' to directories anymore.  This bug
      	is quite annoying and should have been fixed months ago :/
      	Also widen the dialog's default size to 400 pixels.
      	(on_buffer_match_count_changed): Remove, there's no need to
      	listen for this on the FileBuffer because the FileTree is
      	reflecting these changes anyway.
      	(on_buffer_bound_state_changed): ditto.
      	(on_bound_state_changed): Because there's only one now, rename
      	from on_filetree_bound_state_changed().
      	(on_filetree_match_count_changed): Take care of the FileBuffer
      	match count as well.
      	(on_go_next): Replace the 0.2 delta passed to scroll_to_mark()
      	with 0.125, as the latter looks nicer to my eyes and also happens
      	to be a 'round' number in base 2.
      	(on_undo): Accomodate the changes made to the UndoAction classes
      	in order to allow for interruption of the running undo process.
      	Also instantiate a BusyAction object for this purpose.
      	(undo_stack_clear): New method.
      	(set_title_filename): Replace the plain '-' by U+2013 EN DASH.
      
      	* src/miscutils.{cc,h} (gtk_version_at_least): Remove since it's
      	no longer used.
      
      	* src/pcreshell.{cc,h}: To my astonisment I found out that the
      	source of my constant trouble with libpcre and UTF-8 text was
      	caused by pcre_study() alone!  The great thing is of course that
      	simply not using that silly function is all that's needed to get
      	rid of this constant source of mayhem.
      	(escape_non_ascii): Remove, since no longer needed.
      	(translate_to_char_offset): Get rid of this one too.
      	(byte_to_char_offset): New little helper function.
      	(check_for_single_byte_escape): The "\C" escape sequence seems
      	to be only thing we still have to take care of manually.  This
      	particular sequence matches a single byte even of a multi-byte
      	character, and thus is likely to cause hell to break loose.
      	(Pattern::pcre_extra_): Remove.
      	(Pattern::Pattern): Get rid of the pcre_study() call, and
      	make use of the new check_for_single_byte_escape() function.
      	(Pattern::~Pattern): No need to free pcre_extra_ anymore.
      	(Pattern::match): Throw an exception if the regular expression
      	exceeds the recursion and backtracking limit of libpcre.
      	(CompileOptions): Implement the remaining bit manipulation
      	operators for completeness.
      	(MatchOptions): ditto.
      
      	* src/prefdialog.{cc,h} (get_toolbar_style_index): New helper
      	function.
      	(FontSelectionButton::set_selected_font): Take the font name
      	rather than a Pango::FontDescription object as parameter.
      	(get_selected_font): Likewise for the return type.
      	(PrefDialog::button_direction_): New Gtk::CheckButton member,
      	allowing users of RTL environments to override the direction
      	of regexxer's file editor alone.
      	(on_conf_value_changed): New signal handler listening to
      	GConf value changes.
      	(initialize_configuration): New function to load the initial
      	settings immediately after creation of the preference dialog.
      	Works just like the identically named function in main.cc,
      	except that it invokes on_conf_value_changed() directly instead
      	of triggering the global "value_changed" signal.
      	(on_textview_font_selected): Set the appropriate GConf key
      	instead of using the old internal signal feedback mechanism.
      	(on_match_color_selected): ditto
      	(on_current_color_selected): ditto
      	(on_option_toolbar_style_changed): ditto
      	(on_entry_fallback_activate): ditto.
      	(on_button_direction_toggled): New method.
      	(signal_pref_textview_font_changed): Remove.
      	(signal_pref_match_color_changed): Remove.
      	(signal_pref_current_color_changed): Remove.
      	(signal_pref_toolbar_style_changed): Remove.
      	(signal_pref_fallback_encoding_changed): Remove.
      	(on_entry_fallback_changed): Record that entry content was changed
      	by setting the boolean entry_fallback_changed_ flag.  This is just
      	to avoid superfluous commits to the GConf database every time the
      	preference dialog is closed.
      	(on_response): Evaluate entry_fallback_changed_ (see above),
      	and make sure no Gnome::Conf::Error exceptions escape from
      	on_entry_fallback_activate().
      	(create_page_look): Move the signal handler setup to the ctor.
      	(create_page_file): ditto.
      
      	* src/statusline.cc (CounterBox::CounterBox): Catch possible
      	exceptions when applying the locale to the stream object, in
      	order to avoid crashing if the user's locale is invalid.
      
      	* src/stringutils.cc (apply_modifiers): Modify the code a bit
      	to reduce the number of string copies made.
      	(parse_control_char): Add a 'dest' output parameter to avoid
      	returning a string by value.
      	(parse_hex_unichar): ditto
      	(parse_oct_unichar): ditto.
      	(parse_capture_index): New helper function to deal with both
      	"$1" and "${1}"-style references in the substitution string.
      	(validate_encoding): Simplify.  Also, don't accept any error
      	codes but NO_CONVERSION.
      	(encodings_equal): No longer use std::find_if() since it really
      	doesn't make the code any simpler in this particular case.
      	(trim_whitespace): Remove; no longer used.
      	(shell_pattern_to_regex): Various performance improvements.
      	Also take care of a possible trailing backslash to avoid escaping
      	the "\z" appended by regexxer itself.
      	(substitute_references): Restructure the loop a bit, and accomodate
      	the changes made to the parse_*_char() functions mentioned above.
      	Also, avoid the need for ascii_isodigit() in the default branch by
      	simply adding all 8 octal digits as case labels.
      	(int_to_string): Catch any exceptions that might occur when
      	applying the locale to the stream.  This could happen if the
      	user's default locale is invalid.
      	(transform_pathname): Replace this silly 2-in-1 function by
      	separate shorten_pathname() and expand_pathname() implementations.
      	There really is no need to cache the home directory in a static
      	variable.
      	(shorten_pathname): Implement separately rather than forwarding
      	to transform_pathname().
      	(expand_pathname): ditto.
      	(enum_from_nick): New utility function to convert the 'nick'
      	of a particular enumeration value to the actual integer value.
      	This of course requires the the enumeration type to be registered
      	via the GObject type system.
      	(enum_to_nick): Likewise, but the other way around.
      	(enum_from_nick_impl): Non-template implementation part.
      	(enum_to_nick_impl): ditto.
      
      2004-05-04  Daniel Elstner  <daniel.elstner@gmx.net>
      
      	* macros/cxx.m4: Make use of the new AS_IF() macro, and also
      	improve the portability of the shell code a bit.
      
      	* macros/pcre.m4: Ditto.
      
      	* macros/misc.m4: New file, introducing a REGEXXER_PKG_PATH_PROG
      	macro which can be used to look for executables that might live
      	in subdirectories indicated by pkg-config output.
      
      	* autogen.sh: Some minor shell coding-style improvements.
      
      	* configure.ac: Invoke the new REGEXXER_PKG_PATH_PROG macro in
      	order to look for gdk-pixbuf-csource.  Use the new macro to look
      	for gconftool-2 as well.
      	(AC_CHECK_HEADERS): Remove the tests for sys/types.h, sys/stat.h,
      	umask() and mode_t since they're no longer necessary.
      	(PKG_CHECK_MODULES): Substitute the GTKMM prefix by PKG (I don't
      	like MM_DEPS as introduced by Murray in HEAD.)  Also, get rid of
      	the libgnomevfsmm dependency.
      	(REGEXXER_ENABLE_GCONFMM_VALUE_HACK): New preprocessor macro to
      	be inserted into config.h.  This isn't actually used yet, I'll
      	get to that later.
      
      	* regexxer.schemas: New file.
      
      	* Makefile.am: Add rules taking care of the installation of the
      	GConf schema file.
      	(dist_schema_DATA): Add regexxer.schemas to the distribution.
      	(dist_noinst_DATA): Ditto for macros/misc.m4.
      	(DISTCHECK_CONFIGURE_FLAGS): Include --disable-schemas-install.
      
      	* src/Makefile.am: Reflect the substitution of GTKMM by PKG made
      	in configure.ac.
      	(AM_CPPFLAGS): Use this variable in place of regexxer_CPPFLAGS,
      	because executable-specific CFLAGS is not something regexxer ever
      	intended to use.
      
      	* src/main.cc: Get rid of the libgnomevfsmm dependency.  For one
      	thing, the code using it didn't actually work with remote URIs.
      	For another, as of now there's no stable release of this library
      	in sight, no to mention a widely distributed release.
      
      	* src/fileio.cc (load_try_encoding): Comment-out the gnomevfs code
      	and replace it with the original Glib::IOChannel code instead.
      	(save_file): ditto.
      
      	* src/filetree.cc (find_recursively): Comment-out and replace with
      	the previous non-gnomevfs code.
      797604cf
  16. 04 Apr, 2004 1 commit
  17. 29 Nov, 2003 1 commit
    • Murray Cumming's avatar
      regexxer now depends on gconfmm. Removed the check for 2.2-specific · 7895d37f
      Murray Cumming authored
      2003-11-29  Murray Cumming  <murrayc@usa.net>
      
              * configure.ac: regexxer now depends on gconfmm. Removed the check
              for 2.2-specific features.
              * Remoevd all gtkmm 2.2-specific #ifdefs because 2.2 is everywhere
              now..
              * src/configdata.[h|cc]: Changed the implemention to use GConfmm
              instead of the text file.
      7895d37f
  18. 31 Oct, 2003 1 commit
  19. 01 Jan, 2003 1 commit
    • daniel_e's avatar
      (on_hide): For safety, transfer ownership of the preferences and about dialogs · e1ea3914
      daniel_e authored
      into local variables, rather than invoking hide() to delete them.  That way
      delete won't be called before hide() actually returned.
      
      (on_about_dialog_hide): Don't use std::auto_ptr<>::reset() but transfer
      ownership into local variables.  I had a look at the libstdc++-v3 headers and
      it gave me the creeps -- reset() deletes _before_ assigning the new pointer.
      
      (on_preferences): ditto.
      e1ea3914
  20. 30 Dec, 2002 1 commit
  21. 28 Dec, 2002 1 commit
    • daniel_e's avatar
      New function that translates the error offset returned by pcre_compile() · e028d367
      daniel_e authored
      * src/pcreshell.cc (translate_to_char_offset): New function that translates
      the error offset returned by pcre_compile() to a character offset into the
      original regex.  This became necessary since due to the recent introduction
      of escape_non_ascii(), and is more robust anyway.
      
      * src/mainwindow.cc (on_exec_search): Deal with character offsets instead of
      byte offsets.  Also, set the regex entry's selection on the character where
      the error occurred.
      e028d367
  22. 25 Dec, 2002 1 commit
    • daniel_e's avatar
      Remove config option "menutool_mode" because it's crack now that we have · f85eda3b
      daniel_e authored
      * src/configdata.{cc,h}: Remove config option "menutool_mode" because it's
      crack now that we have undo et al.  Add config options "textview_font",
      "match_color" and "current_match_color".
      
      * src/filebuffer.{cc,h} (pango_context_changed): Assign default font to the
      error_message tag.
      ([gs]et_match_color): New accessors to tag colors.
      ([gs]et_current_color): ditto.
      
      * src/mainwindow.{cc,h} ([gs]et_menutool_mode): Get rid of these.
      (on_filetree_switch_buffer): No longer modify the TextView font globally
      since we set the tag now.
      (on_preferences): Handle the added config settings.
      (load_configuration): ditto
      (save_configuration): ditto.
      
      * src/prefdialog.{cc,h} (FontSelectionButton): New utility widget.
      (ColorSelectionButton): Another new utility widget.
      (PrefDialog): Revamp the preferences dialog.  That is, add GUI for the new
      config settings and remove the old one.  Also replace the radio buttons for
      selecting the toolbar style with an option menu.
      f85eda3b
  23. 16 Dec, 2002 1 commit
  24. 08 Dec, 2002 1 commit
  25. 02 Dec, 2002 3 commits
  26. 29 Nov, 2002 1 commit
    • daniel_e's avatar
      New files, implementing the core of the new undo system. Basically it's a · 026c09c5
      daniel_e authored
      * src/undostack.{cc,h}: New files, implementing the core of the
      new undo system.  Basically it's a simple undo stack using virtual
      methods for the implementation of undo actions.  But the undo stack
      is itself an undo action, which allows for nested stacks.  This
      functionality is necessary since the undo works globally on all
      files.
      
      * src/filebufferundo.{cc,h}: New files, defining the implementation
      of the FileBuffer undo actions.
      
      * src/fileshared.{cc,h}: Move parts of filebuffer.{cc,h} into these
      new files, in order to avoid circular dependencies and to reduce the
      length of single source files.
      
      * src/filetreeprivate.{cc,h}: Move the anonymous namespace parts
      and the nested classes of the FileTree implementation into separate
      files.  filetreeprivate.h is included by filetree.cc only.
      
      * src/Makefile.am (regexxer_SOURCES): Add new source files.
      
      * src/filebuffer.{cc,h}: Heavily modify and enhance the code in
      order to support the new undo framework.
      
      * src/filetree.{cc,h}: ditto.
      
      * src/controller.{cc,h}: Add undo ControlItem and show menu/toolbar
      items for it.
      
      * src/mainwindow.{cc,h}: Add code to maintain the undo stack and
      connect the GUI bits.
      026c09c5
  27. 23 Nov, 2002 1 commit
  28. 19 Nov, 2002 1 commit
  29. 18 Nov, 2002 2 commits