Revision: 2861
http://geany.svn.sourceforge.net/geany/?rev=2861&view=rev
Author: ntrel
Date: 2008-08-07 15:30:52 +0000 (Thu, 07 Aug 2008)
Log Message:
-----------
Add editor_get_indent_prefs() to the API.
Make editor_get_indent_prefs() return default prefs if editor is
NULL.
Modified Paths:
--------------
branches/custom-tab-width/ChangeLog
branches/custom-tab-width/src/editor.c
branches/custom-tab-width/src/plugindata.h
branches/custom-tab-width/src/plugins.c
Modified: branches/custom-tab-width/ChangeLog
===================================================================
--- branches/custom-tab-width/ChangeLog 2008-08-07 12:03:56 UTC (rev 2860)
+++ branches/custom-tab-width/ChangeLog 2008-08-07 15:30:52 UTC (rev 2861)
@@ -6,6 +6,10 @@
* src/editor.c:
Remove opening-brace indent code from get_indent() as it's now in
get_brace_indent().
+ * src/plugindata.h, src/plugins.c, src/editor.c:
+ Add editor_get_indent_prefs() to the API.
+ Make editor_get_indent_prefs() return default prefs if editor is
+ NULL.
2008-08-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/custom-tab-width/src/editor.c
===================================================================
--- branches/custom-tab-width/src/editor.c 2008-08-07 12:03:56 UTC (rev 2860)
+++ branches/custom-tab-width/src/editor.c 2008-08-07 15:30:52 UTC (rev 2861)
@@ -753,7 +753,7 @@
static const GeanyIndentPrefs *
get_default_indent_prefs(void)
{
- /* In future this might depend on project or filetype. */
+ /* In future this might depend on the current project. */
return editor_prefs.indentation;
}
@@ -761,16 +761,19 @@
/** Get the indentation prefs for the editor.
* In future, the prefs might be different according to project or filetype.
* @warning Always get a fresh result instead of keeping a pointer to it if the editor
- * settings may have changed, or if this function has been called for a different @a editor. */
+ * settings may have changed, or if this function has been called for a different @a editor.
+ * @param editor The editor, or @c NULL to get the default indent prefs.
+ * @return The indent prefs. */
const GeanyIndentPrefs *
editor_get_indent_prefs(GeanyEditor *editor)
{
static GeanyIndentPrefs iprefs;
- g_return_val_if_fail(editor != NULL, NULL);
-
iprefs = *get_default_indent_prefs();
+ if (!editor)
+ return &iprefs;
+
iprefs.type = editor->indent_type;
if (!editor->auto_indent)
iprefs.auto_indent_mode = GEANY_AUTOINDENT_NONE;
Modified: branches/custom-tab-width/src/plugindata.h
===================================================================
--- branches/custom-tab-width/src/plugindata.h 2008-08-07 12:03:56 UTC (rev 2860)
+++ branches/custom-tab-width/src/plugindata.h 2008-08-07 15:30:52 UTC (rev 2861)
@@ -444,6 +444,8 @@
void (*set_indicator) (struct GeanyEditor *editor, gint start, gint end);
void (*set_indicator_on_line) (struct GeanyEditor *editor, gint line);
void (*clear_indicators) (struct GeanyEditor *editor);
+
+ const struct GeanyIndentPrefs* (*get_indent_prefs)(struct GeanyEditor *editor);
/* Remember to convert any GeanyDocument or ScintillaObject pointers in any
* appended functions to GeanyEditor pointers. */
}
Modified: branches/custom-tab-width/src/plugins.c
===================================================================
--- branches/custom-tab-width/src/plugins.c 2008-08-07 12:03:56 UTC (rev 2860)
+++ branches/custom-tab-width/src/plugins.c 2008-08-07 15:30:52 UTC (rev 2861)
@@ -114,7 +114,8 @@
static EditorFuncs editor_funcs = {
&editor_set_indicator,
&editor_set_indicator_on_line,
- &editor_clear_indicators
+ &editor_clear_indicators,
+ &editor_get_indent_prefs
};
static ScintillaFuncs sci_funcs = {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2856
http://geany.svn.sourceforge.net/geany/?rev=2856&view=rev
Author: eht16
Date: 2008-08-05 08:54:02 +0000 (Tue, 05 Aug 2008)
Log Message:
-----------
Fix wrong parsing of keywords if they are not followed by a space (closes #2037728).
Modified Paths:
--------------
trunk/ChangeLog
trunk/tagmanager/tcl.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-08-05 08:52:59 UTC (rev 2855)
+++ trunk/ChangeLog 2008-08-05 08:54:02 UTC (rev 2856)
@@ -3,6 +3,9 @@
* src/vte.c:
Revert the recent VTE realisation changes as they don't make things
better.
+ * tagmanager/tcl.c:
+ Fix wrong parsing of keywords if they are not followed by a space
+ (closes #2037728).
2008-08-03 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/tagmanager/tcl.c
===================================================================
--- trunk/tagmanager/tcl.c 2008-08-05 08:52:59 UTC (rev 2855)
+++ trunk/tagmanager/tcl.c 2008-08-05 08:54:02 UTC (rev 2856)
@@ -55,7 +55,16 @@
static boolean match (const unsigned char *line, const char *word)
{
- return (boolean) (strncmp ((const char*) line, word, strlen (word)) == 0);
+ size_t len = strlen (word);
+ boolean matched = (strncmp ((const char*) line, word, len) == 0);
+
+ if (matched)
+ {
+ /* check that the word is followed by a space to avoid detecting something
+ * like "proc_new ..." */
+ matched = isspace (*(line + len));
+ }
+ return matched;
}
static void findTclTags (void)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2855
http://geany.svn.sourceforge.net/geany/?rev=2855&view=rev
Author: eht16
Date: 2008-08-05 08:52:59 +0000 (Tue, 05 Aug 2008)
Log Message:
-----------
Revert the recent VTE realisation changes as they don't make things better.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/vte.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-08-04 14:10:16 UTC (rev 2854)
+++ trunk/ChangeLog 2008-08-05 08:52:59 UTC (rev 2855)
@@ -1,3 +1,10 @@
+2008-08-05 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/vte.c:
+ Revert the recent VTE realisation changes as they don't make things
+ better.
+
+
2008-08-03 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/vte.c:
Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c 2008-08-04 14:10:16 UTC (rev 2854)
+++ trunk/src/vte.c 2008-08-05 08:52:59 UTC (rev 2855)
@@ -288,12 +288,13 @@
g_signal_connect(vte, "motion-notify-event", G_CALLBACK(on_motion_event), NULL);
g_signal_connect(vte, "drag-data-received", G_CALLBACK(vte_drag_data_received), NULL);
+ vte_start(vte);
+
gtk_widget_show_all(frame);
gtk_notebook_insert_page(GTK_NOTEBOOK(msgwindow.notebook), frame, gtk_label_new(_("Terminal")), MSG_VTE);
/* the vte widget has to be realised before color changes take effect */
g_signal_connect_after(vte, "realize", G_CALLBACK(vte_apply_user_settings), NULL);
- gtk_widget_realize(vte);
}
@@ -442,8 +443,6 @@
if (! ui_prefs.msgwindow_visible)
return;
- geany_debug("VTE widget realized"); /* temporary :) */
-
vf->vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->vte), vc->scrollback_lines);
vf->vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(vc->vte), vc->scroll_on_key);
vf->vte_terminal_set_scroll_on_output(VTE_TERMINAL(vc->vte), vc->scroll_on_out);
@@ -453,9 +452,6 @@
vf->vte_terminal_set_color_background(VTE_TERMINAL(vc->vte), vc->colour_back);
override_menu_key();
-
- if (pid == 0)
- vte_start(vc->vte);
}
@@ -558,37 +554,12 @@
}
-static gboolean vte_send_cmd_cb(gpointer data)
-{
- gchar *cmd = data;
- if (! vte_send_cmd(cmd))
- {
- ui_set_statusbar(FALSE,
- _("Could not execute the command \"%s\" in the VTE because it probably contains a command."),
- cmd);
- }
- g_free(data);
-
- return FALSE;
-}
-
/* if the command could be executed, TRUE is returned, FALSE otherwise (i.e. there was some text
* on the prompt). */
gboolean vte_send_cmd(const gchar *cmd)
{
if (clean)
{
- /* the shell is started once the widget is realized but it might happen we send commands
- * before this happened, so start it manually */
- if (! GTK_WIDGET_REALIZED(vc->vte))
- {
- gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_VTE);
- /* wait until the notebook page has been switched which will realize the widget
- * implicitly, after this has been done the idle function willsend the command */
- g_idle_add(vte_send_cmd_cb, g_strdup(cmd));
- return TRUE;
- }
-
vf->vte_terminal_feed_child(VTE_TERMINAL(vc->vte), cmd, strlen(cmd));
clean = TRUE; /* vte_terminal_feed_child() also marks the vte as not clean */
return TRUE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.