Commit 1c1143c2 authored by Andreas Rönnquist's avatar Andreas Rönnquist

Imported Upstream version 0.7.03

parent f920e284
......@@ -2,6 +2,11 @@
ChangeLog:
----------
0.7.03
* Add context to menu translatable strings
* Updated build instructions with gettext info
* Removed printing non-informational error numbers
0.7.02
* Really fix the dependency generation
......
......@@ -7,11 +7,13 @@ to build are:
pkg-config
libgtk-3-dev
gettext
or if you are still using GTK version 2:
pkg-config
libgtk2.0-dev
gettext
Then the build process is simple - to build the program, just type
......
......@@ -11,15 +11,19 @@ Get a copy of the sciteproj sources, and create a sciteproj.pot file:
cd po
make sciteproj.pot
Copy the sciteproj.pot to [LANGUAGE ABBREV].po, (replace [LANGUAGE ABBREV] with
the correct abbreviation for your language, e.g. 'sv_SE' if you are translating
into Swedish).
Generate a new po for your language with sciteproj.pot as input:
cp sciteproj.pot sv_SE.po
msginit --input=sciteproj.pot
and start translating all strings in the sv_SE.po using your favourite
texteditor, or a "gettext catalogs (.po files) editor" like poedit (which can be
found at http://www.poedit.net.)
This will read your environment, and init the translation meta information with
values based on that info. See msginit --help for more info.
Then start translating all strings in the po using your favourite texteditor,
or a "gettext catalogs (.po files) editor" like poedit (which can be found at
http://www.poedit.net.)
Note that hot-keys are illustrated with the "_" character, the character
following "_" is the keyboard shortcut for that menu item.
Checking your translation for errors and completeness
......
0.7.02
\ No newline at end of file
0.7.03
\ No newline at end of file
......@@ -22,7 +22,7 @@ folder_to_xml.c graphics.c gui.c main.c prefs.c properties_dialog.c \
recent_files.c remove.c rename.c scite_utils.c search.c statusbar.c \
string_utils.c tree_manipulation.c xml_processing.c
XG_ARGS = --keyword=_ --keyword=N_ -w 80 --package-name=${NAME} --package-version=${VERSION} --msgid-bugs-address=gusnan@gusnan.se
XG_ARGS = --keyword=_ --keyword=N_ --keyword=NC_:1c,2 -w 80 --package-name=${NAME} --package-version=${VERSION} --msgid-bugs-address=gusnan@gusnan.se
LANGUAGES = sv_SE
#
......
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sciteproj 0.6.07\n"
"Report-Msgid-Bugs-To: gusnan@gusnan.se\n"
"POT-Creation-Date: 2012-02-19 14:17+0100\n"
"PO-Revision-Date: 2012-02-19 14:18+0100\n"
"POT-Creation-Date: 2012-03-16 16:12+0100\n"
"PO-Revision-Date: 2012-03-16 16:25+0100\n"
"Last-Translator: Andreas Rönnquist <gusnan@gusnan.se>\n"
"Language-Team: Swedish\n"
"Language: sv_SE\n"
......@@ -17,25 +17,15 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: about.c:134
#, c-format
msgid "version %s DEBUG"
msgstr "version %s DEBUG"
#: about.c:136
#, c-format
msgid "version %s"
msgstr "version %s"
#: about.c:193
#: about.c:194
msgid "Information"
msgstr "Information"
#: about.c:194
#: about.c:195
msgid "License"
msgstr "Licens"
#: about.c:202
#: about.c:203
msgid ""
"SciteProj 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 3 of the License, or (at your option) any later version.\n"
"\n"
......@@ -49,15 +39,15 @@ msgstr ""
"\n"
"Du bör ha fått en kopia av GNU General Public License tillsammans med detta program; om inte, se <http://www.gnu.org/licenses/>.\n"
#: about.c:249
#: about.c:250
msgid "SciteProj is based on ScitePM by"
msgstr "SciteProj är baserat på ScitePM av"
#: about.c:250
#: about.c:251
msgid "Many thanks to"
msgstr "Många tack till"
#: about.c:251
#: about.c:252
msgid ""
"For more information about SciteProj, see the README file that\n"
"is provided with this package."
......@@ -65,10 +55,10 @@ msgstr ""
"För mer information om SciteProj, se README-filen som\n"
"är bifogad med detta paket."
#: about.c:350
#: about.c:383
#, c-format
msgid "SciteProj version %s\n"
msgstr "SciteProj version %s\n"
msgid "version %s"
msgstr "version %s"
#: addfiles.c:245
msgid "Create Group"
......@@ -93,7 +83,7 @@ msgstr "Kunde inte skapa en fil med namnet '%s'!"
#: gui.c:114
msgid "_File"
msgstr "Arkiv"
msgstr "_Arkiv"
#: gui.c:115
msgid "_Edit"
......@@ -108,8 +98,9 @@ msgid "_Help"
msgstr "_Hjälp"
#: gui.c:119
msgctxt "File|"
msgid "_Open project"
msgstr "Öppna projekt"
msgstr "_Öppna projekt"
#: gui.c:119
#: tree_manipulation.c:451
......@@ -117,6 +108,7 @@ msgid "Open Project"
msgstr "Öppna projekt"
#: gui.c:120
msgctxt "File|"
msgid "_Save project"
msgstr "_Spara projekt"
......@@ -126,6 +118,7 @@ msgid "Save Project"
msgstr "Spara projekt"
#: gui.c:121
msgctxt "File|"
msgid "Save project as..."
msgstr "Spara projekt som..."
......@@ -134,6 +127,7 @@ msgid "Save Project with a specific filename"
msgstr "Spara projekt med ett specifikt filnamn"
#: gui.c:122
msgctxt "File|"
msgid "_Exit"
msgstr "_Avsluta"
......@@ -142,7 +136,7 @@ msgid "Exit"
msgstr "Avsluta"
#: gui.c:124
#: gui.c:136
msgctxt "Edit|"
msgid "Create _group"
msgstr "Skapa _grupp"
......@@ -152,6 +146,7 @@ msgid "Create a new group in the project"
msgstr "Skapar en ny grupp i projektet"
#: gui.c:125
msgctxt "Edit|"
msgid "Add _file"
msgstr "Lägg till _fil"
......@@ -160,6 +155,7 @@ msgid "Add a file to the project"
msgstr "Lägg till en fil i projektet"
#: gui.c:126
msgctxt "Edit|"
msgid "Remove file(s)"
msgstr "Ta bort filer"
......@@ -168,6 +164,7 @@ msgid "Remove selected files from the project"
msgstr "Ta bort valda filer från projektet"
#: gui.c:128
msgctxt "Edit|"
msgid "Expand all groups"
msgstr "Expandera alla grupper"
......@@ -176,6 +173,7 @@ msgid "Expand All Groups"
msgstr "Expandera alla grupper"
#: gui.c:129
msgctxt "Edit|"
msgid "Collapse all groups"
msgstr "Kollapsa alla grupper"
......@@ -184,6 +182,7 @@ msgid "Collapse All Groups"
msgstr "Kollapsa alla grupper"
#: gui.c:131
msgctxt "Edit|"
msgid "Search"
msgstr "Sök"
......@@ -192,6 +191,7 @@ msgid "Search for a string in the project"
msgstr "Sök efter en sträng i projektet"
#: gui.c:133
msgctxt "Help|"
msgid "_About"
msgstr "_Om"
......@@ -207,6 +207,10 @@ msgstr "Lägg till filer"
msgid "Add files to the project"
msgstr "Lägg till filer till projektet"
#: gui.c:136
msgid "Create _group"
msgstr "Skapa _grupp"
#: gui.c:138
msgid "Add files to group"
msgstr "Lägg till filer till grupp"
......@@ -256,8 +260,7 @@ msgid "Sort the filenames descending"
msgstr "Sorterar filnamnen i gruppen fallande"
#: gui.c:144
#: gui.c:152
#: gui.c:158
msgctxt "RightClickGroupPopup"
msgid "Properties"
msgstr "Egenskaper"
......@@ -266,6 +269,7 @@ msgid "Show group properties"
msgstr "Visa mappegenskaper"
#: gui.c:145
msgctxt "Edit|"
msgid "Edit options"
msgstr "Editera egenskaper"
......@@ -274,6 +278,7 @@ msgid "Edit program options"
msgstr "Editera programmets egenskaper"
#: gui.c:147
msgctxt "View|"
msgid "View recently opened files"
msgstr "Visa nyligen öppnade filer"
......@@ -299,15 +304,15 @@ msgstr "Ta bort fil från projektet"
msgid "Remove a file from the project"
msgstr "Ta bort en fil från projektet"
#: gui.c:151
#: gui.c:156
msgid "Copy filename to clipboard"
msgstr "Kopiera filnamn till urklipp"
#: gui.c:151
msgid "Copies the full path and filename to the clipboard"
msgstr "Kopierar filnamn inklusive hela sökvägen till urklipp"
#: gui.c:152
msgctxt "RightClickFilePopup"
msgid "Properties"
msgstr "Egenskaper"
#: gui.c:152
#: gui.c:158
msgid "Show file properties"
......@@ -321,6 +326,15 @@ msgstr "Ta bort fil från denna lista"
msgid "Remove file from this List"
msgstr "Ta bort fil från denna lista"
#: gui.c:156
msgid "Copy filename to clipboard"
msgstr "Kopiera filnamn till urklipp"
#: gui.c:158
msgctxt "RecentFilePopup"
msgid "Properties"
msgstr "Egenskaper"
#: gui.c:229
#: gui.c:1100
msgid "[UNTITLED]"
......@@ -402,26 +416,26 @@ msgstr "tolkning av alternativ misslyckades: %s"
msgid "Generated '%s' successfully!"
msgstr "Genererade '%s' framgångsrikt!"
#: main.c:156
#: main.c:158
#, c-format
msgid "Error initing preferences: %s"
msgstr "Fel vid initiering av inställningar: %s"
#: main.c:173
#: main.c:183
#: main.c:176
#: main.c:186
msgid "Environment variable exists, but doesn't point to a folder containing scite."
msgstr "Miljövariabeln finns, men hänvisar inte till någon mapp som innehåller scite."
#: main.c:200
#: main.c:203
#, c-format
msgid "Couldn't find a SciTE executable named '%s'!\n"
msgstr "Kunde inte hitta en körbar fil med namnet '%s'!\n"
msgstr "Kunde inte hitta en körbar fil för SciTE med namnet '%s'!\n"
#: main.c:201
#: main.c:204
msgid "Checking for SciTE in the standard locations instead.\n"
msgstr "Kollar efter SciTE på standard-platserna istället.\n"
#: main.c:214
#: main.c:217
msgid ""
"Warning! Couldn't locate SciTE!\n"
"Program will start, but you won't be able to open SciTE to edit files."
......@@ -429,7 +443,7 @@ msgstr ""
"Varning! Kunde inte hitta SciTE!\n"
"Programmet kommer att starta, men du kommer inte kunna använda SciTE för att editera filer."
#: main.c:240
#: main.c:243
#, c-format
msgid "An error occurred while trying to load the specified project file: %s"
msgstr "Ett fel uppstod vid öppning av en specifik projektfil: %s"
......@@ -520,11 +534,11 @@ msgstr "Stängde SciTE"
msgid "Switched to %s"
msgstr "Växlade till %s"
#: scite_utils.c:587
#: scite_utils.c:589
msgid "Connecting to Scite...."
msgstr "Ansluter till Scite...."
#: scite_utils.c:636
#: scite_utils.c:638
msgid "Launched SciTE"
msgstr "Startade SciTE"
......@@ -607,7 +621,7 @@ msgid "Project Files (*.xml)"
msgstr "Projektfiler (*.xml)"
#: tree_manipulation.c:459
#: tree_manipulation.c:534
#: tree_manipulation.c:537
msgid "All Files"
msgstr "Alla filer"
......@@ -620,22 +634,26 @@ msgid "LAMP Script Files"
msgstr "LAMP-skript-filer"
#: tree_manipulation.c:523
msgid "Java* Files"
msgstr "Java*-filer"
msgid "Java Files"
msgstr "Java-filer"
#: tree_manipulation.c:528
#: tree_manipulation.c:527
msgid "JavaScript Files"
msgstr "Javascript-filer"
#: tree_manipulation.c:531
msgid "HTML Files"
msgstr "HTML-filer"
#: tree_manipulation.c:569
#: tree_manipulation.c:572
msgid "You need to save the project before adding files."
msgstr "Du måste spara projektet innan du adderar filer."
#: tree_manipulation.c:582
#: tree_manipulation.c:585
msgid "Add Files"
msgstr "Lägg till filer"
#: tree_manipulation.c:663
#: tree_manipulation.c:666
msgid ""
"\n"
"The following files:\n"
......@@ -645,7 +663,7 @@ msgstr ""
"Följande filer:\n"
"\n"
#: tree_manipulation.c:689
#: tree_manipulation.c:691
#, c-format
msgid ""
"%s\n"
......@@ -659,3 +677,8 @@ msgstr ""
msgid "%s: Not a valid sciteproj XML file!"
msgstr "%s: Är inte en giltig sciteproj XML-fil!"
#~ msgid "version %s DEBUG"
#~ msgstr "version %s DEBUG"
#~ msgid "SciteProj version %s\n"
#~ msgstr "SciteProj version %s\n"
......@@ -43,6 +43,7 @@ void create_about_dialog();
gboolean handle_about_close_event(GtkWidget *widget,GdkEvent *event,gpointer user_data);
void link_button_cb(GtkButton *button,gpointer user_data);
gchar *version_string=NULL;
/**
* show_about_dialog
......@@ -128,15 +129,15 @@ void create_about_dialog()
// Show version of SciteProj
gchar *version_string;
gchar *about_dialog_version_string;
#ifdef _DEBUG
version_string=g_strdup_printf(_("version %s DEBUG"),sVersion);
about_dialog_version_string=g_strdup_printf("%s DEBUG",version_string);
#else
version_string=g_strdup_printf(_("version %s"),sVersion);
about_dialog_version_string=g_strdup_printf("%s",version_string);
#endif
version_string_label=gtk_label_new(version_string);
version_string_label=gtk_label_new(about_dialog_version_string);
gtk_label_set_selectable(GTK_LABEL(version_string_label),FALSE);
#if GTK_MAJOR_VERSION>=3
......@@ -347,7 +348,7 @@ void create_about_dialog()
*/
void show_version()
{
g_print(_("SciteProj version %s\n"), sVersion);
g_print("SciteProj %s\n",version_string);
}
......@@ -372,3 +373,21 @@ void link_button_cb(GtkButton *button,gpointer user_data)
gtk_link_button_set_visited(GTK_LINK_BUTTON(linkbutton),FALSE);
}
/**
*
*/
void init_version_string()
{
version_string=g_strdup_printf(_("version %s"),SCITEPROJ_VERSION);
}
/**
*
*/
void done_version_string()
{
g_free(version_string);
}
......@@ -29,5 +29,10 @@ void show_usage_dialog();
void show_version();
void init_version_string();
void done_version_string();
extern gchar *version_string;
#endif /*__HEADER_ABOUT_*/
......@@ -116,21 +116,21 @@ static GtkActionEntry sMenuActions[] =
{ "ViewMenuAction", NULL, N_("_View") },
{ "HelpMenuAction", NULL, N_("_Help") },
{ "OpenProjectAction", GTK_STOCK_OPEN, N_("_Open project"), "<control>O", N_("Open Project"), G_CALLBACK(openproject_menu_cb) },
{ "SaveProjectAction", GTK_STOCK_SAVE, N_("_Save project"), "<control>S", N_("Save Project"), G_CALLBACK(saveproject_menu_cb) },
{ "SaveProjectAsAction", GTK_STOCK_SAVE_AS, N_("Save project as..."), "<control><shift>S", N_("Save Project with a specific filename"), G_CALLBACK(saveproject_as_menu_cb) },
{ "ExitAction", GTK_STOCK_QUIT, N_("_Exit"), "<control>Q", N_("Exit"), G_CALLBACK(quit_menu_cb) },
{ "OpenProjectAction", GTK_STOCK_OPEN, NC_("File|","_Open project"), "<control>O", N_("Open Project"), G_CALLBACK(openproject_menu_cb) },
{ "SaveProjectAction", GTK_STOCK_SAVE, NC_("File|","_Save project"), "<control>S", N_("Save Project"), G_CALLBACK(saveproject_menu_cb) },
{ "SaveProjectAsAction", GTK_STOCK_SAVE_AS, NC_("File|","Save project as..."), "<control><shift>S", N_("Save Project with a specific filename"), G_CALLBACK(saveproject_as_menu_cb) },
{ "ExitAction", GTK_STOCK_QUIT, NC_("File|","_Exit"), "<control>Q", N_("Exit"), G_CALLBACK(quit_menu_cb) },
{ "CreateGroupAction", GTK_STOCK_DIRECTORY, N_("Create _group"), "", N_("Create a new group in the project"), G_CALLBACK(creategroup_menu_cb) },
{ "AddFileAction", GTK_STOCK_FILE, N_("Add _file"), "", N_("Add a file to the project"), G_CALLBACK(addfile_menu_cb) },
{ "RemoveFileAction", GTK_STOCK_DELETE, N_("Remove file(s)"), "", N_("Remove selected files from the project"), G_CALLBACK(removeitem_menu_cb) },
{ "CreateGroupAction", GTK_STOCK_DIRECTORY, NC_("Edit|","Create _group"), "", N_("Create a new group in the project"), G_CALLBACK(creategroup_menu_cb) },
{ "AddFileAction", GTK_STOCK_FILE, NC_("Edit|","Add _file"), "", N_("Add a file to the project"), G_CALLBACK(addfile_menu_cb) },
{ "RemoveFileAction", GTK_STOCK_DELETE, NC_("Edit|","Remove file(s)"), "", N_("Remove selected files from the project"), G_CALLBACK(removeitem_menu_cb) },
{ "ExpandAllGroupsAction", NULL, N_("Expand all groups"), "<control><shift>E", N_("Expand All Groups"), G_CALLBACK(expand_all_items_cb) },
{ "CollapseAllGroupsAction", NULL, N_("Collapse all groups"), "<control><shift>C", N_("Collapse All Groups"), G_CALLBACK(collapse_all_items_cb) },
{ "ExpandAllGroupsAction", NULL, NC_("Edit|","Expand all groups"), "<control><shift>E", N_("Expand All Groups"), G_CALLBACK(expand_all_items_cb) },
{ "CollapseAllGroupsAction", NULL, NC_("Edit|","Collapse all groups"), "<control><shift>C", N_("Collapse All Groups"), G_CALLBACK(collapse_all_items_cb) },
{ "SearchAction", GTK_STOCK_FIND, N_("Search"), "<control>F", N_("Search for a string in the project"), G_CALLBACK(search_dialog_cb) },
{ "SearchAction", GTK_STOCK_FIND, NC_("Edit|","Search"), "<control>F", N_("Search for a string in the project"), G_CALLBACK(search_dialog_cb) },
{ "AboutAction", GTK_STOCK_ABOUT, N_("_About"), "", N_("Show information about this application"), G_CALLBACK(about_menu_cb) },
{ "AboutAction", GTK_STOCK_ABOUT, NC_("Help|","_About"), "", N_("Show information about this application"), G_CALLBACK(about_menu_cb) },
{ "AddFilesPopupAction", GTK_STOCK_FILE, N_("Add files"), "", N_("Add files to the project"), G_CALLBACK(popup_add_files_cb) },
{ "AddGroupPopupAction", GTK_STOCK_DIRECTORY, N_("Create _group"), "", N_("Create a new group in the project"), G_CALLBACK(popup_add_group_cb) },
......@@ -141,21 +141,21 @@ static GtkActionEntry sMenuActions[] =
{ "RemoveGroupPopupAction", GTK_STOCK_DELETE, N_("Remove group from project"), "", N_("Remove a group and its children from the project"), G_CALLBACK(popup_remove_node_cb) },
{ "SortAscendingAction", GTK_STOCK_SORT_ASCENDING, N_("Sort group ascending"),"",N_("Sort the filenames ascending"),G_CALLBACK(sort_ascending_cb) },
{ "SortDescendingAction", GTK_STOCK_SORT_DESCENDING, N_("Sort group descending"),"",N_("Sort the filenames descending"),G_CALLBACK(sort_descending_cb) },
{ "PropertiesGroupPopupAction", GTK_STOCK_PROPERTIES, N_("Properties"), "", N_("Show group properties"), G_CALLBACK(group_properties_cb) },
{ "EditOptionsAction", GTK_STOCK_PROPERTIES, N_("Edit options"), "", N_("Edit program options"), G_CALLBACK(edit_options_cb) },
{ "PropertiesGroupPopupAction", GTK_STOCK_PROPERTIES, NC_("RightClickGroupPopup","Properties"), "", N_("Show group properties"), G_CALLBACK(group_properties_cb) },
{ "EditOptionsAction", GTK_STOCK_PROPERTIES, NC_("Edit|","Edit options"), "", N_("Edit program options"), G_CALLBACK(edit_options_cb) },
{ "ViewRecentAction" , GTK_STOCK_PROPERTIES, N_("View recently opened files"), "<control>R", N_("View Recent Files"), G_CALLBACK(recent_files_switch_visible) },
{ "ViewRecentAction" , GTK_STOCK_PROPERTIES, NC_("View|","View recently opened files"), "<control>R", N_("View Recent Files"), G_CALLBACK(recent_files_switch_visible) },
{ "OpenFilePopupAction", GTK_STOCK_OPEN, N_("Open file in SciTE"), "", N_("Open a file in SciTE"), G_CALLBACK(popup_open_file_cb) },
{ "RemoveFilePopupAction", GTK_STOCK_DELETE, N_("Remove file From project"), "", N_("Remove a file from the project"), G_CALLBACK(popup_remove_node_cb) },
{ "CopyFilenameToClipBoardAction", GTK_STOCK_COPY, N_("Copy filename to clipboard"), "", N_("Copies the full path and filename to the clipboard"), G_CALLBACK(copy_filename_to_clipboard_cb) },
{ "PropertiesPopupAction", GTK_STOCK_PROPERTIES, N_("Properties"), "", N_("Show file properties"), G_CALLBACK(file_properties_cb) },
{ "CopyFilenameToClipBoardAction", GTK_STOCK_COPY, NC_("Copy filename to clipboard"), "", N_("Copies the full path and filename to the clipboard"), G_CALLBACK(copy_filename_to_clipboard_cb) },
{ "PropertiesPopupAction", GTK_STOCK_PROPERTIES, NC_("RightClickFilePopup","Properties"), "", N_("Show file properties"), G_CALLBACK(file_properties_cb) },
{ "OpenRecentFilePopupAction", GTK_STOCK_OPEN, N_("Open file in SciTE"), "", N_("Open a file in SciTE"), G_CALLBACK(popup_open_recent_file_cb) },
{ "RemoveRecentFilePopupAction", GTK_STOCK_DELETE, N_("Remove file from this list"), "", N_("Remove file from this List"), G_CALLBACK(popup_remove_recent_file_cb) },
{ "CopyRecentToClipboardAction", GTK_STOCK_COPY, N_("Copy filename to clipboard"), "", N_("Copy filename to clipboard"), G_CALLBACK(copy_recent_filename_to_clipboard_cb) },
{ "PropertiesRecentPopupAction", GTK_STOCK_PROPERTIES, N_("Properties"), "", N_("Show file properties"), G_CALLBACK(properties_recent_file_cb) }
{ "PropertiesRecentPopupAction", GTK_STOCK_PROPERTIES, NC_("RecentFilePopup","Properties"), "", N_("Show file properties"), G_CALLBACK(properties_recent_file_cb) }
};
......
......@@ -128,15 +128,17 @@ int main(int argc, char *argv[])
}
exit(EXIT_SUCCESS);
}
init_version_string();
/*
Show SciteProj version
*/
if (version) {
show_version();
printf("\n");
done_version_string();
exit(EXIT_SUCCESS);
}
......@@ -154,6 +156,7 @@ int main(int argc, char *argv[])
// Init preferences
if (!init_prefs(&err)) {
g_print(_("Error initing preferences: %s"), err->message);
done_version_string();
return EXIT_FAILURE;
}
......@@ -265,6 +268,8 @@ EXITPOINT:
done_prefs();
done_version_string();
if (err) g_error_free(err);
return returnCode;
......
......@@ -336,7 +336,9 @@ gboolean launch_scite(gchar *instring,GError **err)
if (setenv(ipcDirectorName, responsePipePath, TRUE)) {
errCode = errno;
g_set_error(err, APP_SCITEPROJ_ERROR, -1, "%s: Could not launch Scite, setenv(\"%s\", \"%s\") failed, errno = %d = %s", __func__, ipcDirectorName, responsePipePath, errCode, strerror(errCode));
g_set_error(err, APP_SCITEPROJ_ERROR, -1,
"%s: Could not launch Scite, setenv(\"%s\", \"%s\") failed, error = %s",
__func__, ipcDirectorName, responsePipePath, strerror(errCode));
goto EXITPOINT;
}
......@@ -347,8 +349,8 @@ gboolean launch_scite(gchar *instring,GError **err)
if (setenv(ipcSciteName, requestPipePath, TRUE)) {
errCode = errno;
g_set_error(err, APP_SCITEPROJ_ERROR, -1,
"%s: Could not launch Scite, setenv(\"%s\", \"%s\") failed, errno = %d = %s",
__func__, ipcSciteName, requestPipePath, errCode, strerror(errCode));
"%s: Could not launch Scite, setenv(\"%s\", \"%s\") failed, error = %s",
__func__, ipcSciteName, requestPipePath, strerror(errCode));
goto EXITPOINT;
}
......@@ -358,16 +360,16 @@ gboolean launch_scite(gchar *instring,GError **err)
if (remove(responsePipePath) && errno != ENOENT) {
errCode = errno;
g_set_error(err, APP_SCITEPROJ_ERROR, -1,
"%s: Could not launch Scite, remove(\"%s\") failed, errno = %d = %s",
__func__, responsePipePath, errCode, strerror(errCode));
"%s: Could not launch Scite, remove(\"%s\") failed, error = %s",
__func__, responsePipePath, strerror(errCode));
goto EXITPOINT;
}
if (remove(requestPipePath) && errno != ENOENT) {
errCode = errno;
g_set_error(err, APP_SCITEPROJ_ERROR, -1,
"%s: Could not launch Scite, remove(\"%s\") failed, errno = %d = %s",
__func__, requestPipePath, errCode, strerror(errCode));
"%s: Could not launch Scite, remove(\"%s\") failed, error = %s",
__func__, requestPipePath, strerror(errCode));
goto EXITPOINT;
}
......@@ -377,8 +379,8 @@ gboolean launch_scite(gchar *instring,GError **err)
if (mkfifo(responsePipePath, 0777)) {
errCode = errno;
g_set_error(err, APP_SCITEPROJ_ERROR, -1,
"%s: Could not launch Scite, mkfifo(\"%s\") failed, errno = %d = %s",
__func__, responsePipePath, errCode, strerror(errCode));
"%s: Could not launch Scite, mkfifo(\"%s\") failed, error = %s",
__func__, responsePipePath, strerror(errCode));
goto EXITPOINT;
}
......@@ -388,8 +390,8 @@ gboolean launch_scite(gchar *instring,GError **err)
if ((sResponsePipeFD = open(responsePipePath, O_RDONLY | O_NONBLOCK)) <= 0) {
errCode = errno;
g_set_error(err, APP_SCITEPROJ_ERROR, -1,
"%s: Could not launch Scite, open(\"%s\") failed, errno = %d = %s",
__func__, responsePipePath, errCode, strerror(errCode));
"%s: Could not launch Scite, open(\"%s\") failed, error = %s",
__func__, responsePipePath, strerror(errCode));
goto EXITPOINT;
}
......@@ -398,8 +400,8 @@ gboolean launch_scite(gchar *instring,GError **err)
if ((sResponsePipeGIOChannel = g_io_channel_unix_new(sResponsePipeFD)) == NULL) {
errCode = errno;
g_set_error(err, APP_SCITEPROJ_ERROR, -1,
"%s: Could not launch Scite, g_io_channel_unix_new(\"%s\") failed, errno = %d = %s",
__func__, responsePipePath, errCode, strerror(errCode));
"%s: Could not launch Scite, g_io_channel_unix_new(\"%s\") failed, error = %s",
__func__, responsePipePath, strerror(errCode));
goto EXITPOINT;
}
......@@ -607,8 +609,8 @@ gboolean launch_scite(gchar *instring,GError **err)
if ((sRequestPipeFD = open(requestPipePath, O_WRONLY | O_NONBLOCK)) <= 0) {
errCode = errno;
g_set_error(err, APP_SCITEPROJ_ERROR, -1,
"%s: Could not launch Scite, open(\"%s\") failed, errno = %d = %s",
__func__, requestPipePath, errCode, strerror(errCode));
"%s: Could not launch Scite, open(\"%s\") failed, error = %s",
__func__, requestPipePath, strerror(errCode));
goto EXITPOINT;
}
......
......@@ -520,11 +520,14 @@ void build_file_filter(int n, GtkFileFilter* fileFilter ) {
gtk_file_filter_add_pattern(fileFilter, "*.php*");
break;
case 2 :
gtk_file_filter_set_name(fileFilter, _("Java* Files"));
gtk_file_filter_add_pattern(fileFilter, "*.js");
gtk_file_filter_set_name(fileFilter, _("Java Files"));
gtk_file_filter_add_pattern(fileFilter, "*.java");
break;
case 3 :
case 3 :
gtk_file_filter_set_name(fileFilter, _("JavaScript Files"));
gtk_file_filter_add_pattern(fileFilter, "*.js");
break;
case 4 :
gtk_file_filter_set_name(fileFilter, _("HTML Files"));
gtk_file_filter_add_pattern(fileFilter, "*.html");
gtk_file_filter_add_pattern(fileFilter, "*.htm");
......@@ -593,7 +596,7 @@ gboolean add_files_to_project(GtkTreeIter *parentIter, GError **err)
build_file_filter(gPrefs.last_file_filter, fileFilter);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), fileFilter);
}
for(i=0; i<5;i++) {
for(i=0; i<6;i++) {
fileFilter = gtk_file_filter_new();
build_file_filter(i, fileFilter);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), fileFilter);
......@@ -668,12 +671,11 @@ EXITPOINT:
gchar *tempstring = (gchar *) (listIter->data);
if (q<=10) {
temp=g_strdup_printf("%s%s\n",result_string,get_filename_from_full_path(tempstring));
temp=g_strdup_printf("%s%s\n",result_string,get_filename_from_full_path(tempstring));
g_free(result_string);
result_string=temp;
g_free(result_string);
result_string=temp;
}
q++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment