Kaydet (Commit) b9a42fa6 authored tarafından Nick Treleaven's avatar Nick Treleaven

Add dialogs_show_input() to API.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5418 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 9c94b5b3
......@@ -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>
......
......@@ -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 \
......
......@@ -1032,7 +1032,13 @@ static void on_dialog_input(const gchar *str)
}
/* 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 @@ gchar *dialogs_show_input(const gchar *title, GtkWindow *parent, const gchar *la
}
/* 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,
......
......@@ -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 @@ typedef struct DialogFuncs
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;
......
......@@ -247,7 +247,8 @@ static DialogFuncs dialog_funcs = {
&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 */
......
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