Commit f2b1a704 authored by Andreas Rönnquist's avatar Andreas Rönnquist

Imported Upstream version 1.00

parent 16a906f7
......@@ -2,6 +2,13 @@
ChangeLog:
----------
1.00
* Remove functionality to rename and the required files
* Remove GTK_STOCK stuff to make it build cleanly on GTK3
* Simplify menus
* Make sure menu items are translated
* Update Swedish translation
0.7.96
* Fix build system not including CPPFLAGS
......
......@@ -13,10 +13,10 @@ endif
OBJECTS=$(OBJ)/about.o $(OBJ)/addfiles.o $(OBJ)/clipboard.o $(OBJ)/expand.o\
$(OBJ)/file_utils.o $(OBJ)/folder_config.o\
$(OBJ)/graphics.o $(OBJ)/gui.o $(OBJ)/gui_callbacks.o\
$(OBJ)/icon.o $(OBJ)/load_folder.o $(OBJ)/main.o $(OBJ)/prefs.o\
$(OBJ)/icon.o $(OBJ)/load_folder.o $(OBJ)/menus.o $(OBJ)/main.o $(OBJ)/prefs.o\
$(OBJ)/properties_dialog.o $(OBJ)/recent_files.o $(OBJ)/remove.o\
$(OBJ)/rename.o $(OBJ)/scite_utils.o $(OBJ)/script.o $(OBJ)/sort.o\
$(OBJ)/statusbar.o $(OBJ)/string_utils.o $(OBJ)/tree_manipulation.o
$(OBJ)/scite_utils.o $(OBJ)/script.o $(OBJ)/sort.o $(OBJ)/statusbar.o\
$(OBJ)/string_utils.o $(OBJ)/tree_manipulation.o
GRAPHICS_INCLUDES=$(GRPH)/dir-close.xpm \
$(GRPH)/dir-open.xpm \
......
0.7.96
\ No newline at end of file
1.00
......@@ -19,7 +19,7 @@ LOCALEDIR = ${DATADIR}/locale
SOURCES = about.c addfiles.c clipboard.c file_utils.c expand.c\
folder_config.c graphics.c gui.c gui_callbacks.c load_folder.c\
main.c prefs.c properties_dialog.c recent_files.c remove.c rename.c\
main.c menus.c prefs.c properties_dialog.c recent_files.c remove.c\
scite_utils.c script.c sort.c statusbar.c string_utils.c tree_manipulation.c\
menus.h
......
......@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: sciteproj 0.7.95alpha\n"
"Project-Id-Version: sciteproj 1.00\n"
"Report-Msgid-Bugs-To: gusnan@gusnan.se\n"
"POT-Creation-Date: 2013-09-03 16:17+0200\n"
"POT-Creation-Date: 2014-08-04 20:02+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -54,29 +54,21 @@ msgid ""
"is provided with this package."
msgstr ""
#: about.c:383
#: about.c:385
#, c-format
msgid "version %s"
msgstr ""
#: addfiles.c:247
msgid "Create Group"
msgstr ""
#: addfiles.c:268
msgid "Enter name of new group:"
msgstr ""
#: gui.c:153 gui.c:952
#: gui.c:142
msgid "[UNTITLED]"
msgstr ""
#: gui.c:783 recent_files.c:551 scite_utils.c:216
#: gui.c:775 recent_files.c:551 scite_utils.c:216
#, c-format
msgid "Opened %s"
msgstr ""
#: gui.c:796 gui_callbacks.c:121 recent_files.c:564 recent_files.c:605
#: gui.c:788 gui_callbacks.c:96 recent_files.c:564 recent_files.c:605
#, c-format
msgid ""
"Could not open selected file: \n"
......@@ -113,74 +105,150 @@ msgstr ""
msgid "option parsing failed: %s"
msgstr ""
#: main.c:133
#: main.c:137
#, c-format
msgid "A folder is expected as parameter to sciteproj..."
msgstr ""
#: main.c:172 main.c:182
#: main.c:176 main.c:186
msgid ""
"Environment variable exists, but doesn't point to a folder containing scite."
msgstr ""
#: main.c:199
#: main.c:203
#, c-format
msgid "Couldn't find a SciTE executable named '%s'!\n"
msgstr ""
#: main.c:200
#: main.c:204
msgid "Checking for SciTE in the standard locations instead.\n"
msgstr ""
#: main.c:213
#: 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."
msgstr ""
#: main.c:221
#: main.c:225
#, c-format
msgid "Could not setup the gui: %s"
msgstr ""
#: main.c:227
#: main.c:231
#, c-format
msgid "Not a valid folder!"
msgstr ""
#: properties_dialog.c:62
#: menus.c:117
msgid "_File"
msgstr ""
#: menus.c:118
msgid "_Edit"
msgstr ""
#: menus.c:119
msgid "_View"
msgstr ""
#: menus.c:120
msgid "_Help"
msgstr ""
#: menus.c:129
msgid "_Quit"
msgstr ""
#: menus.c:138
msgid "Edit properties"
msgstr ""
#: menus.c:144
msgid "Show Recent Files"
msgstr ""
#: menus.c:151
msgid "About"
msgstr ""
#: menus.c:164 menus.c:236
msgid "Open file in SciTE"
msgstr ""
#: menus.c:167 menus.c:238
msgid "Copy filename to clipboard"
msgstr ""
#: menus.c:173 menus.c:210 menus.c:239
msgid "Properties"
msgstr ""
#: menus.c:183
msgid "Sort folder contents"
msgstr ""
#: menus.c:185
msgid "Sort ascending by name"
msgstr ""
#: menus.c:186
msgid "Sort descending by name"
msgstr ""
#: menus.c:188
msgid "Sort ascending by extension"
msgstr ""
#: menus.c:189
msgid "Sort descending by extension"
msgstr ""
#: menus.c:212
msgid "Update folder content"
msgstr ""
#: menus.c:237
msgid "Remove file from this list"
msgstr ""
#: properties_dialog.c:64 properties_dialog.c:67
msgid "Group Properties"
msgstr ""
#: properties_dialog.c:66
#: properties_dialog.c:65 properties_dialog.c:159
msgid "OK"
msgstr ""
#: properties_dialog.c:72
msgid "Group name:"
msgstr ""
#: properties_dialog.c:67
#: properties_dialog.c:73
msgid "Full folder:"
msgstr ""
#: properties_dialog.c:150
#: properties_dialog.c:158 properties_dialog.c:161
msgid "File Properties"
msgstr ""
#: properties_dialog.c:174
#: properties_dialog.c:185
msgid "Filename:"
msgstr ""
#: properties_dialog.c:175
#: properties_dialog.c:186
msgid "Path:"
msgstr ""
#: properties_dialog.c:176
#: properties_dialog.c:187
msgid "File size:"
msgstr ""
#: recent_files.c:176
#: recent_files.c:177
msgid "Recently opened files:"
msgstr ""
#: remove.c:218 remove.c:223 rename.c:136 rename.c:141
#: remove.c:218 remove.c:223
msgid "Error!!!\n"
msgstr ""
......@@ -244,219 +312,3 @@ msgstr ""
#: statusbar.c:57
msgid "Welcome to SciteProj\n"
msgstr ""
#: tree_manipulation.c:207
msgid "C/C++ Files"
msgstr ""
#: tree_manipulation.c:218
msgid "LAMP Script Files"
msgstr ""
#: tree_manipulation.c:225
msgid "Java Files"
msgstr ""
#: tree_manipulation.c:229
msgid "JavaScript Files"
msgstr ""
#: tree_manipulation.c:233
msgid "HTML Files"
msgstr ""
#: tree_manipulation.c:239
msgid "All Files"
msgstr ""
#: tree_manipulation.c:274
msgid "You need to save the project before adding files."
msgstr ""
#: tree_manipulation.c:287
msgid "Add Files"
msgstr ""
#: tree_manipulation.c:367
msgid ""
"\n"
"The following files:\n"
"\n"
msgstr ""
#: tree_manipulation.c:392
#, c-format
msgid ""
"%s\n"
"couldn't be added, because they were already present in the project.\n"
msgstr ""
#: menus.h:95
msgctxt "Menu|"
msgid "_File"
msgstr ""
#: menus.h:96
msgctxt "Menu|"
msgid "_Edit"
msgstr ""
#: menus.h:97
msgctxt "Menu|"
msgid "_View"
msgstr ""
#: menus.h:98
msgctxt "Menu|"
msgid "_Help"
msgstr ""
#: menus.h:100
msgctxt "Menu|File|"
msgid "_Exit"
msgstr ""
#: menus.h:103
msgctxt "Menu|Edit|"
msgid "Create _group"
msgstr ""
#: menus.h:105
msgctxt "Menu|Edit|"
msgid "Create _file"
msgstr ""
#: menus.h:107
msgctxt "Menu|Edit|"
msgid "Delete file(s)"
msgstr ""
#: menus.h:110
msgctxt "Menu|Edit|"
msgid "Expand all groups"
msgstr ""
#: menus.h:112
msgctxt "Menu|Edit|"
msgid "Collapse all groups"
msgstr ""
#: menus.h:115
msgctxt "Menu|Help|"
msgid "_About"
msgstr ""
#: menus.h:118
msgctxt "Menu|Edit|"
msgid "Create files"
msgstr ""
#: menus.h:120
msgctxt "Menu|Edit|"
msgid "Create folder"
msgstr ""
#: menus.h:123
msgctxt "Menu|Popup|Group"
msgid "Create file"
msgstr ""
#: menus.h:125
msgctxt "Menu|Popup|Group"
msgid "Add folder"
msgstr ""
#: menus.h:127
msgctxt "Menu|Popup|Group"
msgid "Rename folder"
msgstr ""
#: menus.h:129
msgctxt "Menu|Popup|Group"
msgid "Delete folder"
msgstr ""
#: menus.h:131
msgctxt "Menu|Edit|"
msgid "Sort folder ascending by name"
msgstr ""
#: menus.h:133
msgctxt "Menu|Edit"
msgid "Sort folder descending by name"
msgstr ""
#: menus.h:135
msgctxt "Menu|Edit|"
msgid "Sort folder ascending by extension"
msgstr ""
#: menus.h:137
msgctxt "Menu|Edit|"
msgid "Sort folder descending by extension"
msgstr ""
#: menus.h:139
msgctxt "Menu|Popup|Group"
msgid "Properties"
msgstr ""
#: menus.h:141
msgctxt "Menu|Edit|"
msgid "Edit options"
msgstr ""
#: menus.h:144
msgctxt "Menu|Sort|"
msgid "Sort folder content"
msgstr ""
#: menus.h:147
msgctxt "Menu|Reload"
msgid "Refresh folder content"
msgstr ""
#: menus.h:150
msgctxt "Menu|View|"
msgid "View recently opened files"
msgstr ""
#: menus.h:153
msgctxt "Menu|Popup|File"
msgid "Open file in SciTE"
msgstr ""
#: menus.h:155
msgctxt "Menu|Popup|File"
msgid "Delete file"
msgstr ""
#: menus.h:157
msgctxt "Menu|Popup|File"
msgid "Copy filename to clipboard"
msgstr ""
#: menus.h:159
msgctxt "Menu|Popup|File"
msgid "Properties"
msgstr ""
#: menus.h:162
msgctxt "Menu|Popup|RecentFile"
msgid "Open file in SciTE"
msgstr ""
#: menus.h:164
msgctxt "Menu|Popup|RecentFile"
msgid "Remove file from this list"
msgstr ""
#: menus.h:166
msgctxt "Menu|Popup|RecentFile"
msgid "Copy filename to clipboard"
msgstr ""
#: menus.h:169
msgctxt "Menu|Popup|RecentFile"
msgid "Properties"
msgstr ""
This diff is collapsed.
.TH sciteproj 1 "9 January 2014" "Version 0.7.96"
.TH sciteproj 1 "4 August 2014" "Version 1.00"
.SH NAME
SciteProj - a Project Manager for the SciTE editor
.SH DESCRIPTION
......
......@@ -304,7 +304,9 @@ void create_about_dialog()
gtk_text_buffer_select_range (textbuffer_info,&iter,&iter);
// Create an ok button
ok_button=gtk_button_new_from_stock(GTK_STOCK_OK);
ok_button = gtk_button_new();
gtk_button_set_use_underline(GTK_BUTTON(ok_button), TRUE);
gtk_button_set_label(GTK_BUTTON(ok_button), "_OK");
#if GTK_MAJOR_VERSION>=3
gtk_widget_set_halign(ok_button,GTK_ALIGN_END);
......
......@@ -62,16 +62,20 @@ GdkCursor *busy_cursor=NULL;
*/
gboolean load_graphics(GtkWidget *widget, GError **err)
{
program_icon_pixbuf=gdk_pixbuf_new_from_xpm_data((const char **)sciteproj_xpm);
#if GTK_MAJOR_VERSION>=3
GtkIconTheme *icon_theme;
icon_theme = gtk_icon_theme_get_default();
#endif
//directory_closed_pixbuf=gdk_pixbuf_new_from_xpm_data((const char**)dir_close_xpm);
program_icon_pixbuf=gdk_pixbuf_new_from_xpm_data((const char **)sciteproj_xpm);
if (prefs.use_stock_folder_icon) {
// use GTK_STOCK_DIRECTORY
#if GTK_MAJOR_VERSION>=3
directory_closed_pixbuf = gtk_widget_render_icon_pixbuf(widget, GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU);
directory_open_pixbuf = gtk_widget_render_icon_pixbuf(widget, GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU);
directory_closed_pixbuf = gtk_icon_theme_load_icon(icon_theme, "folder", 14, 0, NULL);
directory_open_pixbuf = gtk_icon_theme_load_icon(icon_theme, "folder", 14, 0, NULL);
#else
directory_closed_pixbuf = gtk_widget_render_icon(widget, GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU, NULL);
directory_open_pixbuf = gtk_widget_render_icon(widget, GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU, NULL);
......@@ -82,8 +86,7 @@ gboolean load_graphics(GtkWidget *widget, GError **err)
directory_closed_pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)dir_close_xpm);
}
standard_cursor=gdk_cursor_new(GDK_X_CURSOR);
busy_cursor=gdk_cursor_new(GDK_WATCH);
......
This diff is collapsed.
......@@ -51,7 +51,6 @@ gboolean tree_row_is_expanded(GtkTreePath *path);
// Expand a row
void expand_tree_row(GtkTreePath *path, gboolean expandChildren);
void collapse_tree_row(GtkTreePath *path);
gboolean dialog_response_is_exit(gint test);
......
......@@ -53,7 +53,6 @@
#include "addfiles.h"
#include "recent_files.h"
#include "remove.h"
#include "rename.h"
#include "sort.h"
#include "load_folder.h"
......@@ -63,30 +62,6 @@
#include "script.h"
/**
* Expands all folders
*/
gboolean foreach_expand(GtkTreeModel *model,GtkTreePath *path,
GtkTreeIter *iter,gpointer data)
{
expand_tree_row(path,TRUE);
return FALSE;
}
/**
* Collapses all folders
*/
gboolean foreach_collapse(GtkTreeModel *model,GtkTreePath *path,
GtkTreeIter *iter,gpointer data)
{
collapse_tree_row(path);
return FALSE;
}
/**
* Open the selected file.
* This is called when a file is rightclicked and open is selected in the menu
......@@ -106,7 +81,7 @@ void popup_open_file_cb()
goto EXITPOINT;
}
if (!open_filename(clicked_node.name,(gchar*)(get_project_directory()),&err)) {
if (!open_filename(clicked_node.name, (gchar*)(get_project_directory()), &err)) {
goto EXITPOINT;
}
......@@ -132,26 +107,13 @@ EXITPOINT:
/**
*
* Open the LUA rc file for the project folder
*/
void collapse_all_items_cb()
void edit_properties_cb()
{
gtk_tree_model_foreach(gtk_tree_view_get_model(GTK_TREE_VIEW(projectTreeView)),
foreach_collapse,NULL);
}
/**
* edit_options_cb
* opens the user-specific options-file ($HOME/.sciteproj) in SciTE.
*/
void edit_options_cb()
{
GError *err=NULL;
gchar *command=NULL;
GError *err = NULL;
gchar *command = NULL;
if ((command = g_strdup_printf("open:%s\n", prefs_filename)) == NULL) {
g_set_error(&err, APP_SCITEPROJ_ERROR, -1,
......@@ -166,23 +128,13 @@ void edit_options_cb()
activate_scite(NULL);
if (prefs.give_scite_focus==TRUE) {
send_scite_command((gchar*)"focus:0",NULL);
send_scite_command((gchar*)"focus:0", NULL);
}
}
}
}
/**
*
*/
void expand_all_items_cb()
{
gtk_tree_model_foreach(gtk_tree_view_get_model(GTK_TREE_VIEW(projectTreeView)),
foreach_expand,NULL);
}
/**
* step-through function for expand/collapse folder
*
......@@ -190,7 +142,7 @@ void expand_all_items_cb()
* @param newiter
* @param tree_path
*/
static void fix_folders_step_through(GtkTreeView *tree_view, GtkTreeIter newiter,GtkTreePath *tree_path)
static void fix_folders_step_through(GtkTreeView *tree_view, GtkTreeIter newiter, GtkTreePath *tree_path)
{
GtkTreeModel *tree_model = gtk_tree_view_get_model(tree_view);
......@@ -212,20 +164,20 @@ static void fix_folders_step_through(GtkTreeView *tree_view, GtkTreeIter newiter
gboolean groupIsExpanded = tree_row_is_expanded(srcPath);
if (groupIsExpanded) {
set_tree_node_icon(&iter,directory_open_pixbuf,&error);
set_tree_node_icon(&iter, directory_open_pixbuf, &error);
} else {
set_tree_node_icon(&iter,directory_closed_pixbuf,&error);
set_tree_node_icon(&iter, directory_closed_pixbuf, &error);
}
set_tree_node_expanded(&iter, groupIsExpanded, NULL);
gtk_tree_model_get(tree_model, &iter, COLUMN_FILEPATH, &relFilePath, -1);
if (gtk_tree_model_iter_has_child(tree_model,&iter)) {
if (gtk_tree_model_iter_has_child(tree_model, &iter)) {
GtkTreeIter newIter;
gtk_tree_model_iter_children(tree_model,&newIter,&iter);
fix_folders_step_through(tree_view,newIter,tree_path);
gtk_tree_model_iter_children(tree_model, &newIter, &iter);
fix_folders_step_through(tree_view,newIter, tree_path);
}
g_free(relFilePath);
......@@ -381,11 +333,13 @@ gboolean key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer userData)
{
break;
}
/*
case GDK_KEY_F2:
{
do_rename_node(TRUE);
return TRUE;
}
*/
default:
{
debug_printf("key_press_cb: keyval = %d = '%c', hardware_keycode = %d\n",
......@@ -523,3 +477,4 @@ void refresh_folder_cb()
}
}
......@@ -24,9 +24,6 @@
#define APP_SCITEPROJ_ERROR g_quark_from_static_string("APP_GUI_ERROR")
gboolean foreach_expand(GtkTreeModel *model,GtkTreePath *path,
GtkTreeIter *iter,gpointer data);
void row_expand_or_collapse_cb(GtkTreeView *treeview, GtkTreeIter *arg1, GtkTreePath *arg2, gpointer user_data);
void quit_menu_cb();
......@@ -35,10 +32,7 @@ void creategroup_menu_cb();
void popup_open_file_cb();
void expand_all_items_cb();
void collapse_all_items_cb();
void edit_options_cb();
void edit_properties_cb();
void refresh_folder_cb();
......
......@@ -234,9 +234,9 @@ int main(int argc, char *argv[])
}
// Should we load a folder?
set_project_filepath(dir_to_load,NULL);
set_project_filepath(dir_to_load, NULL);
load_folder(dir_to_load,NULL);
load_folder(dir_to_load, NULL);
init_scite_connection();
......
This diff is collapsed.
/**
* menus.h - Menus for SciteProj
*
* Copyright 2009-2012 Andreas Rönnquist
* Copyright 2009-2014 Andreas Rönnquist
*
* This file is part of SciteProj.
*
......@@ -25,169 +25,30 @@
/*
Menu definitions
*/
static gchar *sMenuDefXML = (gchar*)\
"<ui> \
<menubar> \
<menu name=\"FileMenu\" action=\"FileMenuAction\"> \
<menuitem name=\"ExitItem\" action=\"ExitAction\" /> \
</menu> \
<menu name=\"EditMenu\" action=\"EditMenuAction\"> \
<menuitem name=\"ExpandAllGroupsItem\" action=\"ExpandAllGroupsAction\" /> \
<menuitem name=\"CollapseAllGroupsItem\" action=\"CollapseAllGroupsAction\" /> \
<separator/> \
<menuitem name=\"Edit Options\" action=\"EditOptionsAction\" /> \
</menu> \
<menu name=\"ViewMenu\" action=\"ViewMenuAction\"> \
<menuitem name=\"ViewRecentMenuItem\" action=\"ViewRecentAction\"/> \
</menu> \
<menu name=\"HelpMenu\" action=\"HelpMenuAction\"> \
<menuitem name=\"AboutItem\" action=\"AboutAction\"/> \
</menu> \
</menubar> \
<popup name=\"FilePopup\" action=\"FilePopupAction\"> \
<menuitem name=\"OpenFilePopupItem\" action=\"OpenFilePopupAction\"/> \
<menuitem name=\"CopyFilenameToClipBoard\" action=\"CopyFilenameToClipBoardAction\"/> \
<separator/> \
<menuitem name=\"PropertiesPopupItem\" action=\"PropertiesPopupAction\"/> \
</popup> \
<popup name=\"GroupPopup\" action=\"GroupPopupAction\"> \
<separator/> \
<menu name=\"SortPopup\" action=\"SortPopupAction\">\
<menuitem name=\"SortAscendingItem\" action=\"SortAscendingAction\"/> \
<menuitem name=\"SortDescendingItem\" action=\"SortDescendingAction\"/> \
<separator/> \
<menuitem name=\"SortAscendingExtensionItem\" action=\"SortAscendingExtensionAction\"/> \
<menuitem name=\"SortDescendingExtensionItem\" action=\"SortDescendingExtensionAction\"/> \
</menu> \
<separator/> \
<menuitem name=\"ReloadFolderItem\" action=\"ReloadFolderAction\"/> \
<separator/> \
<menuitem name=\"ProperiesGroupPopupItem\" action=\"PropertiesGroupPopupAction\"/> \