Adjust coding style (no code changes).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4159 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
2c7c2b91fc
commit
210fa0018a
@ -12,6 +12,8 @@
|
||||
Fix a compiler warning.
|
||||
* src/document.c:
|
||||
Fix crash when opening documents.
|
||||
* src/build.c, src/build.h, src/project.c:
|
||||
Adjust coding style (no code changes).
|
||||
|
||||
|
||||
2009-09-04 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
728
src/build.c
728
src/build.c
File diff suppressed because it is too large
Load Diff
16
src/build.h
16
src/build.h
@ -140,13 +140,15 @@ typedef struct GeanyBuildCommand
|
||||
gboolean old; /**< Converted from old format. */
|
||||
} GeanyBuildCommand;
|
||||
|
||||
extern GeanyBuildCommand *non_ft_proj, *exec_proj; /* project command array pointers */
|
||||
/* project command array pointers */
|
||||
extern GeanyBuildCommand *non_ft_proj;
|
||||
extern GeanyBuildCommand *exec_proj;
|
||||
extern gchar *regex_proj; /* project non-fileregex string */
|
||||
|
||||
typedef struct BuildMenuItems
|
||||
{
|
||||
GtkWidget *menu;
|
||||
GtkWidget **menu_item[GEANY_GBG_COUNT+1]; /* +1 for fixed items */
|
||||
GtkWidget **menu_item[GEANY_GBG_COUNT + 1]; /* +1 for fixed items */
|
||||
} BuildMenuItems;
|
||||
|
||||
/* a structure defining the destinations for a set of groups of commands & regex */
|
||||
@ -165,11 +167,11 @@ void build_init(void);
|
||||
void build_finalize(void);
|
||||
|
||||
/* menu configuration dialog functions */
|
||||
GtkWidget *build_commands_table( GeanyDocument *doc, GeanyBuildSource dst, TableData *data, GeanyFiletype *ft );
|
||||
GtkWidget *build_commands_table(GeanyDocument *doc, GeanyBuildSource dst, TableData *data, GeanyFiletype *ft);
|
||||
|
||||
gboolean build_read_commands( BuildDestination *dst, TableData data, gint response );
|
||||
gboolean build_read_commands(BuildDestination *dst, TableData data, gint response);
|
||||
|
||||
void build_free_fields( TableData data );
|
||||
void build_free_fields(TableData data);
|
||||
|
||||
void build_set_non_ft_wd_to_proj(TableData table_data);
|
||||
|
||||
@ -256,9 +258,9 @@ GeanyBuildCommand *build_get_current_menu_item(GeanyBuildGroup grp, gint cmd, gi
|
||||
BuildMenuItems *build_get_menu_items(gint filetype_idx);
|
||||
|
||||
/* load and store menu configuration */
|
||||
void build_load_menu( GKeyFile *config, GeanyBuildSource dst, gpointer ptr);
|
||||
void build_load_menu(GKeyFile *config, GeanyBuildSource dst, gpointer ptr);
|
||||
|
||||
void build_save_menu( GKeyFile *config, gpointer ptr, GeanyBuildSource src);
|
||||
void build_save_menu(GKeyFile *config, gpointer ptr, GeanyBuildSource src);
|
||||
|
||||
void build_set_group_count(GeanyBuildGroup grp, gint count);
|
||||
|
||||
|
@ -63,7 +63,7 @@ static GeanyPrefGroup *indent_group = NULL;
|
||||
static struct
|
||||
{
|
||||
gchar *project_file_path; /* in UTF-8 */
|
||||
} local_prefs = {NULL};
|
||||
} local_prefs = { NULL };
|
||||
|
||||
|
||||
static gboolean entries_modified;
|
||||
@ -109,7 +109,8 @@ void project_new(void)
|
||||
PropertyDialogElements *e;
|
||||
gint response;
|
||||
|
||||
if (! project_ask_close()) return;
|
||||
if (! project_ask_close())
|
||||
return;
|
||||
|
||||
g_return_if_fail(app->project == NULL);
|
||||
|
||||
@ -324,7 +325,7 @@ static void update_ui(void)
|
||||
static void remove_foreach_project_filetype( gpointer data, gpointer user_data )
|
||||
{
|
||||
GeanyFiletype *ft = (GeanyFiletype*)data;
|
||||
if (ft!=NULL)
|
||||
if (ft != NULL)
|
||||
{
|
||||
setptr( ft->projfilecmds, NULL);
|
||||
setptr(ft->projerror_regex_string, NULL);
|
||||
@ -332,6 +333,7 @@ static void remove_foreach_project_filetype( gpointer data, gpointer user_data )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* open_default will make function reload default session files on close */
|
||||
void project_close(gboolean open_default)
|
||||
{
|
||||
@ -343,15 +345,15 @@ void project_close(gboolean open_default)
|
||||
write_config(FALSE);
|
||||
|
||||
/* remove project filetypes build entries */
|
||||
if (app->project->build_filetypes_list!=NULL)
|
||||
if (app->project->build_filetypes_list != NULL)
|
||||
{
|
||||
g_ptr_array_foreach( app->project->build_filetypes_list, remove_foreach_project_filetype, NULL );
|
||||
g_ptr_array_foreach( app->project->build_filetypes_list, remove_foreach_project_filetype, NULL);
|
||||
g_ptr_array_free(app->project->build_filetypes_list, FALSE);
|
||||
}
|
||||
|
||||
/* remove project non filetype build menu items */
|
||||
build_remove_menu_item( GEANY_BCS_PROJ, GEANY_GBG_NON_FT, -1 );
|
||||
build_remove_menu_item( GEANY_BCS_PROJ, GEANY_GBG_EXEC, -1 );
|
||||
build_remove_menu_item(GEANY_BCS_PROJ, GEANY_GBG_NON_FT, -1);
|
||||
build_remove_menu_item(GEANY_BCS_PROJ, GEANY_GBG_EXEC, -1);
|
||||
|
||||
/* remove project regexen */
|
||||
setptr(regex_proj, NULL);
|
||||
@ -383,13 +385,13 @@ void project_close(gboolean open_default)
|
||||
update_ui();
|
||||
}
|
||||
|
||||
static void on_set_use_base_path_clicked( GtkWidget *unused1, gpointer user_data )
|
||||
{
|
||||
TableData td = (TableData)user_data;
|
||||
|
||||
build_set_non_ft_wd_to_proj(td);
|
||||
static void on_set_use_base_path_clicked(GtkWidget *unused1, gpointer user_data)
|
||||
{
|
||||
build_set_non_ft_wd_to_proj((TableData)user_data);
|
||||
}
|
||||
|
||||
|
||||
static void create_properties_dialog(PropertyDialogElements *e)
|
||||
{
|
||||
GtkWidget *table, *notebook, *build_table;
|
||||
@ -733,7 +735,8 @@ static gboolean update_config(const PropertyDialogElements *e)
|
||||
setptr(p->description, g_strdup(gtk_text_buffer_get_text(buffer, &start, &end, FALSE)));
|
||||
|
||||
/* read the project build menu */
|
||||
if ( doc!=NULL )ft=doc->file_type;
|
||||
if ( doc!=NULL )
|
||||
ft = doc->file_type;
|
||||
if ( ft!=NULL )
|
||||
{
|
||||
menu_dst.dst[GEANY_GBG_FT] = &(ft->projfilecmds);
|
||||
@ -750,9 +753,10 @@ static gboolean update_config(const PropertyDialogElements *e)
|
||||
menu_dst.dst[GEANY_GBG_EXEC] = &exec_proj;
|
||||
menu_dst.nonfileregexstr = ®ex_proj;
|
||||
build_read_commands( &menu_dst, e->build_properties, GTK_RESPONSE_ACCEPT );
|
||||
if (ft!=NULL && ft->projfilecmds!=oldvalue && ft->project_list_entry<0)
|
||||
if (ft != NULL && ft->projfilecmds != oldvalue && ft->project_list_entry < 0)
|
||||
{
|
||||
if (p->build_filetypes_list==NULL)p->build_filetypes_list = g_ptr_array_new();
|
||||
if (p->build_filetypes_list == NULL)
|
||||
p->build_filetypes_list = g_ptr_array_new();
|
||||
ft->project_list_entry = p->build_filetypes_list->len;
|
||||
g_ptr_array_add(p->build_filetypes_list, ft);
|
||||
}
|
||||
@ -813,8 +817,7 @@ static void run_dialog(GtkWidget *dialog, GtkWidget *entry)
|
||||
g_free(locale_dir);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (gtk_file_chooser_get_action(GTK_FILE_CHOOSER(dialog)) != GTK_FILE_CHOOSER_ACTION_OPEN)
|
||||
else if (gtk_file_chooser_get_action(GTK_FILE_CHOOSER(dialog)) != GTK_FILE_CHOOSER_ACTION_OPEN)
|
||||
{
|
||||
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), utf8_filename);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user