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
6c8e8027
Kaydet (Commit)
6c8e8027
authored
Eki 19, 2011
tarafından
Nick Treleaven
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refactor without stash_foreach_various_pref
Function was only used once.
üst
1a14e486
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
23 deletions
+19
-23
stash.c
src/stash.c
+19
-23
No files found.
src/stash.c
Dosyayı görüntüle @
6c8e8027
...
...
@@ -1009,27 +1009,6 @@ static void stash_tree_destroy_cb(GtkWidget *widget, gpointer user_data)
}
typedef
void
(
*
stash_foreach_pref_func
)(
StashGroup
*
group
,
StashPref
*
entry
,
gpointer
container
,
PrefAction
action
);
static
void
stash_foreach_various_pref
(
GPtrArray
*
group_array
,
stash_foreach_pref_func
pref_func
,
gpointer
container
,
PrefAction
action
)
{
StashGroup
*
group
;
guint
i
,
j
;
StashPref
*
entry
;
foreach_ptr_array
(
group
,
i
,
group_array
)
{
if
(
group
->
various
)
{
foreach_ptr_array
(
entry
,
j
,
group
->
entries
)
pref_func
(
group
,
entry
,
container
,
action
);
}
}
}
static
void
stash_tree_append_pref
(
StashGroup
*
group
,
StashPref
*
entry
,
GtkListStore
*
store
,
PrefAction
action
)
{
...
...
@@ -1050,6 +1029,24 @@ static void stash_tree_append_pref(StashGroup *group, StashPref *entry, GtkListS
}
static
void
stash_tree_append_prefs
(
GPtrArray
*
group_array
,
GtkListStore
*
store
,
PrefAction
action
)
{
StashGroup
*
group
;
guint
i
,
j
;
StashPref
*
entry
;
foreach_ptr_array
(
group
,
i
,
group_array
)
{
if
(
group
->
various
)
{
foreach_ptr_array
(
entry
,
j
,
group
->
entries
)
stash_tree_append_pref
(
group
,
entry
,
store
,
action
);
}
}
}
/* Setups a simple editor for stash preferences based on the widget arguments.
* group_array - Array of groups which's settings will be edited.
* tree - GtkTreeView in which to edit the preferences. Must be empty. */
...
...
@@ -1062,8 +1059,7 @@ void stash_tree_setup(GPtrArray *group_array, GtkTreeView *tree)
GtkObject
*
adjustment
;
store
=
gtk_list_store_new
(
STASH_TREE_COUNT
,
G_TYPE_STRING
,
G_TYPE_POINTER
);
stash_foreach_various_pref
(
group_array
,
(
stash_foreach_pref_func
)
stash_tree_append_pref
,
store
,
PREF_DISPLAY
);
stash_tree_append_prefs
(
group_array
,
store
,
PREF_DISPLAY
);
gtk_tree_sortable_set_sort_column_id
(
GTK_TREE_SORTABLE
(
store
),
STASH_TREE_NAME
,
GTK_SORT_ASCENDING
);
...
...
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