geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dialogs.h File Reference

File related dialogs, miscellaneous dialogs, font dialog. More...

#include "document.h"
#include "gtkcompat.h"
Include dependency graph for dialogs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

gboolean dialogs_show_question (const gchar *text,...)
 Shows a question message box with text and Yes/No buttons. More...
 
void dialogs_show_msgbox (GtkMessageType type, const gchar *text,...)
 Shows a message box of the type type with text. More...
 
gboolean dialogs_show_save_as (void)
 Shows the Save As dialog for the current notebook page. More...
 
gboolean dialogs_show_input_numeric (const gchar *title, const gchar *label_text, gdouble *value, gdouble min, gdouble max, gdouble step)
 Shows an input box to enter a numerical value using a GtkSpinButton. More...
 
gchar * dialogs_show_input (const gchar *title, GtkWindow *parent, const gchar *label_text, const gchar *default_text)
 Asks the user for text input. More...
 

Detailed Description

File related dialogs, miscellaneous dialogs, font dialog.

Definition in file dialogs.h.

Function Documentation

◆ dialogs_show_input()

gchar * dialogs_show_input ( const gchar *  title,
GtkWindow *  parent,
const gchar *  label_text,
const gchar *  default_text 
)

Asks the user for text input.

Parameters
titleDialog title.
parent The currently focused window, usually geany->main_widgets->window. NULL can be used but is discouraged due to window manager effects.
label_text Label text, or NULL.
default_text Text to display in the input field, or NULL.
Returns
New copy of user input or NULL if cancelled.
Since
0.20.

Definition at line 1067 of file dialogs.c.

References dialogs_show_input_full(), NULL, and on_dialog_input().

Referenced by insert_date(), on_label_button_clicked(), and utils_open_browser().

◆ dialogs_show_input_numeric()

gboolean dialogs_show_input_numeric ( const gchar *  title,
const gchar *  label_text,
gdouble *  value,
gdouble  min,
gdouble  max,
gdouble  step 
)

Shows an input box to enter a numerical value using a GtkSpinButton.

If the dialog is aborted, value remains untouched.

Parameters
titleThe dialog title.
label_textThe shown dialog label.
valueThe default value for the spin button and the return location of the entered value. Must be non-NULL.
minMinimum allowable value (see documentation for gtk_spin_button_new_with_range()).
maxMaximum allowable value (see documentation for gtk_spin_button_new_with_range()).
stepIncrement added or subtracted by spinning the widget (see documentation for gtk_spin_button_new_with_range()).
Returns
TRUE if a value was entered and the dialog closed with 'OK'. FALSE otherwise.
Since
0.16

Definition at line 1108 of file dialogs.c.

References dialog, gtk_container_add(), gtk_widget_show_all(), label, main_widgets, max, NULL, on_input_numeric_activate(), ui_dialog_vbox_new(), ui_entry_add_clear_icon(), and GeanyMainWidgets::window.

Referenced by editor_replace_spaces().

◆ dialogs_show_msgbox()

void dialogs_show_msgbox ( GtkMessageType  type,
const gchar *  text,
  ... 
)

Shows a message box of the type type with text.

On Unix-like systems a GTK message dialog box is shown, on Win32 systems a native Windows message dialog box is shown.

Parameters
typeA GtkMessageType, e.g. GTK_MESSAGE_INFO, GTK_MESSAGE_WARNING, GTK_MESSAGE_QUESTION, GTK_MESSAGE_ERROR.
textPrintf()-style format string.
...Arguments for the text format string.

Definition at line 729 of file dialogs.c.

References dialog, main_status, main_widgets, NULL, show_msgbox_dialog(), text, and GeanyMainWidgets::window.

Referenced by configure_response_cb(), create_config_dir(), dialogs_show_file_properties(), load_text_file(), open_file_dialog_handle_response(), print_external(), printing_print_gtk(), save_settings(), and set_status().

◆ dialogs_show_question()

gboolean dialogs_show_question ( const gchar *  text,
  ... 
)

Shows a question message box with text and Yes/No buttons.

On Unix-like systems a GTK message dialog box is shown, on Win32 systems a native Windows message dialog box is shown.

Parameters
textPrintf()-style format string.
...Arguments for the text format string.
Returns
TRUE if the user answered with Yes, otherwise FALSE.

Definition at line 1370 of file dialogs.c.

References main_status, main_widgets, NULL, show_prompt(), text, and GeanyMainWidgets::window.

Referenced by handle_current_session(), on_file_save_dialog_response(), print_external(), and setup_config_dir().

◆ dialogs_show_save_as()

gboolean dialogs_show_save_as ( void  )

Shows the Save As dialog for the current notebook page.

Returns
TRUE if the file was saved, otherwise FALSE.

Definition at line 667 of file dialogs.c.

References _, document_get_current(), handle_save_as(), interface_prefs, main_widgets, NULL, show_save_as_gtk(), GeanyInterfacePrefs::use_native_windows_dialogs, and GeanyMainWidgets::window.

Referenced by document_save_file(), on_monitor_resave_missing_file_response(), and on_save_as1_activate().