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
3b105ec8
Kaydet (Commit)
3b105ec8
authored
Şub 27, 2017
tarafından
Colomban Wendling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1404 from b4n/search/gtk-3-20-history
Fix search history filling on GTK >= 3.20
üst
6d006220
9a230e1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
search.c
src/search.c
+24
-24
No files found.
src/search.c
Dosyayı görüntüle @
3b105ec8
...
...
@@ -126,12 +126,14 @@ find_dlg = {NULL, NULL, FALSE, {0, 0}};
static
struct
{
GtkWidget
*
dialog
;
GtkWidget
*
find_combobox
;
GtkWidget
*
find_entry
;
GtkWidget
*
replace_combobox
;
GtkWidget
*
replace_entry
;
gboolean
all_expanded
;
gint
position
[
2
];
/* x, y */
}
replace_dlg
=
{
NULL
,
NULL
,
NULL
,
FALSE
,
{
0
,
0
}};
replace_dlg
=
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
FALSE
,
{
0
,
0
}};
static
struct
{
...
...
@@ -610,7 +612,7 @@ on_widget_key_pressed_set_focus(GtkWidget *widget, GdkEventKey *event, gpointer
static
void
create_replace_dialog
(
void
)
{
GtkWidget
*
label_find
,
*
label_replace
,
*
entry_find
,
*
entry_replace
,
GtkWidget
*
label_find
,
*
label_replace
,
*
check_close
,
*
button
,
*
rbox
,
*
fbox
,
*
vbox
,
*
exp
,
*
bbox
;
GtkSizeGroup
*
label_size
;
...
...
@@ -641,27 +643,27 @@ static void create_replace_dialog(void)
label_replace
=
gtk_label_new_with_mnemonic
(
_
(
"Replace wit_h:"
));
gtk_misc_set_alignment
(
GTK_MISC
(
label_replace
),
0
,
0
.
5
);
entry_find
=
gtk_combo_box_text_new_with_entry
();
ui_entry_add_clear_icon
(
GTK_ENTRY
(
gtk_bin_get_child
(
GTK_BIN
(
entry_find
))
));
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label_find
),
entry_find
);
gtk_
entry_set_width_chars
(
GTK_ENTRY
(
gtk_bin_get_child
(
GTK_BIN
(
entry_find
))),
50
);
ui_hookup_widget
(
replace_dlg
.
dialog
,
entry_find
,
"entry_find"
);
replace_dlg
.
find_entry
=
gtk_bin_get_child
(
GTK_BIN
(
entry_find
)
);
replace_dlg
.
find_combobox
=
gtk_combo_box_text_new_with_entry
();
replace_dlg
.
find_entry
=
gtk_bin_get_child
(
GTK_BIN
(
replace_dlg
.
find_combobox
));
ui_entry_add_clear_icon
(
GTK_ENTRY
(
replace_dlg
.
find_entry
)
);
gtk_
label_set_mnemonic_widget
(
GTK_LABEL
(
label_find
),
replace_dlg
.
find_combobox
);
gtk_entry_set_width_chars
(
GTK_ENTRY
(
replace_dlg
.
find_entry
),
50
);
ui_hookup_widget
(
replace_dlg
.
dialog
,
replace_dlg
.
find_combobox
,
"entry_find"
);
entry_replace
=
gtk_combo_box_text_new_with_entry
();
ui_entry_add_clear_icon
(
GTK_ENTRY
(
gtk_bin_get_child
(
GTK_BIN
(
entry_replace
))
));
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label_replace
),
entry_replace
);
gtk_
entry_set_width_chars
(
GTK_ENTRY
(
gtk_bin_get_child
(
GTK_BIN
(
entry_replace
))),
50
);
ui_hookup_widget
(
replace_dlg
.
dialog
,
entry_replace
,
"entry_replace"
);
replace_dlg
.
replace_entry
=
gtk_bin_get_child
(
GTK_BIN
(
entry_replace
)
);
replace_dlg
.
replace_combobox
=
gtk_combo_box_text_new_with_entry
();
replace_dlg
.
replace_entry
=
gtk_bin_get_child
(
GTK_BIN
(
replace_dlg
.
replace_combobox
));
ui_entry_add_clear_icon
(
GTK_ENTRY
(
replace_dlg
.
replace_entry
)
);
gtk_
label_set_mnemonic_widget
(
GTK_LABEL
(
label_replace
),
replace_dlg
.
replace_combobox
);
gtk_entry_set_width_chars
(
GTK_ENTRY
(
replace_dlg
.
replace_entry
),
50
);
ui_hookup_widget
(
replace_dlg
.
dialog
,
replace_dlg
.
replace_combobox
,
"entry_replace"
);
/* tab from find to the replace entry */
g_signal_connect
(
gtk_bin_get_child
(
GTK_BIN
(
entry_find
))
,
g_signal_connect
(
replace_dlg
.
find_entry
,
"key-press-event"
,
G_CALLBACK
(
on_widget_key_pressed_set_focus
),
gtk_bin_get_child
(
GTK_BIN
(
entry_replace
))
);
g_signal_connect
(
gtk_bin_get_child
(
GTK_BIN
(
entry_find
))
,
"activate"
,
replace_dlg
.
replace_entry
);
g_signal_connect
(
replace_dlg
.
find_entry
,
"activate"
,
G_CALLBACK
(
on_replace_find_entry_activate
),
NULL
);
g_signal_connect
(
gtk_bin_get_child
(
GTK_BIN
(
entry_replace
))
,
"activate"
,
g_signal_connect
(
replace_dlg
.
replace_entry
,
"activate"
,
G_CALLBACK
(
on_replace_entry_activate
),
NULL
);
g_signal_connect
(
replace_dlg
.
dialog
,
"response"
,
G_CALLBACK
(
on_replace_dialog_response
),
NULL
);
...
...
@@ -670,11 +672,11 @@ static void create_replace_dialog(void)
fbox
=
gtk_hbox_new
(
FALSE
,
6
);
gtk_box_pack_start
(
GTK_BOX
(
fbox
),
label_find
,
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
fbox
),
entry_find
,
TRUE
,
TRUE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
fbox
),
replace_dlg
.
find_combobox
,
TRUE
,
TRUE
,
0
);
rbox
=
gtk_hbox_new
(
FALSE
,
6
);
gtk_box_pack_start
(
GTK_BOX
(
rbox
),
label_replace
,
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
rbox
),
entry_replace
,
TRUE
,
TRUE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
rbox
),
replace_dlg
.
replace_combobox
,
TRUE
,
TRUE
,
0
);
label_size
=
gtk_size_group_new
(
GTK_SIZE_GROUP_HORIZONTAL
);
gtk_size_group_add_widget
(
label_size
,
label_find
);
...
...
@@ -1483,10 +1485,8 @@ on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
goto
fail
;
}
ui_combo_box_add_to_history
(
GTK_COMBO_BOX_TEXT
(
gtk_widget_get_parent
(
replace_dlg
.
find_entry
)),
original_find
,
0
);
ui_combo_box_add_to_history
(
GTK_COMBO_BOX_TEXT
(
gtk_widget_get_parent
(
replace_dlg
.
replace_entry
)),
original_replace
,
0
);
ui_combo_box_add_to_history
(
GTK_COMBO_BOX_TEXT
(
replace_dlg
.
find_combobox
),
original_find
,
0
);
ui_combo_box_add_to_history
(
GTK_COMBO_BOX_TEXT
(
replace_dlg
.
replace_combobox
),
original_replace
,
0
);
switch
(
response
)
{
...
...
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