Added simple find frontend

master
Yevgen Muntyan 2005-09-11 19:43:23 +00:00
parent 4eb2fdf219
commit db4a98aacf
4 changed files with 582 additions and 80 deletions

View File

@ -250,13 +250,15 @@ command_out_or_err (MooCmdView *view,
gboolean stdout)
{
char *line;
gsize line_end;
GError *error = NULL;
GIOStatus status;
status = g_io_channel_read_line (channel, &line, NULL, NULL, &error);
status = g_io_channel_read_line (channel, &line, NULL, &line_end, &error);
if (line)
{
line[line_end] = 0;
process_line (view, line, !stdout);
g_free (line);
}

View File

@ -34,11 +34,21 @@
#define FIND_PLUGIN_ID "find"
enum {
CMD_GREP = 1,
CMD_FIND
};
typedef struct {
GtkWidget *dialog;
MooGladeXML *xml;
MooFileEntryCompletion *completion;
GtkWidget *grep_dialog;
MooGladeXML *grep_xml;
MooFileEntryCompletion *grep_completion;
char *current_file;
GtkWidget *find_dialog;
MooGladeXML *find_xml;
MooFileEntryCompletion *find_completion;
MooEditWindow *window;
MooCmdView *output;
GtkTextTag *line_number_tag;
@ -46,8 +56,8 @@ typedef struct {
GtkTextTag *file_tag;
GtkTextTag *error_tag;
GtkTextTag *message_tag;
char *current_file;
guint match_count;
int cmd;
} WindowStuff;
typedef struct {
@ -61,21 +71,32 @@ static void window_stuff_free (WindowStuff *stuff);
static void find_plugin_attach (MooEditWindow *window);
static void find_plugin_detach (MooEditWindow *window);
static void do_find (MooEditWindow *window,
static void do_grep (MooEditWindow *window,
WindowStuff *stuff);
static void create_dialog (MooEditWindow *window,
static void create_grep_dialog (MooEditWindow *window,
WindowStuff *stuff);
static void init_dialog (MooEditWindow *window,
static void init_grep_dialog (MooEditWindow *window,
WindowStuff *stuff);
static void execute_find (const char *pattern,
static void execute_grep (const char *pattern,
const char *glob,
const char *dir,
const char *skip_files,
gboolean case_sensitive,
WindowStuff *stuff);
static void do_find (MooEditWindow *window,
WindowStuff *stuff);
static void create_find_dialog (MooEditWindow *window,
WindowStuff *stuff);
static void init_find_dialog (MooEditWindow *window,
WindowStuff *stuff);
static void execute_find (const char *pattern,
const char *dir,
const char *skip_files,
WindowStuff *stuff);
static gboolean output_activate (WindowStuff *stuff,
FileLinePair *line_data);
static gboolean command_exit (MooPaneView *view,
int status,
WindowStuff *stuff);
@ -93,16 +114,41 @@ find_in_files_cb (MooEditWindow *window)
stuff = moo_plugin_get_window_data (FIND_PLUGIN_ID, window);
g_return_if_fail (stuff != NULL);
if (!stuff->dialog)
if (!stuff->grep_dialog)
{
create_dialog (window, stuff);
g_return_if_fail (stuff->dialog != NULL);
create_grep_dialog (window, stuff);
g_return_if_fail (stuff->grep_dialog != NULL);
}
init_dialog (window, stuff);
init_grep_dialog (window, stuff);
response = gtk_dialog_run (GTK_DIALOG (stuff->dialog));
gtk_widget_hide (stuff->dialog);
response = gtk_dialog_run (GTK_DIALOG (stuff->grep_dialog));
gtk_widget_hide (stuff->grep_dialog);
if (response == GTK_RESPONSE_OK)
do_grep (window, stuff);
}
static void
find_file_cb (MooEditWindow *window)
{
WindowStuff *stuff;
int response;
stuff = moo_plugin_get_window_data (FIND_PLUGIN_ID, window);
g_return_if_fail (stuff != NULL);
if (!stuff->find_dialog)
{
create_find_dialog (window, stuff);
g_return_if_fail (stuff->find_dialog != NULL);
}
init_find_dialog (window, stuff);
response = gtk_dialog_run (GTK_DIALOG (stuff->find_dialog));
gtk_widget_hide (stuff->find_dialog);
if (response == GTK_RESPONSE_OK)
do_find (window, stuff);
@ -174,12 +220,18 @@ window_stuff_free (WindowStuff *stuff)
{
if (stuff)
{
if (stuff->dialog)
gtk_widget_destroy (stuff->dialog);
if (stuff->xml)
moo_glade_xml_unref (stuff->xml);
if (stuff->completion)
g_object_unref (stuff->completion);
if (stuff->grep_dialog)
gtk_widget_destroy (stuff->grep_dialog);
if (stuff->find_dialog)
gtk_widget_destroy (stuff->find_dialog);
if (stuff->grep_xml)
moo_glade_xml_unref (stuff->grep_xml);
if (stuff->find_xml)
moo_glade_xml_unref (stuff->find_xml);
if (stuff->grep_completion)
g_object_unref (stuff->grep_completion);
if (stuff->find_completion)
g_object_unref (stuff->find_completion);
g_free (stuff->current_file);
g_free (stuff);
}
@ -201,6 +253,15 @@ find_plugin_init (void)
"closure::callback", find_in_files_cb,
NULL);
moo_ui_object_class_new_action (klass,
"id", "FindFile",
"name", "Find File",
"label", "Find File",
"tooltip", "Find File",
"icon-stock-id", MOO_STOCK_FIND_FILE,
"closure::callback", find_file_cb,
NULL);
g_type_class_unref (klass);
return TRUE;
}
@ -252,64 +313,99 @@ pattern_entry_changed (GtkEntry *entry,
static void
create_dialog (MooEditWindow *window,
WindowStuff *stuff)
create_grep_dialog (MooEditWindow *window,
WindowStuff *stuff)
{
GtkWidget *dir_entry, *pattern_entry, *glob_entry, *skip_entry;
stuff->xml = moo_glade_xml_new_from_buf (MOO_FIND_GLADE_XML, -1, "dialog", NULL);
g_return_if_fail (stuff->xml != NULL);
stuff->grep_xml = moo_glade_xml_new_from_buf (MOO_FIND_GLADE_XML, -1,
"grep_dialog", NULL);
g_return_if_fail (stuff->grep_xml != NULL);
stuff->dialog = moo_glade_xml_get_widget (stuff->xml, "dialog");
g_return_if_fail (stuff->dialog != NULL);
stuff->grep_dialog = moo_glade_xml_get_widget (stuff->grep_xml, "grep_dialog");
g_return_if_fail (stuff->grep_dialog != NULL);
gtk_dialog_set_default_response (GTK_DIALOG (stuff->dialog),
gtk_dialog_set_default_response (GTK_DIALOG (stuff->grep_dialog),
GTK_RESPONSE_OK);
gtk_dialog_set_response_sensitive (GTK_DIALOG (stuff->dialog),
gtk_dialog_set_response_sensitive (GTK_DIALOG (stuff->grep_dialog),
GTK_RESPONSE_OK, FALSE);
gtk_window_set_transient_for (GTK_WINDOW (stuff->dialog),
gtk_window_set_transient_for (GTK_WINDOW (stuff->grep_dialog),
GTK_WINDOW (window));
g_signal_connect (stuff->dialog, "delete-event",
g_signal_connect (stuff->grep_dialog, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
pattern_entry = moo_glade_xml_get_widget (stuff->xml, "pattern_combo");
pattern_entry = moo_glade_xml_get_widget (stuff->grep_xml, "pattern_combo");
pattern_entry = GTK_BIN(pattern_entry)->child;
g_signal_connect (pattern_entry, "changed",
G_CALLBACK (pattern_entry_changed), stuff->dialog);
G_CALLBACK (pattern_entry_changed), stuff->grep_dialog);
dir_entry = moo_glade_xml_get_widget (stuff->xml, "dir_combo");
dir_entry = moo_glade_xml_get_widget (stuff->grep_xml, "dir_combo");
dir_entry = GTK_BIN(dir_entry)->child;
stuff->completion = g_object_new (MOO_TYPE_FILE_ENTRY_COMPLETION,
"directories-only", TRUE,
"case-sensitive", TRUE,
"show-hidden", FALSE,
NULL);
moo_file_entry_completion_set_entry (stuff->completion, GTK_ENTRY (dir_entry));
stuff->grep_completion = g_object_new (MOO_TYPE_FILE_ENTRY_COMPLETION,
"directories-only", TRUE,
"case-sensitive", TRUE,
"show-hidden", FALSE,
NULL);
moo_file_entry_completion_set_entry (stuff->grep_completion, GTK_ENTRY (dir_entry));
glob_entry = moo_glade_xml_get_widget (stuff->xml, "glob_combo");
glob_entry = moo_glade_xml_get_widget (stuff->grep_xml, "glob_combo");
glob_entry = GTK_BIN(glob_entry)->child;
skip_entry = moo_glade_xml_get_widget (stuff->xml, "skip_combo");
skip_entry = moo_glade_xml_get_widget (stuff->grep_xml, "skip_combo");
skip_entry = GTK_BIN(skip_entry)->child;
gtk_entry_set_activates_default (GTK_ENTRY (pattern_entry), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (dir_entry), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (glob_entry), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (skip_entry), TRUE);
}
static void
init_dialog (MooEditWindow *window,
WindowStuff *stuff)
create_find_dialog (MooEditWindow *window,
WindowStuff *stuff)
{
GtkWidget *dir_entry, *pattern_entry;
stuff->find_xml = moo_glade_xml_new_from_buf (MOO_FIND_GLADE_XML, -1,
"find_dialog", NULL);
g_return_if_fail (stuff->find_xml != NULL);
stuff->find_dialog = moo_glade_xml_get_widget (stuff->find_xml, "find_dialog");
g_return_if_fail (stuff->find_dialog != NULL);
gtk_dialog_set_default_response (GTK_DIALOG (stuff->find_dialog),
GTK_RESPONSE_OK);
gtk_dialog_set_response_sensitive (GTK_DIALOG (stuff->find_dialog),
GTK_RESPONSE_OK, FALSE);
gtk_window_set_transient_for (GTK_WINDOW (stuff->find_dialog),
GTK_WINDOW (window));
g_signal_connect (stuff->find_dialog, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
pattern_entry = moo_glade_xml_get_widget (stuff->find_xml, "pattern_combo");
pattern_entry = GTK_BIN(pattern_entry)->child;
g_signal_connect (pattern_entry, "changed",
G_CALLBACK (pattern_entry_changed), stuff->find_dialog);
dir_entry = moo_glade_xml_get_widget (stuff->find_xml, "dir_combo");
dir_entry = GTK_BIN(dir_entry)->child;
stuff->find_completion = g_object_new (MOO_TYPE_FILE_ENTRY_COMPLETION,
"directories-only", TRUE,
"case-sensitive", TRUE,
"show-hidden", FALSE,
NULL);
moo_file_entry_completion_set_entry (stuff->find_completion, GTK_ENTRY (dir_entry));
}
static void
init_grep_dialog (MooEditWindow *window,
WindowStuff *stuff)
{
MooEdit *doc;
GtkWidget *dir_entry, *pattern_entry, *glob_entry;
dir_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->xml, "dir_combo"))->child;
pattern_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->xml, "pattern_combo"))->child;
glob_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->xml, "glob_combo"))->child;
dir_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->grep_xml, "dir_combo"))->child;
pattern_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->grep_xml, "pattern_combo"))->child;
glob_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->grep_xml, "glob_combo"))->child;
doc = moo_edit_window_get_active_doc (window);
@ -326,12 +422,12 @@ init_dialog (MooEditWindow *window,
if (doc && moo_edit_get_filename (doc))
{
char *dir = g_path_get_dirname (moo_edit_get_filename (doc));
moo_file_entry_completion_set_path (stuff->completion, dir);
moo_file_entry_completion_set_path (stuff->grep_completion, dir);
g_free (dir);
}
else
{
moo_file_entry_completion_set_path (stuff->completion, g_get_home_dir ());
moo_file_entry_completion_set_path (stuff->grep_completion, g_get_home_dir ());
}
}
@ -343,7 +439,23 @@ init_dialog (MooEditWindow *window,
static void
do_find (MooEditWindow *window,
init_find_dialog (G_GNUC_UNUSED MooEditWindow *window,
WindowStuff *stuff)
{
GtkWidget *dir_entry, *pattern_entry;
dir_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->find_xml, "dir_combo"))->child;
pattern_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->find_xml, "pattern_combo"))->child;
if (!gtk_entry_get_text(GTK_ENTRY (dir_entry))[0])
moo_file_entry_completion_set_path (stuff->find_completion, g_get_home_dir ());
gtk_widget_grab_focus (pattern_entry);
}
static void
do_grep (MooEditWindow *window,
WindowStuff *stuff)
{
GtkWidget *pane;
@ -356,11 +468,11 @@ do_find (MooEditWindow *window,
pane = moo_edit_window_get_pane (window, FIND_PLUGIN_ID);
g_return_if_fail (pane != NULL);
dir_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->xml, "dir_combo"))->child;
pattern_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->xml, "pattern_combo"))->child;
glob_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->xml, "glob_combo"))->child;
skip_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->xml, "skip_combo"))->child;
case_sensitive_button = moo_glade_xml_get_widget (stuff->xml, "case_sensitive_button");
dir_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->grep_xml, "dir_combo"))->child;
pattern_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->grep_xml, "pattern_combo"))->child;
glob_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->grep_xml, "glob_combo"))->child;
skip_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->grep_xml, "skip_combo"))->child;
case_sensitive_button = moo_glade_xml_get_widget (stuff->grep_xml, "case_sensitive_button");
dir_utf8 = gtk_entry_get_text (GTK_ENTRY (dir_entry));
dir = g_filename_from_utf8 (dir_utf8, -1, NULL, NULL, NULL);
@ -374,11 +486,41 @@ do_find (MooEditWindow *window,
moo_pane_view_clear (MOO_PANE_VIEW (stuff->output));
moo_big_paned_present_pane (window->paned, pane);
execute_find (pattern, glob, dir, skip,
execute_grep (pattern, glob, dir, skip,
case_sensitive, stuff);
}
static void
do_find (MooEditWindow *window,
WindowStuff *stuff)
{
GtkWidget *pane;
GtkWidget *dir_entry, *pattern_entry, *skip_entry;
const char *dir_utf8, *pattern, *skip;
char *dir;
pane = moo_edit_window_get_pane (window, FIND_PLUGIN_ID);
g_return_if_fail (pane != NULL);
dir_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->find_xml, "dir_combo"))->child;
pattern_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->find_xml, "pattern_combo"))->child;
skip_entry = GTK_BIN (moo_glade_xml_get_widget (stuff->find_xml, "skip_combo"))->child;
dir_utf8 = gtk_entry_get_text (GTK_ENTRY (dir_entry));
dir = g_filename_from_utf8 (dir_utf8, -1, NULL, NULL, NULL);
g_return_if_fail (dir != NULL);
pattern = gtk_entry_get_text (GTK_ENTRY (pattern_entry));
skip = gtk_entry_get_text (GTK_ENTRY (skip_entry));
moo_pane_view_clear (MOO_PANE_VIEW (stuff->output));
moo_big_paned_present_pane (window->paned, pane);
execute_find (pattern, dir, skip, stuff);
}
static FileLinePair*
file_line_pair_new (const char *filename,
int line)
@ -402,9 +544,9 @@ file_line_pair_free (FileLinePair *pair)
static gboolean
process_line (MooPaneView *view,
const char *line,
WindowStuff *stuff)
process_grep_line (MooPaneView *view,
const char *line,
WindowStuff *stuff)
{
char *filename = NULL;
char *number = NULL;
@ -494,8 +636,42 @@ parse_error:
}
static gboolean
process_find_line (MooPaneView *view,
const char *line,
WindowStuff *stuff)
{
int view_line;
view_line = moo_pane_view_write_line (view, line, -1, stuff->match_tag);
moo_pane_view_set_line_data (view, view_line,
file_line_pair_new (line, -1),
(GDestroyNotify) file_line_pair_free);
stuff->match_count++;
return TRUE;
}
static gboolean
process_line (MooPaneView *view,
const char *line,
WindowStuff *stuff)
{
switch (stuff->cmd)
{
case CMD_GREP:
return process_grep_line (view, line, stuff);
case CMD_FIND:
return process_find_line (view, line, stuff);
default:
g_return_val_if_reached (FALSE);
}
}
static void
execute_find (const char *pattern,
execute_grep (const char *pattern,
const char *glob,
const char *dir,
const char *skip_files,
@ -507,6 +683,7 @@ execute_find (const char *pattern,
g_return_if_fail (stuff->output != NULL);
g_return_if_fail (pattern && pattern[0]);
g_return_if_fail (dir && dir[0]);
g_free (stuff->current_file);
stuff->current_file = NULL;
@ -562,6 +739,66 @@ execute_find (const char *pattern,
g_string_append_printf (command, " | xargs egrep -H -n %s-e '%s'",
!case_sensitive ? "-i " : "", pattern);
stuff->cmd = CMD_GREP;
moo_cmd_view_run_command (stuff->output, command->str);
g_string_free (command, TRUE);
}
static void
execute_find (const char *pattern,
const char *dir,
const char *skip_files,
WindowStuff *stuff)
{
GString *command = NULL;
char **globs = NULL;
char **p;
g_return_if_fail (stuff->cmd == 0);
g_return_if_fail (pattern && pattern[0]);
g_return_if_fail (dir && dir[0]);
g_free (stuff->current_file);
stuff->current_file = NULL;
stuff->match_count = 0;
globs = g_strsplit (pattern, ";", 0);
g_return_if_fail (globs != NULL);
for (p = globs; *p != NULL; p++)
{
if (!command)
{
command = g_string_new ("");
g_string_printf (command, "find '%s' \\( -name \"%s\"", dir, *p);
}
else
{
g_string_append_printf (command, " -o -name \"%s\"", *p);
}
}
g_string_append (command, " \\)");
g_strfreev (globs);
g_string_append_printf (command, " -print");
if (skip_files)
{
globs = g_strsplit (skip_files, ";", 0);
if (globs)
{
char **p;
for (p = globs; *p != NULL; p++)
g_string_append_printf (command, " | grep -v \"%s\"", *p);
}
g_strfreev (globs);
}
stuff->cmd = CMD_FIND;
moo_cmd_view_run_command (stuff->output, command->str);
g_string_free (command, TRUE);
}
@ -588,20 +825,31 @@ command_exit (MooPaneView *view,
int status,
WindowStuff *stuff)
{
int cmd = stuff->cmd;
g_return_val_if_fail (cmd != 0, FALSE);
stuff->cmd = 0;
if (WIFEXITED (status))
{
char *msg = NULL;
guint8 exit_code = WEXITSTATUS (status);
/* xargs exits with code 123 if it's command exited with status 1-125*/
if (!exit_code || exit_code == 123)
{
char *msg = g_strdup_printf ("*** %d matches found ***",
stuff->match_count);
moo_pane_view_write_line (view, msg, -1,
stuff->message_tag);
g_free (msg);
return TRUE;
}
if (cmd == CMD_GREP && (!exit_code || exit_code == 123))
msg = g_strdup_printf ("*** %d matches found ***",
stuff->match_count);
else if (cmd == CMD_FIND && !exit_code)
msg = g_strdup_printf ("*** %d files found ***",
stuff->match_count);
else
return FALSE;
moo_pane_view_write_line (view, msg, -1,
stuff->message_tag);
g_free (msg);
return TRUE;
}
return FALSE;
@ -623,7 +871,9 @@ output_activate (WindowStuff *stuff,
line_data->filename, NULL);
doc = moo_editor_get_doc (editor, line_data->filename);
g_return_val_if_fail (doc != NULL, FALSE);
if (!doc)
return TRUE;
moo_editor_set_active_doc (editor, doc);
gtk_widget_grab_focus (GTK_WIDGET (doc));

View File

@ -3,7 +3,7 @@
<glade-interface>
<widget class="GtkDialog" id="dialog">
<widget class="GtkDialog" id="grep_dialog">
<property name="visible">True</property>
<property name="title" translatable="yes">Find in Files</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
@ -188,7 +188,7 @@
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="label" translatable="yes">_Files:</property>
<property name="label" translatable="yes">Fi_les:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@ -332,4 +332,253 @@
</child>
</widget>
<widget class="GtkDialog" id="find_dialog">
<property name="visible">True</property>
<property name="title" translatable="yes">Find File</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">True</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="button3">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">False</property>
<property name="response_id">-6</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="button4">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-find</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">False</property>
<property name="response_id">-5</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<property name="top_padding">6</property>
<property name="bottom_padding">6</property>
<property name="left_padding">6</property>
<property name="right_padding">6</property>
<child>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">0</property>
<property name="column_spacing">0</property>
<child>
<widget class="GtkComboBoxEntry" id="dir_combo">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="pattern_combo">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="skip_combo">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkEventBox" id="eventbox5">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">This entry content will be passed to grep</property>
<property name="visible_window">True</property>
<property name="above_child">False</property>
<child>
<widget class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="label" translatable="yes">_Pattern:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">1</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">pattern_combo</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEventBox" id="eventbox7">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">You can use Tab completion in this entry. Try also Ctrl-L</property>
<property name="visible_window">True</property>
<property name="above_child">False</property>
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="label" translatable="yes">_Directory:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">1</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">dir_combo</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEventBox" id="eventbox8">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Enter semicolon-separated list of globs</property>
<property name="visible_window">True</property>
<property name="above_child">False</property>
<child>
<widget class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="label" translatable="yes">_Skip files:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">1</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">skip_combo</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -47,10 +47,11 @@
<item name="FindPrevious" action="FindPrevious"/>
<item name="Replace" action="Replace"/>
<separator/>
<item name="FindInFiles" action="FindInFiles"/>
<separator/>
<item name="GoToLine" action="GoToLine"/>
<separator/>
<item name="FindInFiles" action="FindInFiles"/>
<item name="FindFile" action="FindFile"/>
<separator/>
</menu>
<menu name="View" label="_View">