Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
G
geany
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
geany
Commits
f2d33bc1
Kaydet (Commit)
f2d33bc1
authored
Nis 05, 2012
tarafından
Dimitar Zhekov
Kaydeden (comit)
Nick Treleaven
Nis 06, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add stash_group_free_settings() function to API
Frees the memory allocated for setting values in a group.
üst
c7b3a09f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
3 deletions
+32
-3
geanyfunctions.h
plugins/geanyfunctions.h
+2
-0
plugindata.h
src/plugindata.h
+3
-2
plugins.c
src/plugins.c
+2
-1
stash.c
src/stash.c
+23
-0
stash.h
src/stash.h
+2
-0
No files found.
plugins/geanyfunctions.h
Dosyayı görüntüle @
f2d33bc1
...
...
@@ -418,6 +418,8 @@
geany_functions->p_stash->stash_group_display
#define stash_group_update \
geany_functions->p_stash->stash_group_update
#define stash_group_free_settings \
geany_functions->p_stash->stash_group_free_settings
#define symbols_get_context_separator \
geany_functions->p_symbols->symbols_get_context_separator
#define build_activate_menu_item \
...
...
src/plugindata.h
Dosyayı görüntüle @
f2d33bc1
...
...
@@ -55,7 +55,7 @@ G_BEGIN_DECLS
* @warning You should not test for values below 200 as previously
* @c GEANY_API_VERSION was defined as an enum value, not a macro.
*/
#define GEANY_API_VERSION 21
4
#define GEANY_API_VERSION 21
5
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered.
...
...
@@ -701,6 +701,7 @@ typedef struct StashFuncs
const
gchar
*
property_name
,
GType
type
);
void
(
*
stash_group_display
)(
struct
StashGroup
*
group
,
GtkWidget
*
owner
);
void
(
*
stash_group_update
)(
struct
StashGroup
*
group
,
GtkWidget
*
owner
);
void
(
*
stash_group_free_settings
)(
struct
StashGroup
*
group
);
}
StashFuncs
;
...
...
@@ -716,7 +717,7 @@ SymbolsFuncs;
typedef
struct
BuildFuncs
{
void
(
*
build_activate_menu_item
)(
const
GeanyBuildGroup
grp
,
const
guint
cmd
);
const
gchar
*
(
*
build_get_current_menu_item
)(
const
GeanyBuildGroup
grp
,
const
guint
cmd
,
const
gchar
*
(
*
build_get_current_menu_item
)(
const
GeanyBuildGroup
grp
,
const
guint
cmd
,
const
GeanyBuildCmdEntries
field
);
void
(
*
build_remove_menu_item
)(
const
GeanyBuildSource
src
,
const
GeanyBuildGroup
grp
,
const
gint
cmd
);
...
...
src/plugins.c
Dosyayı görüntüle @
f2d33bc1
...
...
@@ -346,7 +346,8 @@ static StashFuncs stash_funcs = {
&
stash_group_add_entry
,
&
stash_group_add_widget_property
,
&
stash_group_display
,
&
stash_group_update
&
stash_group_update
,
&
stash_group_free_settings
};
static
SymbolsFuncs
symbols_funcs
=
{
...
...
src/stash.c
Dosyayı görüntüle @
f2d33bc1
...
...
@@ -335,6 +335,29 @@ StashGroup *stash_group_new(const gchar *name)
}
/** Frees the memory allocated for setting values in a group.
* Useful e.g. to avoid freeing strings individually.
* @note This is *not* called by stash_group_free().
* @param group . */
void
stash_group_free_settings
(
StashGroup
*
group
)
{
StashPref
*
entry
;
guint
i
;
foreach_ptr_array
(
entry
,
i
,
group
->
entries
)
{
if
(
entry
->
setting_type
==
G_TYPE_STRING
)
g_free
(
*
(
gchararray
*
)
entry
->
setting
);
else
if
(
entry
->
setting_type
==
G_TYPE_STRV
)
g_strfreev
(
*
(
gchararray
**
)
entry
->
setting
);
else
continue
;
*
(
gpointer
**
)
entry
->
setting
=
NULL
;
}
}
/** Frees a group.
* @param group . */
void
stash_group_free
(
StashGroup
*
group
)
...
...
src/stash.h
Dosyayı görüntüle @
f2d33bc1
...
...
@@ -60,6 +60,8 @@ gboolean stash_group_load_from_file(StashGroup *group, const gchar *filename);
gint
stash_group_save_to_file
(
StashGroup
*
group
,
const
gchar
*
filename
,
GKeyFileFlags
flags
);
void
stash_group_free_settings
(
StashGroup
*
group
);
void
stash_group_free
(
StashGroup
*
group
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment