aboutsummaryrefslogtreecommitdiff
path: root/src/textadept.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-08-25 19:01:23 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-08-25 19:01:23 -0400
commit89949e2f1c5afc9b396424ec60fdfd3ab64c42b1 (patch)
tree528f29dca73ef61163bcc2c1f160e061557bdd43 /src/textadept.c
parenta7cf016d3e7db80e510e0bef293d88121d1e5b1b (diff)
downloadtextadept-89949e2f1c5afc9b396424ec60fdfd3ab64c42b1.tar.gz
textadept-89949e2f1c5afc9b396424ec60fdfd3ab64c42b1.zip
Do not hide the statusbar when command entry is focused; src/textadept.c
Diffstat (limited to 'src/textadept.c')
-rw-r--r--src/textadept.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/textadept.c b/src/textadept.c
index 67d76a79..7222a8db 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -269,19 +269,11 @@ void create_ui() {
GtkWidget *find = find_create_ui();
gtk_box_pack_start(GTK_BOX(vbox), find, FALSE, FALSE, 5);
- GtkWidget *hboxs = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), hboxs, FALSE, FALSE, 0);
-
- statusbar[0] = gtk_statusbar_new();
- gtk_statusbar_push(GTK_STATUSBAR(statusbar[0]), 0, "");
- gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar[0]), FALSE);
- gtk_box_pack_start(GTK_BOX(hboxs), statusbar[0], TRUE, TRUE, 0);
-
command_entry = gtk_entry_new();
gtk_widget_set_name(command_entry, "textadept-command-entry");
signal(command_entry, "activate", c_activated);
signal(command_entry, "key-press-event", c_keypress);
- gtk_box_pack_start(GTK_BOX(hboxs), command_entry, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), command_entry, FALSE, FALSE, 0);
command_entry_completion = gtk_entry_completion_new();
signal(command_entry_completion, "match-selected", cc_match_selected);
@@ -294,6 +286,14 @@ void create_ui() {
GTK_TREE_MODEL(cc_store));
gtk_entry_set_completion(GTK_ENTRY(command_entry), command_entry_completion);
+ GtkWidget *hboxs = gtk_hbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), hboxs, FALSE, FALSE, 0);
+
+ statusbar[0] = gtk_statusbar_new();
+ gtk_statusbar_push(GTK_STATUSBAR(statusbar[0]), 0, "");
+ gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar[0]), FALSE);
+ gtk_box_pack_start(GTK_BOX(hboxs), statusbar[0], TRUE, TRUE, 0);
+
statusbar[1] = gtk_statusbar_new();
gtk_statusbar_push(GTK_STATUSBAR(statusbar[1]), 0, "");
g_object_set(G_OBJECT(statusbar[1]), "width-request", 400, NULL);
@@ -787,13 +787,9 @@ static void find_button_clicked(GtkWidget *button, gpointer udata) {
*/
void ce_toggle_focus() {
if (!gtk_widget_has_focus(command_entry)) {
- gtk_widget_hide(statusbar[0]);
- gtk_widget_hide(statusbar[1]);
gtk_widget_show(command_entry);
gtk_widget_grab_focus(command_entry);
} else {
- gtk_widget_show(statusbar[0]);
- gtk_widget_show(statusbar[1]);
gtk_widget_hide(command_entry);
gtk_widget_grab_focus(focused_editor);
}