Commit d51b4bbe authored by Philip Van Hoof's avatar Philip Van Hoof Committed by Stéphane Démurget

impl.

2002-05-01  Philip Van Hoof <freax@pandora.be>

	* widgets/gnomefilelist.[ch] (history_combo_go),
	(history_combo_clicked): impl.

	(gnome_filelist_new_with_path): use this new impl.

2002-05-01  Stephane Demurget  <demurgets@free.fr>

	* src/project_dbase_gui.c (add_file): added the xpm file type.

2002-04-30  Biswapesh Chattopadhyay  <biswapesh_chatterjee@tcscal.co.in>

	Patch reviewed by Stephane Demurget <demurgets@free.fr> except for the
	tag manager fixes.

	* src/anjuta.[ch]: Changed local tag list to use line numbers instead
	  of tag types.

	* src/an_symbol_view.[ch], src/mainmenu_callbacks.[ch],
	  src/text_editor_menu.c: Added context sensitive search in symbol
	  browser and editor.

	* configure.in: Changed version number to 0.1.9.99.

	* scripts/anjuta_import.sh.in, scripts/anjuta_project.template,
	  src/project_import.c: Minor changes to project import facility.

	* src/preferences.[ch], src/preferences_gui.c: Fix for bug #537273
	  (Forced to use specific brace format)

	* tagmanager/include/tm_tag.h, tagmanager/include/tm_workspace.h,
	  tagmanager/tm_tag.c, tagmanager/tm_work_object.c,
	  tagmanager/tm_workspace.c: Minor TagManager fixes and updates.
parent 0d5f982c
2002-05-01 Philip Van Hoof <freax@pandora.be>
* widgets/gnomefilelist.[ch] (history_combo_go),
(history_combo_clicked): impl.
(gnome_filelist_new_with_path): use this new impl.
2002-05-01 Stephane Demurget <demurgets@free.fr>
* src/project_dbase_gui.c (add_file): added the xpm file type.
2002-04-30 Biswapesh Chattopadhyay <biswapesh_chatterjee@tcscal.co.in>
Patch reviewed by Stephane Demurget <demurgets@free.fr> except for the
tag manager fixes.
* src/anjuta.[ch]: Changed local tag list to use line numbers instead
of tag types.
* src/an_symbol_view.[ch], src/mainmenu_callbacks.[ch],
src/text_editor_menu.c: Added context sensitive search in symbol
browser and editor.
* configure.in: Changed version number to 0.1.9.99.
* scripts/anjuta_import.sh.in, scripts/anjuta_project.template,
src/project_import.c: Minor changes to project import facility.
* src/preferences.[ch], src/preferences_gui.c: Fix for bug #537273
(Forced to use specific brace format)
* tagmanager/include/tm_tag.h, tagmanager/include/tm_workspace.h,
tagmanager/tm_tag.c, tagmanager/tm_work_object.c,
tagmanager/tm_workspace.c: Minor TagManager fixes and updates.
2002-04-30 Johannes Schmid <clubfan@users.sourceforge.net>
Patch reviewed by Stephane Demurget <demurgets@free.fr> who made
......
......@@ -4,7 +4,7 @@ dnl If you don't want it to overwrite it,
dnl Please disable it in the Anjuta project configuration
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(anjuta, 0.1.10-pre)
AM_INIT_AUTOMAKE(anjuta, 0.1.9.99)
AM_CONFIG_HEADER(config.h)
dnl Define convenience macros
......
......@@ -8,6 +8,13 @@
# Template file is in data dir, so:
# TEMPLATE="$(dirname $0)/anjuta_project.template"
TEMPLATE="@PACKAGE_DATA_DIR@/anjuta_project.template"
AN_SKIP_DIRS=${AN_SKIP_DIRS:-"intl"}
AN_SOURCE_EXTN=${AN_SOURCE_EXTN:-"c C cpp cxx cc java"}
AN_HEADER_EXTN=${AN_HEADER_EXTN:-"h H hxx hpp hh"}
AN_PIXMAP_EXTN=${AN_IMAGE_EXTN:-"jpeg jpg png gif xpm bmp ico tiff"}
AN_DOC_EXTN=${AN_DOC_EXTN:-"html sgml sgml README INSTALL ChangeLog NEWS COPYING CREDITS AUTHORS THANKS TODO HACKING FUTURE"}
AN_PO_EXTN=${AN_PO_EXTN:-"po"}
AN_PO_DIR="po"
PROGRAM=anjuta
DIR=${1:-"."}
......@@ -17,18 +24,6 @@ if [ ! -s "${TEMPLATE}" ]; then
echo "Template file ${TEMPLATE} does not exist!" >&2
exit 1
fi
${PROGRAM} --version >${TMPFILE}
if [ $? -ne 0 ]; then
echo "Anjuta not found !" >&2
\rm -f ${TMPFILE}
exit 1
fi
PROGRAM_VERSION=`cat $TMPFILE | awk '{print $NF}' | sed 's/\.//g' | cut -c1-3`
if [ "${PROGRAM_VERSION}" -lt 19 ]; then
AN_INCLUDE_NAME="incude"
else
AN_INCLUDE_NAME="include"
fi
if [ "$DIR" != '.' ]; then
if [ ! -d "$DIR" ]; then
......@@ -80,50 +75,77 @@ if [ -f "${PRJ_FILE}" ]; then
fi
AN_SOURCE_FILES=""
for file in `find . -name "*.c" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.cc" -o -name "*.C"`
do
AN_SOURCE_FILES="$AN_SOURCE_FILES `echo $file | cut -c3-`"
done
AN_HEADER_FILES=""
for file in `find . -name "*.h" -o -name "*.hpp" -o -name "*.H" -o -name "*.hh"`
do
AN_HEADER_FILES="$AN_HEADER_FILES `echo $file | cut -c3-`"
done
AN_PIXMAP_FILES=""
for file in `find . -name "*.xpm" -o -name "*.png" -o -name "*.gif" -o -name "*.jpg"`
do
AN_PIXMAP_FILES="$AN_PIXMAP_FILES `echo $file | cut -c3-`"
done
AN_DOC_FILES=""
for file in `find . -name "README" -o -name "INSTALL" -o -name "NEWS" -o -name "COPYING" -o -name "ChangeLog" \
-o -name "CREDITS" -o -name "AUTHORS" -o -name "TAHNKS" -o -name "TODO" -o -name "HACKING" \
-o -name "FUTURE" -o -name "BUGS" -o -name "*.sgml" -o -name "*.html"`
do
AN_DOC_FILES="$AN_DOC_FILES `echo $file | cut -c3-`"
done
AN_PO_FILES=""
if [ -d "po" ]; then
if \cd po; then
for file in `find . -name "*.po"`
do
AN_PO_FILES="$AN_PO_FILES `echo $file | cut -c3-`"
for file in `find . -type f -print`; do
name=`echo $file | cut -c3-`
top_dir=`echo $name | awk -F'/' '{if (NF > 1) print $1; else print "."}'`
skip=0
for dir in $AN_SKIP_DIRS; do
if [ "$dir" = "${top_dir}" ]; then
skip=1
break
fi
done
\cd ..
if [ $skip -eq 0 ]; then
found=0
file_extn="`echo $name | awk -F'[/.]' '{print $NF}'`"
for extn in $AN_SOURCE_EXTN; do
if [ "$extn" = "$file_extn" ]; then
AN_SOURCE_FILES="$AN_SOURCE_FILES $name"
echo "Adding source file $name.."
found=1
break
fi
done
if [ $found -eq 0 ]; then
for extn in $AN_HEADER_EXTN; do
if [ "$extn" = "$file_extn" ]; then
AN_HEADER_FILES="$AN_HEADER_FILES $name"
echo "Adding header file $name.."
found=1
break
fi
done
fi
if [ $found -eq 0 ]; then
for extn in $AN_PIXMAP_EXTN; do
if [ "$extn" = "$file_extn" ]; then
AN_PIXMAP_FILES="$AN_PIXMAP_FILES $name"
echo "Adding pixmap file $name.."
found=1
break
fi
done
fi
if [ $found -eq 0 ]; then
for extn in $AN_DOC_EXTN; do
if [ "$extn" = "$file_extn" ]; then
AN_DOC_FILES="$AN_DOC_FILES $name"
echo "Adding doc file $name.."
found=1
break
fi
done
fi
if [ $found -eq 0 ]; then
if [ "$AN_PO_EXTN" = "$file_extn" -a "$AN_PO_DIR" = "$top_dir" ]; then
name="`echo $name | cut -c4-`"
AN_PO_FILES="$AN_PO_FILES $name"
echo "Adding PO file $name.."
found=1
fi
fi
if [ $found -eq 0 ]; then
echo "Skipping $name.."
fi
else
echo "Ignoring $name.."
fi
fi
AN_BUILD_FILES=""
for file in `find . -name "Makefile.am" -o -name "Makefile.in" -o -name "configure.in" -o -name "Makefile" \
-o -name "*.spec" -o -name "*.m4"`
do
AN_BUILD_FILES="$AN_BUILD_FILES `echo $file | cut -c3-`"
done
cat ${TEMPLATE} | while read line; do
eval "echo ${line}" >>${PRJ_FILE}
done
......
......@@ -59,10 +59,10 @@ project.config.disable.overwriting=1 1 1 1 1 1 1 1 1
project.config.extra.modules.before=
project.config.extra.modules.after=
module.${AN_INCLUDE_NAME:-"include"}.name=${AN_PROJECT_INCLUDE_DIR:-"."}
module.${AN_INCLUDE_NAME:-"include"}.type=
module.${AN_INCLUDE_NAME:-"include"}.expanded=0
module.${AN_INCLUDE_NAME:-"include"}.files=${AN_HEADER_FILES}
module.include.name=${AN_PROJECT_INCLUDE_DIR:-"."}
module.include.type=
module.include.expanded=0
module.include.files=${AN_HEADER_FILES}
module.source.name=${AN_PROJECT_SRC_DIR:-"."}
module.source.type=
......
......@@ -15,6 +15,7 @@ static SymbolFileInfo *symbol_file_info_new(TMSymbol *sym)
SymbolFileInfo *sfile = g_new0(SymbolFileInfo, 1);
if (sym && sym->tag && sym->tag->atts.entry.file)
{
sfile->sym_name = g_strdup(sym->tag->name);
sfile->def.name = g_strdup(sym->tag->atts.entry.file->work_object.file_name);
sfile->def.line = sym->tag->atts.entry.line;
if ((tm_tag_function_t == sym->tag->type) && sym->info.equiv)
......@@ -30,6 +31,8 @@ static void symbol_file_info_free(SymbolFileInfo *sfile)
{
if (sfile)
{
if (sfile->sym_name)
g_free(sfile->sym_name);
if (sfile->def.name)
g_free(sfile->def.name);
if (sfile->decl.name)
......@@ -201,6 +204,7 @@ typedef enum
{
GOTO_DEFINITION,
GOTO_DECLARATION,
SEARCH,
REFRESH,
MENU_MAX
} SVSignal;
......@@ -220,6 +224,10 @@ static void sv_context_handler(GtkMenuItem *item, gpointer user_data)
anjuta_goto_file_line_mark(sv->sinfo->decl.name
, sv->sinfo->decl.line, TRUE);
break;
case SEARCH:
if (sv->sinfo && sv->sinfo->sym_name)
anjuta_search_sources_for_symbol(sv->sinfo->sym_name);
break;
case REFRESH:
sv_populate();
break;
......@@ -246,6 +254,12 @@ static void sv_create_context_menu(void)
, (gpointer) GOTO_DECLARATION);
gtk_widget_show(item);
gtk_menu_append(GTK_MENU(sv->menu), item);
item = gtk_menu_item_new_with_label(_("Find Usage"));
gtk_signal_connect(GTK_OBJECT(item), "activate"
, GTK_SIGNAL_FUNC(sv_context_handler)
, (gpointer) SEARCH);
gtk_widget_show(item);
gtk_menu_append(GTK_MENU(sv->menu), item);
item = gtk_menu_item_new_with_label(_("Refresh Tree"));
gtk_signal_connect(GTK_OBJECT(item), "activate"
, GTK_SIGNAL_FUNC(sv_context_handler)
......
......@@ -12,6 +12,7 @@ extern "C"
typedef struct _SymbolFileInfo
{
char *sym_name;
struct
{
char *name;
......
......@@ -507,31 +507,6 @@ anjuta_goto_file_line_mark (gchar * fname, glong lineno, gboolean mark)
return te ;
}
static const GString *get_qualified_tag_name(const TMTag *tag)
{
static GString *s = NULL;
gchar *tag_name;
g_return_val_if_fail((tag && tag->name), NULL);
if (!s)
s = g_string_sized_new(255);
g_string_assign(s, "");
if (tag->atts.entry.scope)
g_string_sprintfa(s, "%s.", tag->atts.entry.scope);
g_string_sprintfa(s, "%s", tag->name);
tag_name = g_strdup(tm_tag_type_name(tag));
if (tag_name) {
char* ptr = tag_name;
while(*ptr) {*ptr = toupper(*ptr); ptr++;}
/* Hack to allow anjuta to find both prototypes and functions */
g_string_sprintfa(s, " - [%s]", tag_name);
g_free(tag_name);
}
return s;
}
const GList *anjuta_get_tag_list(TextEditor *te, guint tag_types)
{
static GList *tag_names = NULL;
......@@ -557,7 +532,14 @@ const GList *anjuta_get_tag_list(TextEditor *te, guint tag_types)
{
tag = TM_TAG(te->tm_file->tags_array->pdata[i]);
if (tag->type & tag_types)
tag_names = g_list_prepend(tag_names, g_strdup(get_qualified_tag_name(tag)->str));
{
if ((NULL != tag->atts.entry.scope) && isalpha(tag->atts.entry.scope[0]))
tag_names = g_list_prepend(tag_names, g_strdup_printf("%s::%s [%ld]"
, tag->atts.entry.scope, tag->name, tag->atts.entry.line));
else
tag_names = g_list_prepend(tag_names, g_strdup_printf("%s [%ld]"
, tag->name, tag->atts.entry.line));
}
}
tag_names = g_list_sort(tag_names, (GCompareFunc) strcmp);
return tag_names;
......@@ -598,69 +580,27 @@ GList *anjuta_get_file_list(void)
gboolean anjuta_goto_local_tag(TextEditor *te, const char *qual_name)
{
char *name;
char *scope;
char *typestring;
int type;
guint i;
int cmp;
TMTag *tag;
if (!qual_name || !te || !te->tm_file || !te->tm_file->tags_array
|| (0 == te->tm_file->tags_array->len))
return FALSE;
scope = g_strdup(qual_name);
name = strrchr(scope, '.');
if (name)
{
*name = '\0';
++ name;
}
else
{
name = scope;
scope = NULL;
}
/* BEGIN tag hack */
type = -1;
typestring = strstr(name, " - [");
if (typestring)
{
gchar* type_name;
gchar* ptr;
guint line;
gchar *spos;
gchar *epos;
*typestring = '\0';
typestring = typestring + 4;
type_name = g_strdup(typestring);
ptr = type_name;
while (*ptr && *ptr != ']') {*ptr = tolower(*ptr); ptr++;}
*ptr = '\0';
type = tm_tag_name_type(type_name);
g_free(type_name);
}
/* END tag hack */
for (i = 0; i < te->tm_file->tags_array->len; ++i)
g_return_val_if_fail((te && qual_name), FALSE);
spos = strchr(qual_name, '[');
if (spos)
{
tag = TM_TAG(te->tm_file->tags_array->pdata[i]);
cmp = strcmp(name, tag->name);
if (0 == cmp && (type == tag->type || type == -1))
epos = strchr(spos+1, ']');
if (epos)
{
if ((!scope || !tag->atts.entry.scope) || (0 == strcmp(scope, tag->atts.entry.scope)))
*epos = '\0';
line = atol(spos + 1);
*epos = ']';
if (0 < line)
{
text_editor_goto_line(te, tag->atts.entry.line, TRUE);
g_free(scope?scope:name);
text_editor_goto_line(te, line, TRUE);
return TRUE;
}
}
else if (cmp < 0)
{
g_free(scope?scope:name);
return FALSE;
}
}
g_free(scope?scope:name);
return FALSE;
}
......@@ -2371,3 +2311,22 @@ anjuta_load_last_project()
anjuta_load_this_project( app->last_open_project );
}
}
void anjuta_search_sources_for_symbol(const gchar *s)
{
gchar command[BUFSIZ];
if ((NULL == s) || (isspace(*s) || ('\0' == *s)))
return;
snprintf(command, BUFSIZ, "grep -FInHr '%s' %s", s
, project_dbase_get_dir(app->project_dbase));
if (launcher_execute (command, find_in_files_mesg_arrived
, find_in_files_mesg_arrived, find_in_files_terminated) == FALSE)
return;
anjuta_update_app_status (TRUE, _("Looking up symbol"));
anjuta_message_manager_clear (app->messages, MESSAGE_FIND);
anjuta_message_manager_append (app->messages, _("Finding in Files ....\n"),
MESSAGE_FIND);
anjuta_message_manager_show (app->messages, MESSAGE_FIND);
}
......@@ -374,6 +374,8 @@ anjuta_load_last_project(void);
void
anjuta_open_project(void);
/* Search for the occurence of the string in all source files */
void anjuta_search_sources_for_symbol(const gchar *s);
#define anjuta_set_execution_dir(d) string_assign(&app->execution_dir, (d))
#define anjuta_clear_execution_dir() string_assign(&app->execution_dir, NULL)
......
......@@ -2003,6 +2003,22 @@ on_goto_tag_declaration_activate (GtkMenuItem * menuitem, gpointer user_data)
anjuta_goto_tag(buffer, te, FALSE);
}
void
on_lookup_symbol_activate (GtkMenuItem * menuitem, gpointer user_data)
{
TextEditor* te;
gboolean ret;
gchar buffer[1000];
te = anjuta_get_current_text_editor();
if(!te) return;
ret = aneditor_command (te->editor_id, ANE_GETCURRENTWORD, (long)buffer, (long)sizeof(buffer));
if (!ret)
return;
else
anjuta_search_sources_for_symbol(buffer);\
}
void
on_go_back_activate (GtkMenuItem * menuitem, gpointer user_data)
{
......
......@@ -691,6 +691,9 @@ on_goto_tag_definition_activate (GtkMenuItem * menuitem, gpointer user_data);
void
on_goto_tag_declaration_activate (GtkMenuItem * menuitem, gpointer user_data);
void
on_lookup_symbol_activate (GtkMenuItem * menuitem, gpointer user_data);
void
on_go_back_activate (GtkMenuItem * menuitem, gpointer user_data);
......
......@@ -451,6 +451,14 @@ preferences_sync (Preferences * pr)
(pr->widgets.wrap_bookmarks_check),
preferences_get_int (pr, WRAP_BOOKMARKS));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(pr->widgets.indent_open_brace),
preferences_get_int (pr, INDENT_OPENING));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(pr->widgets.indent_close_brace),
preferences_get_int (pr, INDENT_CLOSING));
gtk_spin_button_set_value (GTK_SPIN_BUTTON
(pr->widgets.tab_size_spin),
preferences_get_int (pr, TAB_SIZE));
......@@ -786,6 +794,10 @@ gboolean preferences_save_yourself (Preferences * pr, FILE * fp)
fprintf (fp, "%s=%d\n", BRACES_CHECK,
preferences_get_int (pr, BRACES_CHECK));
fprintf (fp, "%s=%d\n", DOS_EOL_CHECK, preferences_get_int(pr, DOS_EOL_CHECK));
fprintf (fp, "%s=%d\n", INDENT_OPENING,
preferences_get_int (pr, INDENT_OPENING));
fprintf (fp, "%s=%d\n", INDENT_CLOSING,
preferences_get_int (pr, INDENT_CLOSING));
fprintf (fp, "%s=%d\n", WRAP_BOOKMARKS, preferences_get_int(pr, WRAP_BOOKMARKS));
fprintf (fp, "%s=%d\n", TAB_SIZE, preferences_get_int (pr, TAB_SIZE));
......
......@@ -106,6 +106,8 @@ struct _PreferencesWidgets
GtkWidget *braces_check_check;
GtkWidget *dos_eol_check;
GtkWidget *wrap_bookmarks_check;
GtkWidget *indent_open_brace;
GtkWidget *indent_close_brace;
GtkWidget *tab_size_spin;
GtkWidget *autosave_timer_spin;
......@@ -278,6 +280,8 @@ void preferences_set_build_options(Preferences* p);
#define WRAP_BOOKMARKS "editor.wrapbookmarks"
#define TAB_SIZE "tabsize"
#define INDENT_SIZE "indent.size"
#define INDENT_OPENING "indent.opening"
#define INDENT_CLOSING "indent.closing"
#define AUTOSAVE_TIMER "autosave.timer"
#define MARGIN_LINENUMBER_WIDTH "margin.linenumber.width"
#define SAVE_SESSION_TIMER "save.session.timer"
......
......@@ -972,6 +972,8 @@ create_preferences_page3 (Preferences * p)
GtkWidget *checkbutton11;
GtkWidget *checkbutton13;
GtkWidget *checkbutton14;
GtkWidget *checkbutton15;
GtkWidget *checkbutton16;
GtkWidget *checkbutton8;
GtkObject *spinbutton4_adj;
GtkWidget *spinbutton4;
......@@ -996,7 +998,7 @@ create_preferences_page3 (Preferences * p)
gtk_widget_show (vbox2);
gtk_container_add (GTK_CONTAINER (frame1), vbox2);
table2 = gtk_table_new (9, 4, FALSE);
table2 = gtk_table_new (11, 4, FALSE);
gtk_widget_show (table2);
gtk_box_pack_start (GTK_BOX (vbox2), table2, TRUE, TRUE, 0);
gtk_table_set_row_spacings (GTK_TABLE (table2), 2);
......@@ -1040,6 +1042,23 @@ create_preferences_page3 (Preferences * p)
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
checkbutton4 =
gtk_check_button_new_with_label (_
("Strip trailing spaces on file save"));
gtk_widget_show (checkbutton4);
gtk_table_attach (GTK_TABLE (table2), checkbutton4, 0, 1, 5, 6,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
checkbutton5 =
gtk_check_button_new_with_label (_
("Collapse all folds on file open"));
gtk_widget_show (checkbutton5);
gtk_table_attach (GTK_TABLE (table2), checkbutton5, 0, 1, 6, 7,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
checkbutton13 =
gtk_check_button_new_with_label(_("Filter extraneous chars in DOS mode"));
gtk_widget_show (checkbutton13);
......@@ -1054,9 +1073,23 @@ create_preferences_page3 (Preferences * p)
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
checkbutton15 =
gtk_check_button_new_with_label(_("Indent brace open"));
gtk_widget_show (checkbutton15);
gtk_table_attach (GTK_TABLE (table2), checkbutton15, 0, 1, 9, 10,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
checkbutton16 =
gtk_check_button_new_with_label(_("Indent brace close"));
gtk_widget_show (checkbutton16);
gtk_table_attach (GTK_TABLE (table2), checkbutton16, 0, 1, 10, 11,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
vseparator1 = gtk_vseparator_new ();
gtk_widget_show (vseparator1);
gtk_table_attach (GTK_TABLE (table2), vseparator1, 1, 2, 0, 8,
gtk_table_attach (GTK_TABLE (table2), vseparator1, 1, 2, 0, 11,
(GtkAttachOptions) (0),
(GtkAttachOptions) (GTK_FILL), 6, 0);
......@@ -1135,22 +1168,6 @@ create_preferences_page3 (Preferences * p)
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 5, 0);
checkbutton4 =
gtk_check_button_new_with_label (_
("Strip trailing spaces on file save"));
gtk_widget_show (checkbutton4);
gtk_table_attach (GTK_TABLE (table2), checkbutton4, 0, 1, 5, 6,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
checkbutton5 =
gtk_check_button_new_with_label (_
("Collapse all folds on file open"));
gtk_widget_show (checkbutton5);
gtk_table_attach (GTK_TABLE (table2), checkbutton5, 0, 1, 6, 7,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
p->widgets.disable_hilite_check = checkbutton8;
p->widgets.auto_save_check = checkbutton9;
p->widgets.auto_indent_check = checkbutton10;
......@@ -1158,6 +1175,8 @@ create_preferences_page3 (Preferences * p)
p->widgets.braces_check_check = checkbutton12;
p->widgets.dos_eol_check = checkbutton13;
p->widgets.wrap_bookmarks_check = checkbutton14;
p->widgets.indent_open_brace = checkbutton15;
p->widgets.indent_close_brace = checkbutton16;
p->widgets.tab_size_spin = spinbutton5;
p->widgets.autosave_timer_spin = spinbutton2;
p->widgets.autoindent_size_spin = spinbutton3;
......@@ -1180,6 +1199,9 @@ create_preferences_page3 (Preferences * p)
gtk_widget_ref (checkbutton11);
gtk_widget_ref (checkbutton12);
gtk_widget_ref (checkbutton13);
gtk_widget_ref (checkbutton14);
gtk_widget_ref (checkbutton15);
gtk_widget_ref (checkbutton16);
return frame1;
}
......@@ -2010,6 +2032,16 @@ on_preferences_apply_clicked (GtkButton * button, gpointer user_data)
(pr->widgets.
wrap_bookmarks_check)));
preferences_set_int (pr, INDENT_OPENING,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
(pr->widgets.
indent_open_brace)));
preferences_set_int (pr, INDENT_CLOSING,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
(pr->widgets.
indent_close_brace)));
preferences_set_int (pr, TAB_SIZE,
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON
(pr->widgets.
......
......@@ -40,6 +40,13 @@ static void project_import_stdout_line_arrived (gchar * line);
static void project_import_stderr_line_arrived (gchar * line);
static void project_import_terminated (int status, time_t time);
/* The maximum time allowed for importing a project (in seconds).
This might seem a bit hih - but then, shell scripts are slow.
We can safely reduce this to a minute or so once we finish
re-writing the import script in C - Biswa */
#define AN_IMPORT_TIMEOUT 600
gboolean progressbar_timeout (gpointer data);
static int timer;
......@@ -102,7 +109,7 @@ project_import_start (gchar * topleveldir, ProjectImportWizard * piw)
(piw->widgets.progressbar), TRUE);
gtk_label_set_text (GTK_LABEL (piw->widgets.label),
_("Importing project...please wait!"));
timer = gtk_timeout_add (50, progressbar_timeout,
timer = gtk_timeout_add (AN_IMPORT_TIMEOUT, progressbar_timeout,
GTK_PROGRESS_BAR (piw->widgets.progressbar));
return ret;
}
......
......@@ -338,13 +338,21 @@ GnomeUIInfo text_editor_menu_uiinfo[] = {
GNOMEUIINFO_SEPARATOR,
{
/* 17 */
GNOME_APP_UI_ITEM, N_("Find Usage"),
NULL,
on_lookup_symbol_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL}
,
{
/* 18 */
GNOME_APP_UI_ITEM, N_("Close"),
NULL,
on_close_file1_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL}
,
/* 18 */
/* 19 */
GNOMEUIINFO_END
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment