Commit 25b40224 authored by Sebastien Granjoux's avatar Sebastien Granjoux

Fixed #563988 – don't display zoom factor when using GtkSourceView

	* plugins/document-manager/plugin.c (update_status):
	Fixed #563988 – don't display zoom factor when using GtkSourceView editor
	* plugins/build-basic-autotools/plugin.c (on_build_terminated),
	plugins/tools/execute.c (atp_output_context_print_result):
	#564295 - minor English fix

	* plugins/document-manager/search-box.c (search_box_init),
	plugins/search/anjuta-search.glade,
	plugins/search/plugin.c (find_incremental),
	plugins/search/search-replace.c (search_replace_populate),
	(search_update_dialog), (search_replace_find_usage),
	plugins/search/search-replace.h,
	plugins/search/search-replace_backend.c (get_next_match),
	plugins/search/search-replace_backend.h,
	plugins/search/search_preferences.c
	(search_preferences_read_setting),
	(search_preferences_setting_by_default),
	(search_preferences_save_setting):
	fixed #563500 – inconsistent case sensitivity defaults

svn path=/trunk/; revision=4445
parent e6ba53bb
2008-12-14 Adam Dingle <adam@medovina.org>
reviewed by: Sébastien Granjoux <seb.sfo@free.fr>
* plugins/document-manager/plugin.c (update_status):
Fixed #563988 – don't display zoom factor when using GtkSourceView editor
* plugins/build-basic-autotools/plugin.c (on_build_terminated),
plugins/tools/execute.c (atp_output_context_print_result):
#564295 - minor English fix
* plugins/document-manager/search-box.c (search_box_init),
plugins/search/anjuta-search.glade,
plugins/search/plugin.c (find_incremental),
plugins/search/search-replace.c (search_replace_populate),
(search_update_dialog), (search_replace_find_usage),
plugins/search/search-replace.h,
plugins/search/search-replace_backend.c (get_next_match),
plugins/search/search-replace_backend.h,
plugins/search/search_preferences.c
(search_preferences_read_setting),
(search_preferences_setting_by_default),
(search_preferences_save_setting):
fixed #563500 – inconsistent case sensitivity defaults
2008-12-14 Yuriy Penkin <yuriy.penkin@gmail.com>
reviewed by: Sébastien Granjoux <seb.sfo@free.fr>
......@@ -942,12 +942,12 @@ on_build_terminated (AnjutaLauncher *launcher,
if (status)
{
ianjuta_message_view_buffer_append (context->message_view,
_("Completed unsuccessful\n"), NULL);
_("Completed unsuccessfully\n"), NULL);
}
else
{
ianjuta_message_view_buffer_append (context->message_view,
_("Completed successful\n"), NULL);
_("Completed successfully\n"), NULL);
}
ianjuta_message_view_buffer_append (context->message_view, buff1, NULL);
g_free (buff1);
......
......@@ -954,7 +954,12 @@ update_status (DocmanPlugin *plugin, IAnjutaEditor *te)
{
edit = g_strdup (_("INS"));
}
anjuta_status_set_default (status, _("Zoom"), "%d", zoom);
if (IANJUTA_IS_EDITOR_ZOOM(te))
anjuta_status_set_default (status, _("Zoom"), "%d", zoom);
else
anjuta_status_set_default (status, _("Zoom"), NULL);
anjuta_status_set_default (status, _("Line"), "%04d", line);
anjuta_status_set_default (status, _("Col"), "%03d", col);
anjuta_status_set_default (status, _("Mode"), edit);
......
......@@ -445,7 +445,7 @@ search_box_init (SearchBox *object)
G_CALLBACK (on_search_focus_out),
object);
private->case_check = gtk_check_button_new_with_label (_("Case sensitive"));
private->case_check = gtk_check_button_new_with_label (_("Match case"));
private->search_button = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (private->search_button), search);
......
......@@ -310,10 +310,10 @@
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="search.ignore.case">
<widget class="GtkCheckButton" id="search.match.case">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Case insensitive</property>
<property name="label" translatable="yes">Match case</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
......@@ -330,7 +330,7 @@
<widget class="GtkCheckButton" id="search.regex">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Regular Expression</property>
<property name="label" translatable="yes">Regular expression</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
......
......@@ -53,7 +53,7 @@ static gboolean find_incremental(IAnjutaEditor* te, gchar* expression,
se->search_str = expression;
se->regex = FALSE;
se->greedy = FALSE;
se->ignore_case = TRUE;
se->match_case = FALSE;
se->whole_word = FALSE;
se->whole_line = FALSE;
se->word_start = FALSE;
......
......@@ -170,8 +170,8 @@ static GladeWidget glade_widgets[] = {
{GE_BOOLEAN, "search.regex", NULL, NULL},
/* GREEDY */
{GE_BOOLEAN, "search.greedy", NULL, NULL},
/* IGNORE_CASE */
{GE_BOOLEAN, "search.ignore.case", NULL, NULL},
/* MATCH_CASE */
{GE_BOOLEAN, "search.match.case", NULL, NULL},
/* WHOLE_WORD */
{GE_BOOLEAN, "search.match.whole.word", NULL, NULL},
/* WORD_START */
......@@ -1172,7 +1172,7 @@ search_replace_populate(void)
populate_value(SEARCH_STRING, &(sr->search.expr.search_str));
populate_value(SEARCH_REGEX, &(sr->search.expr.regex));
populate_value(GREEDY, &(sr->search.expr.greedy));
populate_value(IGNORE_CASE, &(sr->search.expr.ignore_case));
populate_value(MATCH_CASE, &(sr->search.expr.match_case));
populate_value(WHOLE_WORD, &(sr->search.expr.whole_word));
populate_value(WHOLE_LINE, &(sr->search.expr.whole_line));
populate_value(WORD_START, &(sr->search.expr.word_start));
......@@ -1433,8 +1433,8 @@ search_update_dialog(void)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), s->expr.regex);
widget = sr_get_gladewidget(GREEDY)->widget;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), s->expr.greedy);
widget = sr_get_gladewidget(IGNORE_CASE)->widget;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), s->expr.ignore_case);
widget = sr_get_gladewidget(MATCH_CASE)->widget;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), s->expr.match_case);
widget = sr_get_gladewidget(WHOLE_WORD)->widget;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), s->expr.whole_word);
widget = sr_get_gladewidget(WHOLE_LINE)->widget;
......@@ -1816,7 +1816,7 @@ void search_replace_find_usage(const gchar *symbol)
sr->search.expr.search_str = g_strdup (symbol);
sr->search.expr.regex = FALSE;
sr->search.expr.greedy = FALSE;
sr->search.expr.ignore_case = FALSE;
sr->search.expr.match_case = TRUE;
sr->search.expr.whole_word = TRUE;
sr->search.expr.whole_line = FALSE;
sr->search.expr.word_start = FALSE;
......
......@@ -63,7 +63,7 @@ typedef enum _GladeWidgetId
/* Checkboxes */
SEARCH_REGEX,
GREEDY,
IGNORE_CASE,
MATCH_CASE,
WHOLE_WORD,
WORD_START,
WHOLE_LINE,
......
......@@ -452,7 +452,7 @@ get_next_match(FileBuffer *fb, SearchDirection direction, SearchExpression *s)
GRegexMatchFlags match_flags = 0;
match_flags |= G_REGEX_MATCH_NOTEMPTY;
if (s->ignore_case)
if (!s->match_case)
{
compile_flags |= G_REGEX_CASELESS;
}
......@@ -517,7 +517,7 @@ get_next_match(FileBuffer *fb, SearchDirection direction, SearchExpression *s)
if (SD_BACKWARD == direction)
{
/* Backward matching. */
if (s->ignore_case)
if (!s->match_case)
{
gchar* current = g_utf8_offset_to_pointer (fb->buf, fb->pos);
gint len = g_utf8_strlen (s->search_str, -1);
......@@ -563,7 +563,7 @@ get_next_match(FileBuffer *fb, SearchDirection direction, SearchExpression *s)
else
{
/* Forward match */
if (s->ignore_case)
if (!s->match_case)
{
gchar* current = g_utf8_offset_to_pointer (fb->buf, fb->pos);
gint len = g_utf8_strlen (s->search_str, -1);
......
......@@ -31,7 +31,7 @@ typedef struct _SearchExpression
gchar *search_str;
gboolean regex;
gboolean greedy;
gboolean ignore_case;
gboolean match_case;
gboolean whole_word;
gboolean whole_line;
gboolean word_start;
......
......@@ -146,8 +146,8 @@ search_preferences_read_setting(gchar *name)
gconf_concat_dir_and_key(name, "regex"), NULL);
sr->search.expr.greedy = gconf_client_get_bool(client,
gconf_concat_dir_and_key(name, "greedy"), NULL);
sr->search.expr.ignore_case = gconf_client_get_bool(client,
gconf_concat_dir_and_key(name, "ignore_case"), NULL);
sr->search.expr.match_case = gconf_client_get_bool(client,
gconf_concat_dir_and_key(name, "match_case"), NULL);
sr->search.expr.whole_word = gconf_client_get_bool(client,
gconf_concat_dir_and_key(name, "whole_word"), NULL);
sr->search.expr.whole_line = gconf_client_get_bool(client,
......@@ -176,7 +176,7 @@ search_preferences_setting_by_default(void)
{
sr->search.expr.regex =FALSE;
sr->search.expr.greedy = FALSE;
sr->search.expr.ignore_case = FALSE;
sr->search.expr.match_case = FALSE;
sr->search.expr.whole_word = FALSE;
sr->search.expr.whole_line = FALSE;
sr->search.expr.word_start = FALSE;
......@@ -206,8 +206,8 @@ search_preferences_save_setting(gchar *name)
sr->search.expr.regex, NULL);
gconf_client_set_bool(client, gconf_concat_dir_and_key(path, "greedy"),
sr->search.expr.greedy, NULL);
gconf_client_set_bool(client, gconf_concat_dir_and_key(path, "ignore_case"),
sr->search.expr.ignore_case, NULL);
gconf_client_set_bool(client, gconf_concat_dir_and_key(path, "match_case"),
sr->search.expr.match_case, NULL);
gconf_client_set_bool(client, gconf_concat_dir_and_key(path, "whole_word"),
sr->search.expr.whole_word, NULL);
gconf_client_set_bool(client, gconf_concat_dir_and_key(path, "whole_line"),
......
......@@ -504,14 +504,14 @@ atp_output_context_print_result (ATPOutputContext *this, gint error)
{
if (error)
{
buffer = g_strdup_printf (_("Completed unsuccessful with status code %d\n"),
buffer = g_strdup_printf (_("Completed unsuccessfully with status code %d\n"),
error);
ok = atp_output_context_print (this, buffer);
g_free (buffer);
}
else
{
ok = atp_output_context_print (this, _("Completed successful\n"));
ok = atp_output_context_print (this, _("Completed successfully\n"));
}
ok &= atp_output_context_print (this, "\n");
if (this->view)
......
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