Revision: 3719 http://geany.svn.sourceforge.net/geany/?rev=3719&view=rev Author: eht16 Date: 2009-04-21 20:53:11 +0000 (Tue, 21 Apr 2009)
Log Message: ----------- Add utils_str_middle_truncate() and document_get_basename_for_display() to the plugin API.
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/geanyfunctions.h trunk/src/plugindata.h trunk/src/plugins.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-04-21 20:52:51 UTC (rev 3718) +++ trunk/ChangeLog 2009-04-21 20:53:11 UTC (rev 3719) @@ -4,6 +4,9 @@ src/utils.c, src/utils.h: Ellipsize tab labels and some status messages for very long filenames (closes #2777348). + * src/plugins.c, src/plugindata.h, plugins/geanyfunctions.h: + Add utils_str_middle_truncate() and + document_get_basename_for_display() to the plugin API.
2009-04-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/plugins/geanyfunctions.h =================================================================== --- trunk/plugins/geanyfunctions.h 2009-04-21 20:52:51 UTC (rev 3718) +++ trunk/plugins/geanyfunctions.h 2009-04-21 20:53:11 UTC (rev 3719) @@ -48,6 +48,8 @@ geany_functions->p_document->rename_file #define document_get_status_color \ geany_functions->p_document->get_status_color +#define document_get_basename_for_display \ + geany_functions->p_document->get_basename_for_display #define editor_get_indent_prefs \ geany_functions->p_editor->get_indent_prefs #define editor_create_widget \ @@ -180,6 +182,8 @@ geany_functions->p_utils->open_browser #define utils_string_replace_first \ geany_functions->p_utils->string_replace_first +#define utils_str_middle_truncate \ + geany_functions->p_utils->str_middle_truncate #define ui_dialog_vbox_new \ geany_functions->p_ui->dialog_vbox_new #define ui_frame_new_with_alignment \
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2009-04-21 20:52:51 UTC (rev 3718) +++ trunk/src/plugindata.h 2009-04-21 20:53:11 UTC (rev 3719) @@ -45,7 +45,7 @@ enum { /** The Application Programming Interface (API) version, incremented * whenever any plugin data types are modified or appended to. */ - GEANY_API_VERSION = 139, + GEANY_API_VERSION = 140,
/** The Application Binary Interface (ABI) version, incremented whenever * existing fields in the plugin data types have to be changed or reordered. */ @@ -254,6 +254,7 @@ gboolean (*save_file_as) (struct GeanyDocument *doc, const gchar *utf8_fname); void (*rename_file) (struct GeanyDocument *doc, const gchar *new_filename); const GdkColor* (*get_status_color) (struct GeanyDocument *doc); + gchar* (*get_basename_for_display) (struct GeanyDocument *doc, gint length); } DocumentFuncs;
@@ -361,6 +362,7 @@ void (*open_browser) (const gchar *uri); guint (*string_replace_first) (GString *haystack, const gchar *needle, const gchar *replace); + gchar* (*str_middle_truncate) (const gchar *string, guint truncate_length); } UtilsFuncs;
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2009-04-21 20:52:51 UTC (rev 3718) +++ trunk/src/plugins.c 2009-04-21 20:53:11 UTC (rev 3719) @@ -139,7 +139,8 @@ &document_index, &document_save_file_as, &document_rename_file, - &document_get_status_color + &document_get_status_color, + &document_get_basename_for_display };
static EditorFuncs editor_funcs = { @@ -224,7 +225,8 @@ &utils_str_casecmp, &utils_get_date_time, &utils_open_browser, - &utils_string_replace_first + &utils_string_replace_first, + &utils_str_middle_truncate };
static UIUtilsFuncs uiutils_funcs = {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.