1. 14 Jan, 2007 4 commits
    • Daniel Elstner's avatar
      :compose_argv): New function with the functionality of compose_impl() but · af360b85
      Daniel Elstner authored
      * src/translation.{cc,h} (Util::compose_argv): New function with
      the functionality of compose_impl() but using a format string of
      type const char*.  This implementation operates on bytes instead of
      Unicode code points, and copies the chunks between placeholders in
      one go instead of each character separately.
      (Util::compose): Call compose_argv() instead of compose_impl()
      and change the type of the format argument to const char* because
      the format string really should be a string literal.  Also, inline
      all of these overloads since they just forward their arguments to
      compose_argv() anyway, so that inlining actually reduces code size.
      
      svn path=/trunk/; revision=636
      af360b85
    • Daniel Elstner's avatar
      Replace occurrences of "lhs" and "rhs" with "a" and "b", respectively. · 742206f2
      Daniel Elstner authored
      * src/fileshared.h: Replace occurrences of "lhs" and "rhs" with
      "a" and "b", respectively.
      (BoundState): Remove BOUND_MASK value from enumeration as it is
      nowhere being used.
      
      svn path=/trunk/; revision=635
      742206f2
    • 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
  2. 13 Jan, 2007 3 commits
    • Daniel Elstner's avatar
      Add file for the benefit of sysadmin tools. · 69a07a23
      Daniel Elstner authored
      * MAINTAINERS: Add file for the benefit of sysadmin tools.
      
      svn path=/trunk/; revision=632
      69a07a23
    • Daniel Elstner's avatar
      New string constant defining the directory of regexxer in the GConf · 83eba3dd
      Daniel Elstner authored
      * src/globalstrings.h (conf_dir_application): New string constant
      defining the directory of regexxer in the GConf database.  This
      string literal replaces the REGEXXER_GCONF_DIRECTORY macro which
      used to be defined in the Makefile.  This global macro definition
      was inherently pointless as it was not configurable anyway.
      * src/main.cc (initialize_configuration): Use conf_dir_application
      instead of REGEXXER_GCONF_DIRECTORY.
      * src/prefdialog.cc (PrefDialog::initialize_configuration): ditto.
      
      * configure.ac (REGEXXER_GCONF_DIRECTORY): Remove substitution.
      (PKG_CHECK_MODULES): Add gmodule-export-2.0 to the module list to
      get the -Wl,--export-dynamic flag automatically.
      (DK_LINK_EXPORT_DYNAMIC): Remove macro invocation as it no longer
      necessary.  Also, add comments elaborating about the whole linker
      stuff.
      * Makefile.am (global_defs): Remove -DREGEXXER_GCONF_DIRECTORY.
      (src_regexxer_LDFLAGS): Get rid of $(REGEXXER_EXPORT_DYNAMIC).
      
      * m4/dk-export.m4 (DK_LINK_EXPORT_DYNAMIC): Remove macro.
      
      svn path=/trunk/; revision=631
      83eba3dd
    • 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
  3. 12 Jan, 2007 1 commit
  4. 11 Jan, 2007 8 commits
    • Daniel Elstner's avatar
      :initialize): Really minor tweaks. · 879e4271
      Daniel Elstner authored
      * src/mainwindow.cc (MainWindow::initialize): Really minor tweaks.
      
      svn path=/trunk/; revision=628
      879e4271
    • Daniel Elstner's avatar
      Make init_state_ a value member of the class instead creating it · 81753d24
      Daniel Elstner authored
      * src/main.cc (RegexxerOptions): Make init_state_ a value member
      of the class instead creating it dynamically.  This simplification
      is now possible since the RegexxerOptions object will be allocated
      dynamically anyway.
      (RegexxerOptions::init_state): Rename from take_init_state(), and
      make it return a const reference.
      (main): Use new init_state() method when initializing the window.
      
      * src/mainwindow.{cc,h} (MainWindow::initialize): Change init
      parameter type to a const reference.
      
      svn path=/trunk/; revision=627
      81753d24
    • Daniel Elstner's avatar
      Define REGEXXER_LOCALEDIR to the "$(locale)" directory path. Remove define · dddf937a
      Daniel Elstner authored
      * Makefile.am (global_defs): Define REGEXXER_LOCALEDIR to the
      "$(locale)" directory path.  Remove define for REGEXXER_DATADIR
      since it was used only as part of the locale directory.
      * src/main.cc (main): Use REGEXXER_LOCALEDIR.
      (locale_directory): Remove string literal.
      
      svn path=/trunk/; revision=626
      dddf937a
    • Daniel Elstner's avatar
      "): Move accelerator from "g" to "T" in order to make it visible. ("Text · 059341ce
      Daniel Elstner authored
      * de.po ("C_urrent match color:"): Move accelerator from "g" to "T"
      in order to make it visible.
      ("Text view font"): Slightly reword translation.
      
      === Change I forgot to mention in previous commit: ===
      
      * *.po: Globally replace ASCII quotes (") and apostrophes (') with
      the typographically correct variants in Unicode.
      
      svn path=/trunk/; revision=625
      059341ce
    • Daniel Elstner's avatar
      Assign mnemonic widget combo_toolbar_style as GTK+ messes up the automatic · 36867be7
      Daniel Elstner authored
      * ui/prefdialog.glade (label_toolbar_style): Assign mnemonic widget
      combo_toolbar_style as GTK+ messes up the automatic assignment.
      
      svn path=/trunk/; revision=624
      36867be7
    • 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
    • Daniel Elstner's avatar
      Add comment about assertions and reorganize the code a bit. · 502855e9
      Daniel Elstner authored
      * src/fileio.cc (save_iochannel): Add comment about assertions and
      reorganize the code a bit.
      (Regexxer::save_file): Elaborate on why IOChannel::close() is
      used explicitely.
      
      * src/filetreeprivate.cc (FileTreePrivate::collatekey_sort_func):
      Fix oversight:  Subtracting two unsigned values and converting the
      result to a signed type relies on implementation-defined behavior.
      Explicitely cast the operands to a signed type before substraction.
      
      * src/main.cc (main): Use g_get_prgname() instead of the string
      literal PACKAGE_TARNAME in the error message for Glib::OptionError
      exceptions.
      
      svn path=/trunk/; revision=622
      502855e9
    • Daniel Elstner's avatar
      Add comment about assertions and reorganize the code a bit. · c539cb97
      Daniel Elstner authored
      * src/fileio.cc (save_iochannel): Add comment about assertions and
      reorganize the code a bit.
      (Regexxer::save_file): Elaborate on why IOChannel::close() is
      used explicitely.
      
      * src/filetreeprivate.cc (FileTreePrivate::collatekey_sort_func):
      Fix oversight:  Subtracting two unsigned values and converting the
      result to a signed type relies on implementation-defined behavior.
      Explicitely cast the operands to a signed type before substraction.
      
      * src/main.cc (main): Use g_get_prgname() instead of the string
      literal PACKAGE_TARNAME in the error message for Glib::OptionError
      exceptions.
      
      svn path=/trunk/; revision=621
      c539cb97
  5. 10 Jan, 2007 2 commits
    • Daniel Elstner's avatar
      :create_with_error_message): Get rid of the inappropriate plea to · ec127ebc
      Daniel Elstner authored
      * src/filebuffer.cc (FileBuffer::create_with_error_message): Get
      rid of the inappropriate plea to translators to replace space with
      no-break space in the message title.  Apart from the fact that it
      was a bad idea in the first place to make translators put up with
      this internal issue, the no-break spaces have no point being there
      at all.  A single untranslated no-break space between the error
      icon and the title text is all that is warranted.
      
      svn path=/trunk/; revision=619
      ec127ebc
    • Daniel Elstner's avatar
      Add --add-comments=TRANSLATORS in order to make xgettext only extract · ec1b224d
      Daniel Elstner authored
      * Makevars (XGETTEXT_OPTIONS): Add --add-comments=TRANSLATORS in
      order to make xgettext only extract explicitely tagged comments
      into PO files.  This gets rid of the comment spam due to intltool
      passing --add-comments by default without specifying any tag.
      
      svn path=/trunk/; revision=618
      ec1b224d
  6. 09 Jan, 2007 5 commits
  7. 08 Jan, 2007 4 commits
  8. 07 Jan, 2007 4 commits
    • Daniel Elstner's avatar
      Update translation. Ditto. · 9bdad3ad
      Daniel Elstner authored
      * en.po: Update translation.
      * de.po: Ditto.
      
      svn path=/trunk/; revision=608
      9bdad3ad
    • Daniel Elstner's avatar
      Again remove the tearoff menus and the menubar and toolbar handle boxes. · fcf2d49b
      Daniel Elstner authored
      * ui/mainwindow.glade: Again remove the tearoff menus and the
      menubar and toolbar handle boxes.  This was just superfluous UI
      clutter not actually used by anyone.
      (button_folder): Get rid of the custom button that used to fire
      up the file chooser dialog, plus the accompanying text entry for
      display and editing of the folder name.  Replace this old cruft
      with a fresh and crisp GtkFileChooserButton plus a label.  Yay!
      (combo_pattern_entry): Reactivate commented-out markup that sets
      a tooltip on the internal GtkEntry child of combo_pattern.  As
      this finally supported by libglade it is no longer necessary to
      hack around the limitation in code.
      
      * src/mainwindow.{cc,h} (MainWindow): Adapt the implementation
      to work with the changed UI layout.  Change the folder selection
      handling as necessary.
      (MainWindow::load_xml): Remove the tooltip hack for the pattern
      entry, since libglade now allows for this in the glade file.
      (MainWindow::get_folder_fullname): Remove now unused method.
      (MainWindow::on_select_folder): Likewise.
      
      svn path=/trunk/; revision=607
      fcf2d49b
    • Daniel Elstner's avatar
      #include <memory> for std::auto_ptr<> rather than relying on indirect · 16898c1c
      Daniel Elstner authored
      * src/main.cc: #include <memory> for std::auto_ptr<> rather than
      relying on indirect inclusion by some other header file.
      
      svn path=/trunk/; revision=606
      16898c1c
    • Daniel Elstner's avatar
      Remove <cstdlib> and <cstdio> includes left over from the old libpopt · 03f81039
      Daniel Elstner authored
      * src/main.cc: Remove <cstdlib> and <cstdio> includes left over
      from the old libpopt code.
      
      svn path=/trunk/; revision=605
      03f81039
  9. 06 Jan, 2007 9 commits
    • Daniel Elstner's avatar
      Eeek, as it turns out the flag ANCHORED (and probably others too) are · d5792660
      Daniel Elstner authored
      * src/pcreshell.h ({Compile,Match}Options): Eeek, as it turns out
      the flag ANCHORED (and probably others too) are valid flags at both
      compile time and match time.  Move ANCHORED from CompileOptions to
      MatchOptions as I need it there for the following /g matching fix.
      These enumerations should of course be properly namespaced instead;
      this is just a quick hack for now.
      * src/pcreshell.cc: Rename a couple of variables to improve code
      clarity.
      
      * src/filebuffer.cc (FileBuffer::find_matches): Set the ANCHORED
      flag in addition to the NOT_EMPTY flag if the previous match was
      empty in /g mode.  This matches the algorithm outlined in recent
      versions of the PCRE documentation to mimic the behavior of Perl.
      
      svn path=/trunk/; revision=604
      d5792660
    • Daniel Elstner's avatar
      New class that implements the command-line option interface using the · 9c55cd60
      Daniel Elstner authored
      * src/main.cc (RegexxerOptions): New class that implements the
      command-line option interface using the option parsing facilities
      of glibmm instead of libpopt.
      (parse_command_line): Remove old function that used libpopt to
      parse command line options.
      (main): Use the new option parsing code.  Also, merge the gettext
      initialization into a single call again.  The special trickery that
      used to bind the codeset separately after option processing is no
      longer necessary with the new parser.
      
      * src/mainwindow.{cc,h} (Regexxer::InitState): Reorganize the data
      structure so that default-constructed objects equal the default
      values of the command-line options.  This is a work-around for
      glibmm bug #393571.
      (MainWindow::initialize): Adapt to Regexxer::InitState changes.
      
      * src/translation.{cc,h} (Util::enable_utf8_gettext): Merge back
      into Util::initialize_gettext(), as the separation is no longer
      necessary.
      (compose_impl): Optimize a bit by reserving the memory for the
      result string in advance.  Also, replace a couple of `...' quotes
      with "..." in a warning message.
      
      * Makefile.am (src_regexxer_LDADD): Remove $(POPTLIBS).
      * configure.ac (DK_LIB_POPT): Remove check for libpopt.
      * m4/dk-popt.m4: Remove now obsolete file.
      
      svn path=/trunk/; revision=603
      9c55cd60
    • Daniel Elstner's avatar
      Name a file that will be truly unique to regexxer. · 003f8dfe
      Daniel Elstner authored
      * configure.ac (AC_CONFIG_SRCDIR): Name a file that will be
      truly unique to regexxer.
      
      svn path=/trunk/; revision=602
      003f8dfe
    • Daniel Elstner's avatar
      Prefix M4 macro filenames with "dk-", to avoid clashes with other · a52e4353
      Daniel Elstner authored
      * m4/dk-{export,feature,pkgprog,popt,warn}.m4: Prefix M4 macro
      filenames with "dk-", to avoid clashes with other applications
      installing their M4 files here.
      
      svn path=/trunk/; revision=601
      a52e4353
    • Daniel Elstner's avatar
      Update. · 8f16ef3b
      Daniel Elstner authored
      * NEWS: Update.
      
      svn path=/trunk/; revision=599
      8f16ef3b
    • Daniel Elstner's avatar
      Add comment about the purpose of this file. · 83c06555
      Daniel Elstner authored
      * src/exported-symbols: Add comment about the purpose of this file.
      
      svn path=/trunk/; revision=598
      83c06555
    • Daniel Elstner's avatar
      :on_erase): Copy tagtable->match into a local variable and use it. This · 7e358994
      Daniel Elstner authored
      * src/filebuffer.cc (FileBuffer::on_erase): Copy tagtable->match
      into a local variable and use it.  This fixes a compilation error
      with the Intel C++ compiler caused by the creation of a temporary
      inside the statement expression of g_return_if_fail().
      
      svn path=/trunk/; revision=597
      7e358994
    • Daniel Elstner's avatar
      Remove leftover string constant. · 466b50df
      Daniel Elstner authored
      * src/globalstrings.h (glade_aboutdialog_filename): Remove
      leftover string constant.
      
      svn path=/trunk/; revision=596
      466b50df
    • Daniel Elstner's avatar
      Update to latest version shipped with Automake. Likewise. · 2f088611
      Daniel Elstner authored
      * COPYING: Update to latest version shipped with Automake.
      * INSTALL: Likewise.
      
      svn path=/trunk/; revision=595
      2f088611