SF.net SVN: geany:[5418] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Thu Nov 18 18:27:01 UTC 2010
Revision: 5418
http://geany.svn.sourceforge.net/geany/?rev=5418&view=rev
Author: ntrel
Date: 2010-11-18 18:27:01 +0000 (Thu, 18 Nov 2010)
Log Message:
-----------
Add dialogs_show_input() to API.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/geanyfunctions.h
trunk/src/dialogs.c
trunk/src/plugindata.h
trunk/src/plugins.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-18 18:20:12 UTC (rev 5417)
+++ trunk/ChangeLog 2010-11-18 18:27:01 UTC (rev 5418)
@@ -11,6 +11,9 @@
Make dialogs_show_input() return NULL when cancelled.
* tagmanager/php.c:
Parse PHP final functions (fixes #3111171).
+ * src/dialogs.c, src/plugindata.h, src/plugins.c,
+ plugins/geanyfunctions.h:
+ Add dialogs_show_input() to API.
2010-11-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/plugins/geanyfunctions.h
===================================================================
--- trunk/plugins/geanyfunctions.h 2010-11-18 18:20:12 UTC (rev 5417)
+++ trunk/plugins/geanyfunctions.h 2010-11-18 18:27:01 UTC (rev 5418)
@@ -294,6 +294,8 @@
geany_functions->p_dialogs->dialogs_show_save_as
#define dialogs_show_input_numeric \
geany_functions->p_dialogs->dialogs_show_input_numeric
+#define dialogs_show_input \
+ geany_functions->p_dialogs->dialogs_show_input
#define msgwin_status_add \
geany_functions->p_msgwin->msgwin_status_add
#define msgwin_compiler_add \
Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c 2010-11-18 18:20:12 UTC (rev 5417)
+++ trunk/src/dialogs.c 2010-11-18 18:27:01 UTC (rev 5418)
@@ -1032,7 +1032,13 @@
}
-/* Returns: new copy of user input or NULL if cancelled. */
+/** Asks the user for text input.
+ * @param title Dialog title.
+ * @param parent The currently focused window, usually @c geany->main_widgets->window.
+ * @param label_text Input label text.
+ * @param default_text Text to display in the input.
+ * @return New copy of user input or @c NULL if cancelled.
+ * @since 0.20. */
gchar *dialogs_show_input(const gchar *title, GtkWindow *parent, const gchar *label_text,
const gchar *default_text)
{
@@ -1042,6 +1048,7 @@
}
+/* Note: could be changed to dialogs_show_validated_input with argument for callback. */
/* Returns: newly allocated copy of the entry text or NULL on cancel.
* Specialised variant for Goto Line dialog. */
gchar *dialogs_show_input_goto_line(const gchar *title, GtkWindow *parent, const gchar *label_text,
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2010-11-18 18:20:12 UTC (rev 5417)
+++ trunk/src/plugindata.h 2010-11-18 18:27:01 UTC (rev 5418)
@@ -50,7 +50,7 @@
enum {
/** The Application Programming Interface (API) version, incremented
* whenever any plugin data types are modified or appended to. */
- GEANY_API_VERSION = 198,
+ GEANY_API_VERSION = 199,
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered. */
@@ -481,6 +481,8 @@
gboolean (*dialogs_show_save_as) (void);
gboolean (*dialogs_show_input_numeric) (const gchar *title, const gchar *label_text,
gdouble *value, gdouble min, gdouble max, gdouble step);
+ gchar* (*dialogs_show_input)(const gchar *title, GtkWindow *parent, const gchar *label_text,
+ const gchar *default_text);
}
DialogFuncs;
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2010-11-18 18:20:12 UTC (rev 5417)
+++ trunk/src/plugins.c 2010-11-18 18:27:01 UTC (rev 5418)
@@ -247,7 +247,8 @@
&dialogs_show_question,
&dialogs_show_msgbox,
&dialogs_show_save_as,
- &dialogs_show_input_numeric
+ &dialogs_show_input_numeric,
+ &dialogs_show_input
};
/* Macro to prevent confusing macro being generated in geanyfunctions.h */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list