sagasu-2.0.10/ 0000755 0000764 0000764 00000000000 11407212670 010066 5 0000000 0000000 sagasu-2.0.10/AUTHORS 0000664 0000764 0000764 00000000707 11407212454 011064 0000000 0000000 Code: Pierre Sarrazin
Translations:
Japanese Utumi Hirosi
Serbian Aleksandar Urosevic
Russian Alexandre Prokoudine
Polish (version 1) Arkadiusz Lipiec
German Ruediger Arp
Czech Josef Lusticky
Application icon: Paul Guertin
Sound file of "sagasu" pronunciation: Andy Cunningham and Yuko Suzuki
sagasu-2.0.10/configure.ac 0000664 0000764 0000764 00000002667 11407207760 012315 0000000 0000000 # $Id: configure.ac,v 1.22 2010/05/31 00:11:49 sarrazip Exp $
AC_PREREQ(2.50)
AC_INIT(src/main.cpp)
AM_INIT_AUTOMAKE(sagasu, 2.0.10)
# Package description:
PACKAGE_FULL_NAME_EN=Sagasu
PACKAGE_FULL_NAME_FR=Sagasu
PACKAGE_DESC_EN="GNOME tool to find strings in a set of files"
PACKAGE_DESC_FR="Outil GNOME cherchant des chaines dans des fichiers"
PACKAGE_CATEGORIES="Accessories;Application;Utility;"
AC_SUBST(PACKAGE_FULL_NAME_EN)
AC_SUBST(PACKAGE_FULL_NAME_FR)
AC_SUBST(PACKAGE_DESC_EN)
AC_SUBST(PACKAGE_DESC_FR)
AC_SUBST(PACKAGE_CATEGORIES)
PACKAGE_HOME_PAGE="http://sarrazip.com/dev/sagasu.html"
AC_SUBST(PACKAGE_HOME_PAGE)
# Library requirement versions:
LIBGNOMEUI_MINVER=2.8.0; AC_SUBST(LIBGNOMEUI_MINVER)
GTK_MINVER=2.6.0; AC_SUBST(GTK_MINVER)
AC_PROG_CXX
AC_COMPILE_WARNINGS
AM_GNU_GETTEXT
AC_FUNC_SNPRINTF
PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0 >= $LIBGNOMEUI_MINVER)
dnl PKG_CHECK_MODULES should have declared the following AC_SUBST() clauses,
dnl but pkg.m4 in version 0.12 of pkg-config does not seem to do it:
AC_SUBST(LIBGNOMEUI_CFLAGS)
AC_SUBST(LIBGNOMEUI_LIBS)
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_MINVER)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_PROG_PERL_MODULES(FileHandle DirHandle locale POSIX,
,
AC_MSG_ERROR([missing some required Perl modules]))
AC_LANG_CPLUSPLUS
AC_CONFIG_FILES([
intl/Makefile
po/Makefile.in
macros/Makefile
Makefile
sagasu.spec
src/Makefile
src/sagasu.desktop
])
AC_OUTPUT
sagasu-2.0.10/src/ 0000755 0000764 0000764 00000000000 11407212670 010655 5 0000000 0000000 sagasu-2.0.10/src/util.cpp 0000664 0000764 0000764 00000007117 11400577305 012270 0000000 0000000 /* $Id: util.cpp,v 1.8 2010/05/31 00:11:49 sarrazip Exp $
util.cpp - Various utilities
sagasu - GNOME tool to find strings in a set of files
Copyright (C) 2002-2004 Pierre Sarrazin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include "util.h"
#include
#include
#include
#include
#define _(String) gettext (String)
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)
#include
#include
using namespace std;
gchar *
latin1(const gchar *utf8_string)
{
gchar *result = g_locale_from_utf8(utf8_string, -1, NULL, NULL, NULL);
if (result == NULL)
return g_strdup(utf8_string);
return result;
}
string
latin1_string(const char *utf8_string)
{
g_return_val_if_fail(utf8_string != NULL, "");
GCharPtr latin1_string(latin1(utf8_string));
return latin1_string.get();
}
string
latin1_string(const string &utf8_string)
{
return latin1_string(utf8_string.c_str());
}
string &
chomp(string &s, char c)
{
string::size_type len = s.length();
if (len > 0 && s[len - 1] == c)
s.erase(len - 1, 1);
return s;
}
string &
substitute(string &s, const string &target, const string &replacement)
{
string::size_type targetLen = target.length();
string::size_type pos;
while (pos = s.find(target), pos != string::npos)
s.replace(pos, targetLen, replacement);
return s;
}
string &
quotechars(string &s, const char *metachars)
{
string result;
string::size_type len = s.length();
for (string::size_type i = 0; i < len; i++)
{
if (strchr(metachars, s[i]) != NULL)
result += '\\';
result += s[i];
}
s = result;
return s;
}
string
get_dir(const char *default_value, const char *env_var_name)
{
const char *s = getenv(env_var_name);
string dir = (s != NULL ? s : default_value);
if (!dir.empty() && dir[dir.length() - 1] != '/')
dir += '/';
return dir;
}
void
entry_set_text(GtkWidget *entry, const string &utf8_string)
{
gtk_entry_set_text(GTK_ENTRY(entry), utf8_string.c_str());
}
void
error_dialog(GtkWidget *window, const string &utf8_message)
{
GtkWidget *dlg = gtk_message_dialog_new(
GTK_WINDOW(window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"%s",
utf8_message.c_str());
gtk_dialog_run(GTK_DIALOG(dlg));
gtk_widget_destroy(dlg);
}
void
errno_dialog(GtkWidget *window, const string &utf8_first_line, int errnum)
{
string utf8_msg = utf8_first_line + ":\n" + u8_string(strerror(errnum));
error_dialog(window, utf8_msg);
}
int
show_url(const string &url, GtkWidget *window, const string &utf8_error_message)
{
GError *err = NULL;
if (gnome_url_show(url.c_str(), &err))
return 0;
string msg = utf8_error_message + ":\n"
+ err->message + "\n"
+ _("URL:") + " " + url;
error_dialog(window, msg);
g_error_free(err);
return -1;
}
sagasu-2.0.10/src/sounds/ 0000755 0000764 0000764 00000000000 11407212670 012170 5 0000000 0000000 sagasu-2.0.10/src/sounds/sagasu.wav 0000644 0000764 0000764 00000045074 07641655764 014150 0000000 0000000 RIFF4J WAVEfact €’ fmt D¬ ¹V ùdata J y¤!‰C(;û‘
°@™…ˈKÒ!
é <#P)ØèŠ!86»4¸ó@Š °¡ Žºs¹™s…1¹€5‚Œ»Ý™" ˆ"]‘Û€‹¬D8˜ú!S¸™©–24šº#F¡¹âI²Q:ñ˜Ñ€€ )ªª°ó," 0œ’üš»ÚT¤‚ ³‰p‡ ˜è˜¹Œ ˆš¬ ·bj¸Á˜1& ¨)©2yè›à0‚P‘«°ñ:!‰‰Ñ+‘¡AœÈ¤3ª»ì"C„°Š(€: ÈÕ-ºQ#›È¸´ ?‘Ò*# ‡ª¹k9…)¨ i™1Ê»$¼¹
ŠRˆƒi‘(²s(Óº‘¨Ã™i!”2®¹+€$š¡õ2y€”›«É À’»
¥1E2)Û0 ¹Út‘¹œè©IŠ#
£;£É ŸË8‚©‹ºB ›ºˆ`†šÈˆå ¡)°*37ªªû¯# c#Ó›¡‘*®ò¸™)”A "'™©Ù¸™c ¡€;ú*˜• …"”:ì›Ê‘%h¢ƒú‰Ë AQJÊ耘ŠCq£8žØ‘!²¹©<Õi€˜ v ¬¡(<œÉ‘C¹ú¼(
27Ò‚Ž€B8† »°J°ƒ¸ò‰X™‡ ˜Ðj¨˜º!Sy’‘›› ;´™¬X S ¸›*•Q°‰©"L€³Ù,©
"€2XºŸ¬Ðˆ@ ®ò8»ó)Ì»¨:™G0£À(‘k•™¸—! ¢‰žJš”‘HX <š”J»«Ø©€(q £ˆ
‘9 “¨š1¿‹#)Ч@å1!00¡®û™‹ $! ™‹Ù™£ÙJŒƒB •ˆÜ*’I Ês3#)‰ø£8Û¹QC¢†ª— €±„:N¸¬Ã™°œ¹¥TI Ø ¹’{û‘ QÊš ’½¹Šˆp1
”>à J+Ó ¡¹+‘bCºÜ
tˆ¢0ò
›…
‰Ò€+ЃûZB"ñ€)(³²Ê²::q$陬º%pƒ"²±‰¬¯¡™H°9)2£¯Àˆ„p ’©JÜI" ‰É¡.°*1i1 Ñ‚…@˜¥Š …0ùŠ›¡2L˜9š )©ð 8©È B8²¤È ¸L8‘©H™óp:ø¡(=’W ’°Ü
Ê©:&4¡©½¹…0‘E
‡š£ú‚‹( R¨3B‘À«*¸V)™ÂŒ«’9y£¢©Í‰S@!ªËœ
… ¢"Ÿ©>´x™-˜Ó‹ ’1F³¢Z¼¡{ ©£;Š‘ù-©±p!Q €™©#‘üª¨‹›WË ¹™´Ž*©†!‘ìª2p"˜œ²¤øš (£ß¹ÉI52 ¸œ 5$¨ê‹ª‚'0 ªÊ2r ¢¿™‘‘‰(
(8’ùº¯Q "»ÃH‹ûŒ˜0"5Šò‹À Sq’+àš*éÉ
‚308ù9…0y“£ºÑ3ƒ9¼é9…ú"0ˆ¸½Ø@˜Â€9+# ¸˜Ÿ»ãƒ8•›»²V9ȸX™‘¹“ž»851ˆ¡Ûì€(B2‘ëË š"sÙ;‘)˜€ ³ŒÜ¸Z ;S§q˜’™™¹É’’=:ñ ‰1.¨8¡õ‘i„‰½°™ªs£’™‹°@PÀŠ©3T ´*̱‡ ©!!’)¬ÂŠ`“)Ÿ™*Â(‹1
¤s˺,ØR!²9¬½L¨” 3“¿Ú R43©¾›‚Á‡)™ C™$†P š›»º0qƒöÿ b œ¸!+s‚“J˜‘’˜+ƒIÃ"))ü¹ –€' ê‹c€ªé©`¢©¹©‘P*¡)0I£†2Ú¹©)‰6¢«'B³£ C[3¤šÝª¸˜›i81"ð›’™-3¿‚ˆH€¹Š»«I6¡0‰“²¯àYª(¨Ð‹(2À;93'—‰©11¶8’™š™†m0³P¸Ê›ª3A'"d¨Ášœ™„@ #0®"b˜¨’0¡k¸¶
’’šL˜™¬0꫇2‘.ƒ¡©§ »‚!}à‚š„I‰¸™S– 1š”<é™)#£p3
™¿ñ ƒ
¨û£Y™Ð€ #q2¨À3¡óœ¸C8•3¿¸P£H»û˜£x˜À˜0“bÁ©™$9#̰ q9Ó8°K€Ê„)©’‘@ ¶ 5ƒùÛ ˆ!6@²Œ°I›@& ™‚0ø›ø‹š s¡<’a É‚¹ 11»1Ÿ8À!¡™ƒ- ’’Ï©›KI…A‰Á±(.šŒ
‘9ްšÀ)¸%:Q±žò“#B4¹ ò8 ™ A±!¹z… Éœ+°3q„£$Ÿ Ù(J©¬”!I§ª-€!<²¡Á{˜©´¸°#¯¸‹²2GTˆ° ¢¼€ ½ë˜Ãy(³ «½û©ƒ¨²=A$#
£Í‘‚T^Á ˜¢A c ™È‰«É9¬¸’›€“2±ô½©A˜+ŸÁ y ,š¹‘i² ™˜ª ƒ™’A
˜9!¹±±l“‰ÏÐ8ˆà "C*Ä Ø“›„ØÀ€1DAµ
¥!¡««Ó!29ÁM 20™íЏ +22+›Þ°Š°"‘-@¹3q£1¿‚iˆ‘*É9)p¨“b©¼šÁ˜…¹¬RK9µ¢ Ë™M€'(²¹¡Ž±9¤!{#H¡
›ý *º’:º£5-" ³‘JKð” z‹Œ‘0{ƒÚÀ
“"‹Ép‘ ¿!D‘ÉÛª
)'"“ ª©†Šú‹€û) 7±A½™¸!€W (¡Ë«š)%©‹7²LÀ‰›˜ì‰™a3BȺÛ(›˜i¸ ý*¡Ë¸œDS™A”Œ ÊB€ ¼j$¹Jº¨F‘™ ‚¸¡Û™5 r‘™©A©R©@œ ‘«¾5€R Û‚œAæÿ €™°€B¸øŸB‘ˆ € ù ®$™8±K„ªBªË+„˜(RÏ€ŠB!$¡€‘ŒƒéÏA˜"˜xÂŒ2É) ¡¹‹'È:“Jø
&¸
0£¼0† Pé ‘Ì(¡9µ:œ% ’¯"»!°qó8œ"‘ƒ®2 ‰¸ƒÿ2©9ª ²Â&«(
‰®RÙˆsÚ(’¢¬Q¡ )ƒŸ!€˜8½ˆ€›eÁ#Ë"é0¡)²J’©©9£v‘þR»@‚ˆ‹%¨ºA³&šì8‚Œ$©é¼S¢›"¬2ºq¢
©Œ#ºT¸;œšcØ* ˆJ”
¹ ±'©!ºBè*#Ø8° «`’#Ήa ÊX°)«:²'©Dû@
ºa±¢‹¡Ìr’¬C°…ª¡›FQ”»‚0’Y¤
€ˆÁi“Œ3Û( J†Œ#Ð û8”›˜ É8³Š€«" ˜¸ê`¨ I“ ÑY„Œ«2Š€©BÚTÉA°
€2̉#«‚sÉ8£iè ¨@€)°BÝP‘
#ÙYù9²‘‹Fø*ª
Ð:Ú0’«Ü8…0)¹h’«A¢«*&°
1æ - Û)ÊJ$Ø)‘
‘#Ц<ë0‚‹”I‡2©($Ý@ *¢X°)ª!™´:˜¬g©‰4¸
±P)¹‘$˜xñJ“ž3© I„Ÿ3ɨ0‚ž"¡‚™¡H‰«7œ«RȈ ¡:–S©‰PÀ%¼A¸H¡)’šˆ@¸ºs‰$ÌB¸9Ó;„¬S¹ ‘* PÀ8¡< ªsÊ`°„+‰±H‚®CÉ!¹y¢¸AÌq°)‘HÐ)‰˜9°.¤Zá)“¢I±ûr¹ ˆ)ùpÁ‚
1‹’©rÊ!ë0±xÀ:’™Œ…;’“* Ÿ›$œšœ4Ú8“œ2ü1›‘«†
¡€Â)‚ü`‘«œBºc¸‘œÉq ›„¬ÙP˜ªE¬‚"‘Ž £+È8‡
¸¯&«™"Á%º ‘’š“œ0Ø*3ò*ÏBÀ9¡£0´Ž*‘ªVÉ0‚˃ž2ØJ¼#Ìp³©(€¹Bšž"Ié °j£š›&ª „Ÿâ:š©$©!¹š’
¥ƒ ‘)‚À» #À‹³…ˆ–
œ!˜ÚDª‚šIÂK‡#º ¡
2Á‹°;›‘”…‹!Þ/ ™ºœ*, 0ò,’˜1°ˆ 3®h°H´°™8±cëJ–
»C©…Lùx±
“3°Ëº1Cùºs 2º‰„Š›7»"™€ŽRè0¸aé0€‰¢ ºH’
ˆ…¢2ûH’šª5›-³Iâ,”
‹2ø)ƒž#©1É0°¹xÓ˜ºCÁI‰ªÄ{¡[¤‹š2Ð0 ±
Hâ<•*óI ›#ªb±«‹’›EÀ8ÒŠ‘ "£9Š¡¨ 8ð !Ѝ4
¨ÁQº*cÙ €œ2è8 “‹R¹ “Ìa )
´=Â0ÀJ€ƒ½cÊB©¸1úH¨¸i°8êQÀ¨“XÁ*”‹¡ 8¬%Ú)™+$Î!‘«Tº£-“›SÁŠ›¢:"üh˜ ²\£ƒŒ9øB¸9‘-¢)“.’•›Q±‹#ˆ*¥,¡C½2ÙRÙ
ƒ»q²,ƒ
‰Á:!ò%œ“ ›¸ 1¿EÈ9´‰‰2ã%Ê ¡¬RØI¢+Ê0Ñ+‹© ‘‰ŠAÈ0 ¡ËY¤4©“‹8¥#¹)’ê0a¨›SÈ‘h°Z¢žº0³ƒœ$Ê! +3û1±*‘¨Ñü1 ™aÀ¢4Ú0±))àI˜’_Ñ9‘‹#°…ª(ÓP€
››1û3©!Š˜bùZ¢„ЏŒƒÜ0‰ „Œ¤ƒ«Cš“Œ †#Š‚œ1âH™˜šrº8µ!¹«9†«%‚¬3¹8 !1ûL¤‰„
€1¡˜¡XÀ¸:”°[ƒÚ0ÊR (Ɉˆ:—H¹:ØDÛ0‚‹œp¡
†
ˆ…»sº3¹(¨,’Aù[£Š!¨‹pÀ9¸(œ2˜šœ‰ÊA¸iâ9¼1¡‚‰‡‹0Ò$¨‚
•‹2ð:ÀK†«1¨)©B–Ž0¨«D°œDé(É ˆ‚Ÿ2 ‚Hà
! ¼Ë*ƒ®TÈ““†‹Œ€#ðZ€š@À;†‹¡YáI Eªˆ2 ¨†Š¡êH€‰°9Á8ÁI¬0à#®# ¡¸s¨"™º„K¡:—š#‚YÄ#¹8è9‚‹ÛA ‹¬›Â( "ú9‘®3Ø:”š!@㑜1ª#ºz¢ºpÓ‘ˆ °xЊ0üX’«!ƒº@€¸€r±žSÈ)ˆ0³Ÿ" ˆ‚Zà
ê;'º _ý3 ˜1Øy¡ ±k¡8£»KÂŒª3ë1¹03¼ J¾Sª1¹QØ9Љ4éÚ “½ €šX”« É9’:ñ<›˜$ë
™2؉* ½²L±<'é€ Ð+&¹@°*¤‚œ%
â‹3¨€¼0W‰‚Œ%ê)©CÈ1ÀI’
ÂI„ŒŠŠ t±
0‘»s 1ÛË:’96¤ž‚ž" €)#êÊ»s€ˆËAÛˆ˜»¸‹ì©¾¨‹øØ«˜Û¬ Ú(°®¹(«!ØÜ°8”«(#Q•*Ê8R’0–
4)!„¿0%#™3¨rQ3¨šC!!¡v™ºBr€B’ª1¸$Au¹8CI¹™;7)CS ŒÉ 1&Q$©»‰¹Œb‰Ê‰¹yƒšÃω© B’º¼¯€‰ É‹Ü(𬠺À’Ý º@ƒí Ú¢½¡(„͉ú
"‘ Éšªª‚˜‹2ÿ‹¸i“'ºP¸)мIÁŠ2ÉÙ((ʘ̈ 6 ¸:˜'‰¡¼
8ܪ¸*7S€€ù¡:'š3ê8±:‡©8
B1E¬¹H¢²#3
p• €˜P3‰D‘Ëü @C2 Ì뮘»)‘@q”Š »ÍP‘("¹„®¹Í9&ˆb‚ 5 ™©XVŠ
²î¸W€¡‰ªR€°›Aa’›°ß ˜1#""ˆÿÛ¬ŠB#" ú«Šˆ! ›È«@díºÎ™!D‚#U«‰cD ê º
Á‘Ì(Pˆˆ¹œ!W €C¡Šûˆ‰ªˆë¢¯ˆQ4$˾›š"3c‘ªÉ® 0’¬€½Êÿšº
")W ƒŠD€1’¢Œ$ T‘˜ÌŠÉ˜Û@#˜ˆ‰"%ËbQ%¹¬¼ ˆ¹˜Gˆ ꊈc"!!€ ‚ܼ¾ª›A5ºË‰ 1¨ûÿ»»œ U23ˆB‚ »b€`„šÍšÚ«¸‰‰RC33‚‰©œ2D"C)&d‘‰É˜ª¨‰˜U3BªÛ¬"Bû½¾¬ˆ!4#»ÍˈÈÿË»ŠB53Cƒ ˆD‘ ‚ "èŠÜš©ºÊ¬ ‰c$3€™‰0AF ‰‰¸ƒŸÌÉ«»U3𩍋7‘Q% ¨Íܬšˆ2!3ٹ욘‰üߪº"s$#"™€ˆ$1ëœÌ«É«»Øñ+ ›™r&C3