Skip to content

Commit

Permalink
Rename Stash data types to be independently named from Geany (so
Browse files Browse the repository at this point in the history
Stash can be reused for other projects).
Rename GeanyPrefGroup to StashGroup.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4776 ea778897-0a13-0410-b9d1-a72fbfd435f5
  • Loading branch information
ntrel committed Mar 18, 2010
1 parent 3ef6d41 commit 201b595
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 108 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Expand Up @@ -11,6 +11,12 @@
Move some '@file' doc-comments to the .c file.
* src/interface.c, geany.glade:
Add frame for 'Printing' prefs dialog page.
* src/sidebar.c, src/project.c, src/prefs.c, src/stash.c, src/stash.h,
src/keyfile.c, src/keyfile.h, src/search.c, src/plugins.c,
doc/stash-example.c:
Rename Stash data types to be independently named from Geany (so
Stash can be reused for other projects).
Rename GeanyPrefGroup to StashGroup.


2010-03-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Expand Down
2 changes: 1 addition & 1 deletion doc/stash-example.c
@@ -1,4 +1,4 @@
GeanyPrefGroup *group;
StashGroup *group;
gboolean china_enabled;
gchar *potter_name = NULL; /* strings must be initialised */
GKeyFile *keyfile;
Expand Down
8 changes: 4 additions & 4 deletions src/keyfile.c
Expand Up @@ -98,7 +98,7 @@ GPtrArray *pref_groups = NULL;

/* The group will be free'd on quitting.
* @param for_prefs_dialog is whether the group also has Prefs dialog items. */
void configuration_add_pref_group(struct GeanyPrefGroup *group, gboolean for_prefs_dialog)
void configuration_add_pref_group(struct StashGroup *group, gboolean for_prefs_dialog)
{
g_ptr_array_add(keyfile_groups, group);

Expand All @@ -109,7 +109,7 @@ void configuration_add_pref_group(struct GeanyPrefGroup *group, gboolean for_pre

static void init_pref_groups(void)
{
GeanyPrefGroup *group;
StashGroup *group;

group = stash_group_new(PACKAGE);
configuration_add_pref_group(group, TRUE);
Expand Down Expand Up @@ -207,7 +207,7 @@ SettingAction;
static void settings_action(GKeyFile *config, SettingAction action)
{
guint i;
GeanyPrefGroup *group;
StashGroup *group;

foreach_ptr_array(group, i, keyfile_groups)
{
Expand Down Expand Up @@ -1111,7 +1111,7 @@ void configuration_init(void)
void configuration_finalize(void)
{
guint i;
GeanyPrefGroup *group;
StashGroup *group;

foreach_ptr_array(group, i, keyfile_groups)
stash_group_free(group);
Expand Down
4 changes: 2 additions & 2 deletions src/keyfile.h
Expand Up @@ -33,9 +33,9 @@ void configuration_init(void);

void configuration_finalize(void);

struct GeanyPrefGroup;
struct StashGroup;

void configuration_add_pref_group(struct GeanyPrefGroup *group, gboolean for_prefs_dialog);
void configuration_add_pref_group(struct StashGroup *group, gboolean for_prefs_dialog);

void configuration_save(void);

Expand Down
2 changes: 1 addition & 1 deletion src/plugins.c
Expand Up @@ -942,7 +942,7 @@ static void on_save_settings(GKeyFile *config)
/* called even if plugin support is disabled */
void plugins_init(void)
{
GeanyPrefGroup *group;
StashGroup *group;

group = stash_group_new("plugins");
configuration_add_pref_group(group, TRUE);
Expand Down
2 changes: 1 addition & 1 deletion src/prefs.c
Expand Up @@ -109,7 +109,7 @@ PrefCallbackAction;
/* Synchronize Stash settings with widgets (see keyfile.c - init_pref_groups()). */
static void prefs_action(PrefCallbackAction action)
{
GeanyPrefGroup *group;
StashGroup *group;
guint i;

foreach_ptr_array(group, i, pref_groups)
Expand Down
4 changes: 2 additions & 2 deletions src/project.c
Expand Up @@ -58,7 +58,7 @@ ProjectPrefs project_prefs = { NULL, FALSE, FALSE };
static GeanyProjectPrivate priv;
static GeanyIndentPrefs indentation;

static GeanyPrefGroup *indent_group = NULL;
static StashGroup *indent_group = NULL;

static struct
{
Expand Down Expand Up @@ -1204,7 +1204,7 @@ void project_apply_prefs(void)

void project_init(void)
{
GeanyPrefGroup *group;
StashGroup *group;

group = stash_group_new("indentation");
/* defaults are copied from editor indent prefs */
Expand Down
4 changes: 2 additions & 2 deletions src/search.c
Expand Up @@ -98,7 +98,7 @@ static struct
}
settings = {0, NULL, FALSE, FALSE, FALSE, FALSE, FALSE};

static GeanyPrefGroup *fif_prefs = NULL;
static StashGroup *fif_prefs = NULL;


static struct
Expand Down Expand Up @@ -167,7 +167,7 @@ search_find_in_files(const gchar *utf8_search_text, const gchar *dir, const gcha

static void init_prefs(void)
{
GeanyPrefGroup *group;
StashGroup *group;

group = stash_group_new("search");
configuration_add_pref_group(group, TRUE);
Expand Down
4 changes: 2 additions & 2 deletions src/sidebar.c
Expand Up @@ -893,7 +893,7 @@ static void documents_menu_update(GtkTreeSelection *selection)
}


GeanyPrefGroup *stash_group = NULL;
StashGroup *stash_group = NULL;

static void on_load_settings(void)
{
Expand All @@ -913,7 +913,7 @@ static void on_save_settings(void)

void sidebar_init(void)
{
GeanyPrefGroup *group;
StashGroup *group;

group = stash_group_new(PACKAGE);
stash_group_add_boolean(group, &documents_show_paths, "documents_show_paths", TRUE);
Expand Down

0 comments on commit 201b595

Please sign in to comment.