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)  

ui_utils.c File Reference
#include "ui_utils.h"
#include "app.h"
#include "callbacks.h"
#include "dialogs.h"
#include "documentprivate.h"
#include "encodingsprivate.h"
#include "filetypes.h"
#include "geanymenubuttonaction.h"
#include "keyfile.h"
#include "keybindings.h"
#include "main.h"
#include "msgwindow.h"
#include "prefs.h"
#include "project.h"
#include "sciwrappers.h"
#include "sidebar.h"
#include "stash.h"
#include "support.h"
#include "symbols.h"
#include "toolbar.h"
#include "utils.h"
#include "win32.h"
#include "osx.h"
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
Include dependency graph for ui_utils.c:

Go to the source code of this file.

Classes

struct  GeanyRecentFiles
 
struct  GeanySharedMenu
 

Macros

#define DEFAULT_STATUSBAR_TEMPLATE
 
#define add_doc_widget(widget_name)    g_ptr_array_add(widgets.document_buttons, ui_lookup_widget(main_widgets.window, widget_name))
 
#define add_doc_toolitem(widget_name)    g_ptr_array_add(widgets.document_buttons, toolbar_get_action_by_name(widget_name))
 
#define foreach_menu(item, array)    for (item = array; item->menu; item++)
 

Typedefs

typedef struct GeanySharedMenu GeanySharedMenu
 

Enumerations

enum  { RECENT_FILE_FILE , RECENT_FILE_PROJECT }
 

Functions

static void update_recent_menu (GeanyRecentFiles *grf)
 
static void recent_file_loaded (const gchar *utf8_filename, GeanyRecentFiles *grf)
 
static void recent_file_activate_cb (GtkMenuItem *menuitem, gpointer user_data)
 
static void recent_project_activate_cb (GtkMenuItem *menuitem, gpointer user_data)
 
static GtkWidget * progress_bar_create (void)
 
static void ui_menu_sort_by_label (GtkMenu *menu)
 
void ui_widget_set_sensitive (GtkWidget *widget, gboolean set)
 
static void set_statusbar (const gchar *text, gboolean allow_override)
 
void ui_set_statusbar (gboolean log, const gchar *format,...)
 Displays text on the statusbar. More...
 
static gchar * create_statusbar_statistics (GeanyDocument *doc, guint line, guint vcol, guint pos)
 
void ui_update_statusbar (GeanyDocument *doc, gint pos)
 
void ui_set_window_title (GeanyDocument *doc)
 
void ui_set_editor_font (const gchar *font_name)
 
void ui_set_fullscreen (void)
 
void ui_update_popup_reundo_items (GeanyDocument *doc)
 
void ui_update_popup_copy_items (GeanyDocument *doc)
 
void ui_update_popup_goto_items (gboolean enable)
 
void ui_menu_copy_items_set_sensitive (gboolean sensitive)
 
void ui_update_menu_copy_items (GeanyDocument *doc)
 
void ui_update_insert_include_item (GeanyDocument *doc, gint item)
 
void ui_update_fold_items (void)
 
static void insert_include (GeanyDocument *doc, gint pos, const gchar *include)
 
static void on_popup_insert_include_activate (GtkMenuItem *menuitem, gpointer user_data)
 
static void on_menu_insert_include_activate (GtkMenuItem *menuitem, gpointer user_data)
 
static void insert_include_items (GtkMenu *me, GtkMenu *mp, gchar **includes, gchar *label)
 
void ui_create_insert_menu_items (void)
 
static void insert_date (GeanyDocument *doc, gint pos, const gchar *date_style)
 
static void on_popup_insert_date_activate (GtkMenuItem *menuitem, gpointer user_data)
 
static void on_menu_insert_date_activate (GtkMenuItem *menuitem, gpointer user_data)
 
static void insert_date_items (GtkMenu *me, GtkMenu *mp, gchar *label)
 
void ui_create_insert_date_menu_items (void)
 
void ui_save_buttons_toggle (gboolean enable)
 
static void init_document_widgets (void)
 
void ui_document_buttons_update (void)
 
static void on_doc_sensitive_widget_destroy (GtkWidget *widget, G_GNUC_UNUSED gpointer user_data)
 
void ui_add_document_sensitive (GtkWidget *widget)
 Adds a widget to the list of widgets that should be set sensitive/insensitive when some documents are present/no documents are open. More...
 
void ui_widget_show_hide (GtkWidget *widget, gboolean show)
 
void ui_sidebar_show_hide (void)
 
void ui_document_show_hide (GeanyDocument *doc)
 
void ui_set_search_entry_background (GtkWidget *widget, gboolean success)
 
static void recent_create_menu (GeanyRecentFiles *grf)
 
static GeanyRecentFilesrecent_get_recent_files (void)
 
static GeanyRecentFilesrecent_get_recent_projects (void)
 
void ui_create_recent_menus (void)
 
static void recent_file_activate_cb (GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
 
static void recent_project_activate_cb (GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
 
static void add_recent_file (const gchar *utf8_filename, GeanyRecentFiles *grf, const GtkRecentData *rdata)
 
void ui_add_recent_document (GeanyDocument *doc)
 
void ui_add_recent_project_file (const gchar *utf8_filename)
 
gchar * ui_menu_item_get_text (GtkMenuItem *menu_item)
 
static gint find_recent_file_item (gconstpointer list_data, gconstpointer user_data)
 
void ui_update_recent_project_menu (void)
 
static void menu_reorder_child (GtkMenu *menu, GtkWidget *child, gint position)
 
static void add_recent_file_menu_item (const gchar *utf8_filename, GeanyRecentFiles *grf, GtkWidget *menu)
 
void ui_toggle_editor_features (GeanyUIEditorFeatures feature)
 
void ui_update_view_editor_menu_items (void)
 
GtkWidget * ui_frame_new_with_alignment (const gchar *label_text, GtkWidget **alignment)
 Creates a GNOME HIG-style frame (with no border and indented child alignment). More...
 
GtkWidget * ui_dialog_vbox_new (GtkDialog *dialog)
 Makes a fixed border for dialogs without increasing the button box border. More...
 
void ui_dialog_set_primary_button_order (GtkDialog *dialog, gint response,...)
 
GtkWidget * ui_button_new_with_image (const gchar *stock_id, const gchar *text)
 Creates a GtkButton with custom text and a stock image similar to gtk_button_new_from_stock(). More...
 
GtkWidget * ui_image_menu_item_new (const gchar *stock_id, const gchar *label)
 Creates a GtkImageMenuItem with a stock image and a custom label. More...
 
static void entry_clear_icon_release_cb (GtkEntry *entry, gint icon_pos, GdkEvent *event, gpointer data)
 
void ui_entry_add_clear_icon (GtkEntry *entry)
 Adds a small clear icon to the right end of the passed entry. More...
 
void ui_entry_add_activate_backward_signal (GtkEntry *entry)
 
static void add_to_size_group (GtkWidget *widget, gpointer size_group)
 
void ui_hbutton_box_copy_layout (GtkButtonBox *master, GtkButtonBox *copy)
 
static gboolean tree_model_find_text (GtkTreeModel *model, GtkTreeIter *iter, gint column, const gchar *text)
 
void ui_combo_box_add_to_history (GtkComboBoxText *combo_entry, const gchar *text, gint history_len)
 Prepends text to the drop down list, removing a duplicate element in the list if found. More...
 
void ui_combo_box_prepend_text_once (GtkComboBoxText *combo, const gchar *text)
 
void ui_update_tab_status (GeanyDocument *doc)
 
static gboolean tree_model_iter_get_next (GtkTreeModel *model, GtkTreeIter *iter, gboolean down)
 
static gboolean tree_view_find (GtkTreeView *treeview, TVMatchCallback cb, gboolean down)
 
gboolean ui_tree_view_find_next (GtkTreeView *treeview, TVMatchCallback cb)
 
gboolean ui_tree_view_find_previous (GtkTreeView *treeview, TVMatchCallback cb)
 
static gboolean ui_tree_view_query_tooltip_cb (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data)
 
void ui_tree_view_set_tooltip_text_column (GtkTreeView *tree_view, gint column)
 Adds text tooltips to a tree view. More...
 
void ui_widget_modify_font_from_string (GtkWidget *widget, const gchar *str)
 Modifies the font of a widget using gtk_widget_modify_font(). More...
 
GtkWidget * ui_path_box_new (const gchar *title, GtkFileChooserAction action, GtkEntry *entry)
 Creates a GtkHBox with entry packed into it and an open button which runs a file chooser, replacing entry text (if successful) with the path returned from the GtkFileChooser. More...
 
static void ui_path_box_open_clicked (GtkButton *button, gpointer user_data)
 
void ui_setup_open_button_callback (GtkWidget *open_btn, const gchar *title, GtkFileChooserAction action, GtkEntry *entry)
 
static gchar * run_file_chooser (const gchar *title, GtkFileChooserAction action, const gchar *utf8_path)
 
void ui_statusbar_showhide (gboolean state)
 
void ui_table_add_row (GtkTable *table, gint row,...)
 Packs all GtkWidgets passed after the row argument into a table, using one widget per cell. More...
 
static void on_config_file_clicked (GtkWidget *widget, gpointer user_data)
 
static void free_on_closure_notify (gpointer data, GClosure *closure)
 
void ui_add_config_file_menu_item (const gchar *real_path, const gchar *label, GtkContainer *parent)
 
static gboolean sort_menu (gpointer data)
 
static void create_config_files_menu (void)
 
static void add_stock_icons (const GtkStockItem *items, gsize count)
 
void ui_init_stock_items (void)
 
void ui_init_toolbar_widgets (void)
 
void ui_swap_sidebar_pos (void)
 
static void init_recent_files (void)
 
static void ui_menu_move (GtkWidget *menu, GtkWidget *old, GtkWidget *new)
 
static void on_editor_menu_show (GtkWidget *widget, GeanySharedMenu *items)
 
static void on_editor_menu_hide (GtkWidget *widget, GeanySharedMenu *items)
 
void ui_init_prefs (void)
 
static const gchar * ui_guess_object_name (GObject *obj)
 
GtkWidget * create_edit_menu1 (void)
 
GtkWidget * create_prefs_dialog (void)
 
GtkWidget * create_project_dialog (void)
 
GtkWidget * create_toolbar_popup_menu1 (void)
 
GtkWidget * create_window1 (void)
 
static GtkWidget * ui_get_top_parent (GtkWidget *widget)
 
void ui_init_builder (void)
 
static void load_css_theme (const gchar *fn, guint priority)
 
static void init_css_styles (void)
 
static void add_css_config_file_item (void)
 
void ui_init (void)
 
void ui_finalize_builder (void)
 
static void auto_separator_update (GeanyAutoSeparator *autosep)
 
static void on_auto_separator_item_show_hide (GtkWidget *widget, gpointer user_data)
 
static void on_auto_separator_item_destroy (GtkWidget *widget, gpointer user_data)
 
void ui_auto_separator_add_ref (GeanyAutoSeparator *autosep, GtkWidget *item)
 
void ui_widget_set_tooltip_text (GtkWidget *widget, const gchar *text)
 Sets text as the contents of the tooltip for widget. More...
 
GtkWidget * ui_lookup_widget (GtkWidget *widget, const gchar *widget_name)
 Returns a widget from a name in a component, usually created by Glade. More...
 
gpointer ui_builder_get_object (const gchar *name)
 
static gboolean progress_bar_pulse (gpointer data)
 
void ui_progress_bar_start (const gchar *text)
 Starts a constantly pulsing progressbar in the right corner of the statusbar (if the statusbar is visible). More...
 
void ui_progress_bar_stop (void)
 Stops a running progress bar and hides the widget again. More...
 
static gint compare_menu_item_labels (gconstpointer a, gconstpointer b)
 
void ui_label_set_markup (GtkLabel *label, const gchar *format,...)
 
GtkWidget * ui_label_new_bold (const gchar *text)
 
void ui_menu_add_document_items (GtkMenu *menu, GeanyDocument *active, GCallback callback)
  Adds a list of document items to menu. More...
 
void ui_menu_add_document_items_sorted (GtkMenu *menu, GeanyDocument *active, GCallback callback, GCompareFunc compare_func)
  Adds a list of document items to menu. More...
 
gboolean ui_is_keyval_enter_or_return (guint keyval)
 Checks whether the passed keyval is the Enter or Return key. More...
 
gint ui_get_gtk_settings_integer (const gchar *property_name, gint default_value)
 Reads an integer from the GTK default settings registry (see http://library.gnome.org/devel/gtk/stable/GtkSettings.html). More...
 
void ui_editable_insert_text_callback (GtkEditable *editable, gchar *new_text, gint new_text_len, gint *position, gpointer data)
 
GIcon * ui_get_mime_icon (const gchar *mime_type)
 
void ui_focus_current_document (void)
 
const gchar * ui_lookup_stock_label (const gchar *stock_id)
 Finds the label text associated with stock_id. More...
 
gboolean ui_tree_model_iter_any_next (GtkTreeModel *model, GtkTreeIter *iter, gboolean down)
 
GtkWidget * ui_create_encodings_combo_box (gboolean has_detect, gint default_enc)
 
gint ui_encodings_combo_box_get_active_encoding (GtkComboBox *combo)
 
gboolean ui_encodings_combo_box_set_active_encoding (GtkComboBox *combo, gint enc)
 

Variables

GeanyInterfacePrefs interface_prefs
 
GeanyMainWidgets main_widgets
 
UIPrefs ui_prefs
 
UIWidgets ui_widgets
 
static GtkBuilder * builder = NULL
 
static GtkWidget * window1 = NULL
 
static GtkWidget * toolbar_popup_menu1 = NULL
 
static GtkWidget * edit_menu1 = NULL
 
static GtkWidget * prefs_dialog = NULL
 
static GtkWidget * project_dialog = NULL
 
struct {
   GPtrArray *   document_buttons
 
   GtkWidget *   menu_insert_include_items [2]
 
   GtkWidget *   popup_goto_items [4]
 
   GtkWidget *   popup_copy_items [3]
 
   GtkWidget *   menu_copy_items [3]
 
   GtkWidget *   redo_items [3]
 
   GtkWidget *   undo_items [3]
 
   GtkWidget *   save_buttons [4]
 
   GtkWidget *   config_files_menu
 
widgets
 
static guint progress_bar_timer_id = 0
 

Macro Definition Documentation

◆ add_doc_toolitem

#define add_doc_toolitem (   widget_name)     g_ptr_array_add(widgets.document_buttons, toolbar_get_action_by_name(widget_name))

Definition at line 861 of file ui_utils.c.

◆ add_doc_widget

#define add_doc_widget (   widget_name)     g_ptr_array_add(widgets.document_buttons, ui_lookup_widget(main_widgets.window, widget_name))

Definition at line 858 of file ui_utils.c.

◆ DEFAULT_STATUSBAR_TEMPLATE

#define DEFAULT_STATUSBAR_TEMPLATE
Value:
N_(\
"line: %l / %L\t " \
"col: %c\t " \
"sel: %s\t " \
"%w %t %m" \
"mode: %M " \
"encoding: %e " \
"filetype: %f " \
"scope: %S")
#define N_(String)
Definition: support.h:43

Definition at line 61 of file ui_utils.c.

◆ foreach_menu

#define foreach_menu (   item,
  array 
)     for (item = array; item->menu; item++)

Definition at line 2297 of file ui_utils.c.

Typedef Documentation

◆ GeanySharedMenu

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RECENT_FILE_FILE 
RECENT_FILE_PROJECT 

Definition at line 100 of file ui_utils.c.

Function Documentation

◆ add_css_config_file_item()

static void add_css_config_file_item ( void  )
static

Definition at line 2569 of file ui_utils.c.

References app, GeanyApp::configdir, NULL, and ui_add_config_file_menu_item().

Referenced by ui_init().

◆ add_recent_file()

static void add_recent_file ( const gchar *  utf8_filename,
GeanyRecentFiles grf,
const GtkRecentData *  rdata 
)
static

◆ add_recent_file_menu_item()

static void add_recent_file_menu_item ( const gchar *  utf8_filename,
GeanyRecentFiles grf,
GtkWidget *  menu 
)
static

◆ add_stock_icons()

static void add_stock_icons ( const GtkStockItem *  items,
gsize  count 
)
static

Definition at line 2197 of file ui_utils.c.

References count, and set.

Referenced by ui_init_stock_items().

◆ add_to_size_group()

static void add_to_size_group ( GtkWidget *  widget,
gpointer  size_group 
)
static

Definition at line 1641 of file ui_utils.c.

Referenced by ui_hbutton_box_copy_layout().

◆ auto_separator_update()

static void auto_separator_update ( GeanyAutoSeparator *  autosep)
static

◆ compare_menu_item_labels()

static gint compare_menu_item_labels ( gconstpointer  a,
gconstpointer  b 
)
static

Definition at line 2854 of file ui_utils.c.

References ui_menu_item_get_text(), and utils_str_casecmp().

Referenced by ui_menu_sort_by_label().

◆ create_config_files_menu()

static void create_config_files_menu ( void  )
static

◆ create_edit_menu1()

GtkWidget * create_edit_menu1 ( void  )

Definition at line 2380 of file ui_utils.c.

References edit_menu1.

Referenced by main_init().

◆ create_prefs_dialog()

GtkWidget * create_prefs_dialog ( void  )

Definition at line 2386 of file ui_utils.c.

References prefs_dialog.

Referenced by prefs_show_dialog().

◆ create_project_dialog()

GtkWidget * create_project_dialog ( void  )

Definition at line 2392 of file ui_utils.c.

References project_dialog.

Referenced by create_properties_dialog().

◆ create_statusbar_statistics()

◆ create_toolbar_popup_menu1()

GtkWidget * create_toolbar_popup_menu1 ( void  )

Definition at line 2398 of file ui_utils.c.

References toolbar_popup_menu1.

Referenced by main_init().

◆ create_window1()

GtkWidget * create_window1 ( void  )

Definition at line 2404 of file ui_utils.c.

References window1.

Referenced by main_init().

◆ entry_clear_icon_release_cb()

static void entry_clear_icon_release_cb ( GtkEntry *  entry,
gint  icon_pos,
GdkEvent *  event,
gpointer  data 
)
static

Definition at line 1585 of file ui_utils.c.

References entry.

Referenced by ui_entry_add_clear_icon().

◆ find_recent_file_item()

static gint find_recent_file_item ( gconstpointer  list_data,
gconstpointer  user_data 
)
static

Definition at line 1280 of file ui_utils.c.

References ui_menu_item_get_text(), and utils_str_equal().

Referenced by recent_file_loaded().

◆ free_on_closure_notify()

static void free_on_closure_notify ( gpointer  data,
GClosure *  closure 
)
static

Definition at line 2136 of file ui_utils.c.

Referenced by ui_add_config_file_menu_item().

◆ init_css_styles()

static void init_css_styles ( void  )
static

Definition at line 2527 of file ui_utils.c.

References app, GeanyApp::configdir, GeanyApp::datadir, load_css_theme(), and NULL.

Referenced by ui_init().

◆ init_document_widgets()

static void init_document_widgets ( void  )
static

Definition at line 864 of file ui_utils.c.

References add_doc_toolitem, add_doc_widget, and widgets.

Referenced by ui_init().

◆ init_recent_files()

static void init_recent_files ( void  )
static

◆ insert_date()

◆ insert_date_items()

static void insert_date_items ( GtkMenu *  me,
GtkMenu *  mp,
gchar *  label 
)
static

◆ insert_include()

static void insert_include ( GeanyDocument doc,
gint  pos,
const gchar *  include 
)
static

◆ insert_include_items()

static void insert_include_items ( GtkMenu *  me,
GtkMenu *  mp,
gchar **  includes,
gchar *  label 
)
static

◆ load_css_theme()

static void load_css_theme ( const gchar *  fn,
guint  priority 
)
static

Definition at line 2507 of file ui_utils.c.

References error(), geany_debug(), and NULL.

Referenced by init_css_styles().

◆ menu_reorder_child()

static void menu_reorder_child ( GtkMenu *  menu,
GtkWidget *  child,
gint  position 
)
static

Definition at line 1319 of file ui_utils.c.

References position.

Referenced by add_recent_file_menu_item(), recent_file_loaded(), and ui_menu_sort_by_label().

◆ on_auto_separator_item_destroy()

static void on_auto_separator_item_destroy ( GtkWidget *  widget,
gpointer  user_data 
)
static

Definition at line 2677 of file ui_utils.c.

References auto_separator_update(), and MAX.

Referenced by ui_auto_separator_add_ref().

◆ on_auto_separator_item_show_hide()

static void on_auto_separator_item_show_hide ( GtkWidget *  widget,
gpointer  user_data 
)
static

Definition at line 2665 of file ui_utils.c.

References auto_separator_update().

Referenced by ui_auto_separator_add_ref().

◆ on_config_file_clicked()

◆ on_doc_sensitive_widget_destroy()

static void on_doc_sensitive_widget_destroy ( GtkWidget *  widget,
G_GNUC_UNUSED gpointer  user_data 
)
static

Definition at line 962 of file ui_utils.c.

References widgets.

Referenced by ui_add_document_sensitive().

◆ on_editor_menu_hide()

static void on_editor_menu_hide ( GtkWidget *  widget,
GeanySharedMenu items 
)
static

◆ on_editor_menu_show()

static void on_editor_menu_show ( GtkWidget *  widget,
GeanySharedMenu items 
)
static

◆ on_menu_insert_date_activate()

static void on_menu_insert_date_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

Definition at line 762 of file ui_utils.c.

References document_get_current(), and insert_date().

Referenced by insert_date_items(), and ui_create_insert_date_menu_items().

◆ on_menu_insert_include_activate()

static void on_menu_insert_include_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

Definition at line 607 of file ui_utils.c.

References document_get_current(), and insert_include().

Referenced by insert_include_items(), and ui_create_insert_menu_items().

◆ on_popup_insert_date_activate()

static void on_popup_insert_date_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

◆ on_popup_insert_include_activate()

static void on_popup_insert_include_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

◆ progress_bar_create()

static GtkWidget * progress_bar_create ( void  )
static

Definition at line 2783 of file ui_utils.c.

References ui_widgets.

Referenced by ui_init().

◆ progress_bar_pulse()

static gboolean progress_bar_pulse ( gpointer  data)
static

Definition at line 2795 of file ui_utils.c.

References main_widgets, and GeanyMainWidgets::progressbar.

Referenced by ui_progress_bar_start().

◆ recent_create_menu()

◆ recent_file_activate_cb() [1/2]

static void recent_file_activate_cb ( GtkMenuItem *  menuitem,
G_GNUC_UNUSED gpointer  user_data 
)
static

◆ recent_file_activate_cb() [2/2]

static void recent_file_activate_cb ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

Referenced by recent_get_recent_files().

◆ recent_file_loaded()

◆ recent_get_recent_files()

◆ recent_get_recent_projects()

◆ recent_project_activate_cb() [1/2]

static void recent_project_activate_cb ( GtkMenuItem *  menuitem,
G_GNUC_UNUSED gpointer  user_data 
)
static

◆ recent_project_activate_cb() [2/2]

static void recent_project_activate_cb ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

◆ run_file_chooser()

static gchar * run_file_chooser ( const gchar *  title,
GtkFileChooserAction  action,
const gchar *  utf8_path 
)
static

◆ set_statusbar()

static void set_statusbar ( const gchar *  text,
gboolean  allow_override 
)
static

◆ sort_menu()

static gboolean sort_menu ( gpointer  data)
static

Definition at line 2169 of file ui_utils.c.

References ui_menu_sort_by_label().

Referenced by create_config_files_menu().

◆ tree_model_find_text()

static gboolean tree_model_find_text ( GtkTreeModel *  model,
GtkTreeIter *  iter,
gint  column,
const gchar *  text 
)
static

Definition at line 1668 of file ui_utils.c.

References text, and utils_str_equal().

Referenced by ui_combo_box_add_to_history(), and ui_combo_box_prepend_text_once().

◆ tree_model_iter_get_next()

static gboolean tree_model_iter_get_next ( GtkTreeModel *  model,
GtkTreeIter *  iter,
gboolean  down 
)
static

Definition at line 1753 of file ui_utils.c.

Referenced by tree_view_find().

◆ tree_view_find()

static gboolean tree_view_find ( GtkTreeView *  treeview,
TVMatchCallback  cb,
gboolean  down 
)
static

Definition at line 1771 of file ui_utils.c.

References NULL, tree_model_iter_get_next(), and ui_prefs.

Referenced by ui_tree_view_find_next(), and ui_tree_view_find_previous().

◆ ui_add_config_file_menu_item()

void ui_add_config_file_menu_item ( const gchar *  real_path,
const gchar *  label,
GtkContainer *  parent 
)

◆ ui_add_document_sensitive()

void ui_add_document_sensitive ( GtkWidget *  widget)

Adds a widget to the list of widgets that should be set sensitive/insensitive when some documents are present/no documents are open.

It will be removed when the widget is destroyed.

Parameters
widgetThe widget to add.
Since
0.15

Definition at line 976 of file ui_utils.c.

References main_widgets, GeanyMainWidgets::notebook, NULL, on_doc_sensitive_widget_destroy(), ui_widget_set_sensitive(), and widgets.

Referenced by demo_init(), plugin_init(), and plugin_load().

◆ ui_add_recent_document()

◆ ui_add_recent_project_file()

void ui_add_recent_project_file ( const gchar *  utf8_filename)

Definition at line 1257 of file ui_utils.c.

References add_recent_file(), NULL, and recent_get_recent_projects().

Referenced by project_load_file(), and run_new_dialog().

◆ ui_auto_separator_add_ref()

void ui_auto_separator_add_ref ( GeanyAutoSeparator *  autosep,
GtkWidget *  item 
)

◆ ui_builder_get_object()

gpointer ui_builder_get_object ( const gchar *  name)

Definition at line 2773 of file ui_utils.c.

References builder, and name.

Referenced by dialogs_show_file_properties(), and prefs_show_dialog().

◆ ui_button_new_with_image()

GtkWidget * ui_button_new_with_image ( const gchar *  stock_id,
const gchar *  text 
)

Creates a GtkButton with custom text and a stock image similar to gtk_button_new_from_stock().

Parameters
stock_idA GTK_STOCK_NAME string.
textButton label text, can include mnemonics.
Returns
(transfer: floating) The new GtkButton.

Definition at line 1552 of file ui_utils.c.

References text.

Referenced by create_find_dialog(), project_new(), run_unsaved_dialog(), and tb_editor_create_dialog().

◆ ui_combo_box_add_to_history()

void ui_combo_box_add_to_history ( GtkComboBoxText *  combo_entry,
const gchar *  text,
gint  history_len 
)

Prepends text to the drop down list, removing a duplicate element in the list if found.

Also ensures there are <= history_len elements.

Parameters
combo_entry.
text Text to add, or NULL for current entry text.
history_lenMax number of items, or 0 for default.

Definition at line 1697 of file ui_utils.c.

References text, and tree_model_find_text().

Referenced by on_filter_activate(), on_find_dialog_response(), on_find_in_files_dialog_response(), on_input_dialog_response(), on_replace_dialog_response(), refresh(), and search_show_find_in_files_dialog_full().

◆ ui_combo_box_prepend_text_once()

void ui_combo_box_prepend_text_once ( GtkComboBoxText *  combo,
const gchar *  text 
)

Definition at line 1730 of file ui_utils.c.

References text, and tree_model_find_text().

Referenced by search_show_find_in_files_dialog_full().

◆ ui_create_encodings_combo_box()

GtkWidget * ui_create_encodings_combo_box ( gboolean  has_detect,
gint  default_enc 
)

◆ ui_create_insert_date_menu_items()

◆ ui_create_insert_menu_items()

◆ ui_create_recent_menus()

void ui_create_recent_menus ( void  )

Definition at line 1168 of file ui_utils.c.

References recent_create_menu(), recent_get_recent_files(), and recent_get_recent_projects().

Referenced by main_lib().

◆ ui_dialog_set_primary_button_order()

void ui_dialog_set_primary_button_order ( GtkDialog *  dialog,
gint  response,
  ... 
)

Definition at line 1523 of file ui_utils.c.

References dialog, and position.

Referenced by tools_color_chooser().

◆ ui_dialog_vbox_new()

GtkWidget * ui_dialog_vbox_new ( GtkDialog *  dialog)

◆ ui_document_buttons_update()

void ui_document_buttons_update ( void  )

◆ ui_document_show_hide()

◆ ui_editable_insert_text_callback()

void ui_editable_insert_text_callback ( GtkEditable *  editable,
gchar *  new_text,
gint  new_text_len,
gint *  position,
gpointer  data 
)

Definition at line 3036 of file ui_utils.c.

References NULL, and position.

Referenced by dialogs_show_input_goto_line(), and geany_entry_action_connect_proxy().

◆ ui_encodings_combo_box_get_active_encoding()

gint ui_encodings_combo_box_get_active_encoding ( GtkComboBox *  combo)

◆ ui_encodings_combo_box_set_active_encoding()

gboolean ui_encodings_combo_box_set_active_encoding ( GtkComboBox *  combo,
gint  enc 
)

◆ ui_entry_add_activate_backward_signal()

void ui_entry_add_activate_backward_signal ( GtkEntry *  entry)

Definition at line 1613 of file ui_utils.c.

References entry, and NULL.

Referenced by create_find_dialog(), and geany_entry_action_create_tool_item().

◆ ui_entry_add_clear_icon()

void ui_entry_add_clear_icon ( GtkEntry *  entry)

Adds a small clear icon to the right end of the passed entry.

A callback to clear the contents of the GtkEntry is automatically added.

Parameters
entryThe GtkEntry object to which the icon should be attached.
Since
0.16

Definition at line 1604 of file ui_utils.c.

References entry, entry_clear_icon_release_cb(), and NULL.

Referenced by create_custom_widget(), create_fif_dialog(), create_find_dialog(), create_properties_dialog(), create_replace_dialog(), dialogs_show_input_full(), dialogs_show_input_numeric(), geany_entry_action_create_tool_item(), make_filterbar(), pm_show_dialog(), prefs_show_dialog(), and project_new().

◆ ui_finalize_builder()

void ui_finalize_builder ( void  )

Definition at line 2632 of file ui_utils.c.

References builder, edit_menu1, prefs_dialog, project_dialog, toolbar_popup_menu1, and window1.

Referenced by do_main_quit().

◆ ui_focus_current_document()

void ui_focus_current_document ( void  )

◆ ui_frame_new_with_alignment()

GtkWidget * ui_frame_new_with_alignment ( const gchar *  label_text,
GtkWidget **  alignment 
)

Creates a GNOME HIG-style frame (with no border and indented child alignment).

Parameters
label_textThe label text.
alignmentAn address to store the alignment widget pointer.
Returns
(transfer: floating) The frame widget, setting the alignment container for packing child widgets.
Deprecated:
1.29: Use GTK API directly

Definition at line 1475 of file ui_utils.c.

References gtk_container_add(), label, NULL, and ui_label_new_bold().

◆ ui_get_gtk_settings_integer()

gint ui_get_gtk_settings_integer ( const gchar *  property_name,
gint  default_value 
)

Reads an integer from the GTK default settings registry (see http://library.gnome.org/devel/gtk/stable/GtkSettings.html).

Parameters
property_nameThe property to read.
default_valueThe default value in case the value could not be read.
Returns
The value for the property if it exists, otherwise the default_value.
Since
0.19

Definition at line 3022 of file ui_utils.c.

References NULL.

Referenced by toolbar_notify_style_cb(), toolbar_set_icon_size(), and toolbar_set_icon_style().

◆ ui_get_mime_icon()

GIcon * ui_get_mime_icon ( const gchar *  mime_type)

Definition at line 3058 of file ui_utils.c.

References icon_name, NULL, and strstr().

Referenced by filetypes_load_config(), get_doc_parent(), and sidebar_openfiles_add().

◆ ui_get_top_parent()

static GtkWidget * ui_get_top_parent ( GtkWidget *  widget)
static

Definition at line 2410 of file ui_utils.c.

References NULL.

Referenced by ui_init_builder().

◆ ui_guess_object_name()

static const gchar * ui_guess_object_name ( GObject *  obj)
static

Definition at line 2362 of file ui_utils.c.

References name, and NULL.

Referenced by ui_init_builder().

◆ ui_hbutton_box_copy_layout()

void ui_hbutton_box_copy_layout ( GtkButtonBox *  master,
GtkButtonBox *  copy 
)

Definition at line 1651 of file ui_utils.c.

References add_to_size_group().

Referenced by create_find_dialog(), and create_replace_dialog().

◆ ui_image_menu_item_new()

GtkWidget * ui_image_menu_item_new ( const gchar *  stock_id,
const gchar *  label 
)

Creates a GtkImageMenuItem with a stock image and a custom label.

Parameters
stock_idStock image ID, e.g. GTK_STOCK_OPEN.
labelMenu item label, can include mnemonics.
Returns
(transfer: floating) The new GtkImageMenuItem.
Since
0.16

Definition at line 1574 of file ui_utils.c.

References label.

Referenced by build_init(), create_openfiles_popup_menu(), create_popup_menu(), create_taglist_popup_menu(), kb_show_popup_menu(), and show_tab_bar_popup_menu().

◆ ui_init()

◆ ui_init_builder()

◆ ui_init_prefs()

◆ ui_init_stock_items()

void ui_init_stock_items ( void  )

◆ ui_init_toolbar_widgets()

void ui_init_toolbar_widgets ( void  )

Definition at line 2232 of file ui_utils.c.

References toolbar_get_widget_by_name(), and widgets.

Referenced by toolbar_reload(), and ui_init().

◆ ui_is_keyval_enter_or_return()

gboolean ui_is_keyval_enter_or_return ( guint  keyval)

Checks whether the passed keyval is the Enter or Return key.

There are three different Enter/Return key values (GDK_KEY_Return, GDK_KEY_ISO_Enter, GDK_KEY_KP_Enter). This is just a convenience function.

Parameters
keyvalA keyval.
Returns
TRUE if keyval is the one of the Enter/Return key values, otherwise FALSE.
Since
0.19

Definition at line 3009 of file ui_utils.c.

Referenced by on_key_press(), on_msgwin_key_press_event(), and sidebar_key_press_cb().

◆ ui_label_new_bold()

GtkWidget * ui_label_new_bold ( const gchar *  text)

Definition at line 2909 of file ui_utils.c.

References label, NULL, text, and ui_label_set_markup().

Referenced by build_commands_table(), and ui_frame_new_with_alignment().

◆ ui_label_set_markup()

void ui_label_set_markup ( GtkLabel *  label,
const gchar *  format,
  ... 
)

Definition at line 2894 of file ui_utils.c.

References format, label, and text.

Referenced by build_commands_table(), ui_label_new_bold(), and ui_menu_add_document_items_sorted().

◆ ui_lookup_stock_label()

const gchar * ui_lookup_stock_label ( const gchar *  stock_id)

Finds the label text associated with stock_id.

Parameters
stock_idstock_id to lookup e.g. GTK_STOCK_OPEN.
Returns
The label text for stock
Since
Geany 1.22

Definition at line 3114 of file ui_utils.c.

References NULL.

Referenced by init_default_kb(), and ui_tool_button_new().

◆ ui_lookup_widget()

GtkWidget * ui_lookup_widget ( GtkWidget *  widget,
const gchar *  widget_name 
)

Returns a widget from a name in a component, usually created by Glade.

Call it with the toplevel widget in the component (i.e. a window/dialog), or alternatively any widget in the component, and the name of the widget you want returned.

Parameters
widgetWidget with the widget_name property set.
widget_nameName to lookup.
Returns
(transfer: none) The widget found.
See also
ui_hookup_widget().
Since
0.16

Definition at line 2743 of file ui_utils.c.

References NULL.

Referenced by add_kb(), apply_settings(), build_keybinding(), cb_func_editor_action(), cb_func_insert_action(), cb_func_menu_fullscreen(), cb_func_menu_messagewindow(), configuration_apply_settings(), create_build_menu(), create_config_files_menu(), create_file_template_menu(), create_properties_dialog(), create_set_filetype_menu(), dialogs_show_file_properties(), document_set_encoding(), encodings_init(), init_recent_files(), kb_init_tree(), key_dialog_show_prefs(), main_init(), msgwin_init(), msgwin_show_hide(), on_edit1_select(), on_editor_menu_hide(), on_editor_menu_show(), on_enable_plugins_toggled(), on_file_open_show_hidden_notify(), on_file_save_dialog_response(), on_find_replace_checkbutton_toggled(), on_hide_toolbar1_activate(), on_load_settings(), on_menu_project1_activate(), on_menu_toggle_all_additional_widgets1_activate(), on_open_encoding_toggled(), on_prefs_dialog_response(), on_prefs_print_page_header_toggled(), on_prefs_print_radio_button_toggled(), on_search1_activate(), on_show_notebook_tabs_toggled(), on_show_symbol_list_toggled(), on_sidebar_visible_toggled(), on_toolbar_show_toggled(), on_use_folding_toggled(), on_window_state_event(), open_file_dialog_apply_settings(), open_file_dialog_handle_response(), open_preferences_help(), prefs_init_dialog(), prefs_show_dialog(), prepare_openfiles(), project_apply_prefs(), project_setup_prefs(), save_ui_prefs(), show_notebook_page(), show_project_properties(), toolbar_reload(), toolbar_show_hide(), toolbar_update_ui(), tools_create_insert_custom_command_menu_items(), ui_create_insert_date_menu_items(), ui_create_insert_menu_items(), ui_document_show_hide(), ui_init(), ui_sidebar_show_hide(), ui_swap_sidebar_pos(), ui_update_fold_items(), ui_update_view_editor_menu_items(), and update_config().

◆ ui_menu_add_document_items()

void ui_menu_add_document_items ( GtkMenu *  menu,
GeanyDocument active,
GCallback  callback 
)

Adds a list of document items to menu.

Parameters
menuMenu.
active Which document to highlight, or NULL.
callbackis used for each menu item's "activate" signal and will be passed the corresponding document pointer as user_data.
Warning
You should check doc->is_valid in the callback.
Since
0.19

Definition at line 2929 of file ui_utils.c.

References NULL, and ui_menu_add_document_items_sorted().

Referenced by on_doc_show_menu(), and show_tab_bar_popup_menu().

◆ ui_menu_add_document_items_sorted()

void ui_menu_add_document_items_sorted ( GtkMenu *  menu,
GeanyDocument active,
GCallback  callback,
GCompareFunc  compare_func 
)

Adds a list of document items to menu.

compare_func might be NULL to not sort the documents in the menu. In this case, the order of the document tabs is used.

See document_compare_by_display_name() for an example sort function.

Parameters
menuMenu.
active Which document to highlight, or NULL.
callbackis used for each menu item's "activate" signal and will be passed the corresponding document pointer as user_data.
compare_funcis used to sort the list. Might be NULL to not sort the list.
Warning
You should check doc->is_valid in the callback.
Since
0.21

Definition at line 2952 of file ui_utils.c.

References DOC_FILENAME, document_compare_by_tab_order(), document_get_status_widget_class(), documents, GeanyDocument::file_type, foreach_document, gtk_container_add(), GeanyFiletype::icon, main_widgets, GeanyMainWidgets::notebook, NULL, and ui_label_set_markup().

Referenced by ui_menu_add_document_items().

◆ ui_menu_copy_items_set_sensitive()

void ui_menu_copy_items_set_sensitive ( gboolean  sensitive)

Definition at line 513 of file ui_utils.c.

References ui_widget_set_sensitive(), and widgets.

Referenced by on_edit1_deselect(), and ui_update_menu_copy_items().

◆ ui_menu_item_get_text()

gchar * ui_menu_item_get_text ( GtkMenuItem *  menu_item)

◆ ui_menu_move()

static void ui_menu_move ( GtkWidget *  menu,
GtkWidget *  old,
GtkWidget *  new 
)
static

Definition at line 2280 of file ui_utils.c.

References NULL.

Referenced by on_editor_menu_hide(), and on_editor_menu_show().

◆ ui_menu_sort_by_label()

static void ui_menu_sort_by_label ( GtkMenu *  menu)
static

Definition at line 2877 of file ui_utils.c.

References compare_menu_item_labels(), foreach_list, list, menu_reorder_child(), and pos.

Referenced by sort_menu().

◆ ui_path_box_new()

GtkWidget * ui_path_box_new ( const gchar *  title,
GtkFileChooserAction  action,
GtkEntry *  entry 
)

Creates a GtkHBox with entry packed into it and an open button which runs a file chooser, replacing entry text (if successful) with the path returned from the GtkFileChooser.

Note
entry can be the child of an unparented widget, such as GtkComboBoxEntry.
Parameters
title The file chooser dialog title, or NULL.
actionThe mode of the file chooser.
entryCan be an unpacked GtkEntry, or the child of an unpacked widget, such as GtkComboBoxEntry.
Returns
(transfer: floating) The GtkHBox.

Definition at line 1917 of file ui_utils.c.

References entry, gtk_container_add(), NULL, path_entry, and ui_setup_open_button_callback().

Referenced by create_fif_dialog(), and project_new().

◆ ui_path_box_open_clicked()

static void ui_path_box_open_clicked ( GtkButton *  button,
gpointer  user_data 
)
static

Definition at line 2002 of file ui_utils.c.

References _, entry, NULL, run_file_chooser(), and ui_widgets.

Referenced by ui_setup_open_button_callback().

◆ ui_progress_bar_start()

void ui_progress_bar_start ( const gchar *  text)

Starts a constantly pulsing progressbar in the right corner of the statusbar (if the statusbar is visible).

This is a convenience function which adds a timer to pulse the progressbar constantly until ui_progress_bar_stop() is called. You can use this function when you have time consuming asynchronous operation and want to display some activity in the GUI and when you don't know about detailed progress steps. The progressbar widget is hidden by default when it is not active. This function and ui_progress_bar_stop() will show and hide it automatically for you.

You can also access the progressbar widget directly using geany->main_widgets->progressbar and use the GtkProgressBar API to set discrete fractions to display better progress information. In this case, you need to show and hide the widget yourself. You can find some example code in src/printing.c.

Parameters
text The text to be shown as the progress bar label or NULL to leave it empty.
Since
0.16

Definition at line 2822 of file ui_utils.c.

References interface_prefs, main_widgets, NULL, progress_bar_pulse(), progress_bar_timer_id, GeanyMainWidgets::progressbar, GeanyInterfacePrefs::statusbar_visible, and text.

Referenced by build_command(), and search_find_in_files().

◆ ui_progress_bar_stop()

void ui_progress_bar_stop ( void  )

Stops a running progress bar and hides the widget again.

Since
0.16

Definition at line 2842 of file ui_utils.c.

References main_widgets, progress_bar_timer_id, and GeanyMainWidgets::progressbar.

Referenced by build_exit_cb(), and search_finished().

◆ ui_save_buttons_toggle()

◆ ui_set_editor_font()

void ui_set_editor_font ( const gchar *  font_name)

◆ ui_set_fullscreen()

void ui_set_fullscreen ( void  )

Definition at line 440 of file ui_utils.c.

References main_widgets, ui_prefs, and GeanyMainWidgets::window.

Referenced by configuration_apply_settings(), and on_fullscreen1_toggled().

◆ ui_set_search_entry_background()

void ui_set_search_entry_background ( GtkWidget *  widget,
gboolean  success 
)

◆ ui_set_statusbar()

void ui_set_statusbar ( gboolean  log,
const gchar *  format,
  ... 
)

Displays text on the statusbar.

Parameters
logWhether the message should be recorded in the Status window.
formatA printf -style string.

Definition at line 168 of file ui_utils.c.

References format, msgwin_status_add(), prefs, set_statusbar(), and GeanyPrefs::suppress_status_messages.

Referenced by auto_save(), backupcopy_create_dir_parts(), backupcopy_document_save_cb(), build_replace_placeholder(), build_run_cmd(), build_spawn_cmd(), check_single_selection(), compile_regex(), configuration_open_files(), document_apply_indent_settings(), document_find_text(), document_open_file_full(), document_save_file(), document_search_bar_find(), editor_set_indent(), get_mtime(), goto_compiler_file_line(), insert_date(), insert_multiline_comment(), instantsave_document_new_cb(), kill_process(), load_text_file(), main_lib(), main_reload_configuration(), msgwin_goto_messages_file_line(), on_build_next_error(), on_build_previous_error(), on_color_scheme_changed(), on_comments_function_activate(), on_context_action1_activate(), on_editor_notify(), on_find_dialog_response(), on_find_in_files_dialog_response(), on_menu_open_selected_file1_activate(), on_new_with_file_template(), on_next_message1_activate(), on_previous_message1_activate(), on_save_all1_activate(), open_cl_files(), open_external(), prepare_run_cmd(), project_close(), project_load_file(), read_file(), replace_in_session(), run_new_dialog(), search_find_in_files(), search_find_usage(), search_finished(), search_get_argv(), show_build_result_message(), show_project_properties(), show_replace_summary(), symbols_goto_tag(), symbols_show_load_tags_dialog(), tools_execute_custom_command(), ui_set_editor_font(), and write_data().

◆ ui_set_window_title()

◆ ui_setup_open_button_callback()

void ui_setup_open_button_callback ( GtkWidget *  open_btn,
const gchar *  title,
GtkFileChooserAction  action,
GtkEntry *  entry 
)

Definition at line 1950 of file ui_utils.c.

References entry, path_entry, and ui_path_box_open_clicked().

Referenced by prefs_show_dialog(), project_setup_prefs(), and ui_path_box_new().

◆ ui_sidebar_show_hide()

◆ ui_statusbar_showhide()

void ui_statusbar_showhide ( gboolean  state)

◆ ui_swap_sidebar_pos()

void ui_swap_sidebar_pos ( void  )

◆ ui_table_add_row()

void ui_table_add_row ( GtkTable *  table,
gint  row,
  ... 
)

Packs all GtkWidgets passed after the row argument into a table, using one widget per cell.

The first widget is not expanded as the table grows, as this is usually a label.

Parameters
table
rowThe row number of the table.

Definition at line 2066 of file ui_utils.c.

References NULL.

Referenced by project_new().

◆ ui_toggle_editor_features()

◆ ui_tree_model_iter_any_next()

gboolean ui_tree_model_iter_any_next ( GtkTreeModel *  model,
GtkTreeIter *  iter,
gboolean  down 
)

◆ ui_tree_view_find_next()

gboolean ui_tree_view_find_next ( GtkTreeView *  treeview,
TVMatchCallback  cb 
)

Definition at line 1812 of file ui_utils.c.

References tree_view_find().

Referenced by on_build_next_error(), and on_next_message1_activate().

◆ ui_tree_view_find_previous()

gboolean ui_tree_view_find_previous ( GtkTreeView *  treeview,
TVMatchCallback  cb 
)

Definition at line 1819 of file ui_utils.c.

References tree_view_find().

Referenced by on_build_previous_error(), and on_previous_message1_activate().

◆ ui_tree_view_query_tooltip_cb()

static gboolean ui_tree_view_query_tooltip_cb ( GtkWidget *  widget,
gint  x,
gint  y,
gboolean  keyboard_tip,
GtkTooltip *  tooltip,
gpointer  data 
)
static

Definition at line 1826 of file ui_utils.c.

Referenced by ui_tree_view_set_tooltip_text_column().

◆ ui_tree_view_set_tooltip_text_column()

void ui_tree_view_set_tooltip_text_column ( GtkTreeView *  tree_view,
gint  column 
)

Adds text tooltips to a tree view.

This is similar to gtk_tree_view_set_tooltip_column() but considers the column contents to be text, not markup – it uses gtk_tooltip_set_text() rather than gtk_tooltip_set_markup() to set the tooltip's value.

Warning
Unlike gtk_tree_view_set_tooltip_column() you currently cannot change or remove the tooltip column after it has been added. Trying to do so will probably give funky results.
Parameters
tree_viewThe tree view
columnThe column to get the tooltip from
Since
1.25 (API 223)

Definition at line 1876 of file ui_utils.c.

References ui_tree_view_query_tooltip_cb().

Referenced by cc_show_dialog_custom_commands(), prepare_file_view(), prepare_openfiles(), and prepare_taglist().

◆ ui_update_fold_items()

void ui_update_fold_items ( void  )

◆ ui_update_insert_include_item()

void ui_update_insert_include_item ( GeanyDocument doc,
gint  item 
)

◆ ui_update_menu_copy_items()

◆ ui_update_popup_copy_items()

◆ ui_update_popup_goto_items()

void ui_update_popup_goto_items ( gboolean  enable)

Definition at line 504 of file ui_utils.c.

References ui_widget_set_sensitive(), and widgets.

Referenced by on_editor_button_press_event().

◆ ui_update_popup_reundo_items()

◆ ui_update_recent_project_menu()

void ui_update_recent_project_menu ( void  )

◆ ui_update_statusbar()

◆ ui_update_tab_status()

◆ ui_update_view_editor_menu_items()

◆ ui_widget_modify_font_from_string()

void ui_widget_modify_font_from_string ( GtkWidget *  widget,
const gchar *  str 
)

Modifies the font of a widget using gtk_widget_modify_font().

Parameters
widgetThe widget.
strThe font name as expected by pango_font_description_from_string().

Definition at line 1894 of file ui_utils.c.

Referenced by msgwin_init(), on_prefs_font_choosed(), prepare_compiler_tree_view(), prepare_file_view(), prepare_msg_tree_view(), prepare_openfiles(), prepare_status_tree_view(), and prepare_taglist().

◆ ui_widget_set_sensitive()

◆ ui_widget_set_tooltip_text()

void ui_widget_set_tooltip_text ( GtkWidget *  widget,
const gchar *  text 
)

Sets text as the contents of the tooltip for widget.

Parameters
widgetThe widget the tooltip should be set for.
textThe text for the tooltip.
Since
0.16
Deprecated:
0.21 use gtk_widget_set_tooltip_text() instead

Definition at line 2724 of file ui_utils.c.

References text.

◆ ui_widget_show_hide()

◆ update_recent_menu()

Variable Documentation

◆ builder

GtkBuilder* builder = NULL
static

◆ config_files_menu

GtkWidget* config_files_menu

Definition at line 96 of file ui_utils.c.

◆ document_buttons

GPtrArray* document_buttons

Definition at line 88 of file ui_utils.c.

◆ edit_menu1

GtkWidget* edit_menu1 = NULL
static

Definition at line 80 of file ui_utils.c.

Referenced by create_edit_menu1(), ui_finalize_builder(), and ui_init_builder().

◆ interface_prefs

◆ main_widgets

GeanyMainWidgets main_widgets

Definition at line 72 of file ui_utils.c.

Referenced by add_kb(), apply_settings(), begin_print(), build_keybinding(), cb_func_clipboard_action(), cb_func_editor_action(), cb_func_format_action(), cb_func_goto_action(), cb_func_insert_action(), cb_func_menu_fullscreen(), cb_func_menu_messagewindow(), cb_func_move_tab(), cb_func_select_action(), cc_show_dialog_custom_commands(), check_fixed_kb(), check_menu_key(), check_snippet_completion(), configuration_apply_settings(), configuration_open_files(), configuration_save_session_files(), configure_plugins(), create_build_menu(), create_config_dir(), create_config_files_menu(), create_dialog(), create_fif_dialog(), create_file_template_menu(), create_find_dialog(), create_open_file_dialog(), create_replace_dialog(), create_save_file_dialog(), create_set_filetype_menu(), create_switch_dialog(), dialogs_show_input_numeric(), dialogs_show_msgbox(), dialogs_show_msgbox_with_secondary(), dialogs_show_open_file(), dialogs_show_open_font(), dialogs_show_question(), dialogs_show_save_as(), do_main_quit(), document_account_for_unsaved(), document_create(), document_get_current(), document_get_from_page(), document_get_notebook_page(), document_new_file_if_non_open(), document_open_file_full(), document_set_encoding(), document_show_tab(), document_try_focus(), draw_page(), editor_snippets_free(), editor_snippets_init(), encodings_init(), end_print(), focus_sidebar(), geany_data_init(), has_tabs_on_right(), have_session_docs(), highlighting_show_color_scheme_dialog(), init_recent_files(), insert_date(), keybindings_init(), load_startup_files(), load_ui_prefs(), log_show_debug_messages_dialog(), main_init(), main_lib(), msgwin_init(), msgwin_show_hide(), notebook_init(), notebook_new_tab(), notebook_remove_page(), on_build_menu_item(), on_close_documents_right_activate(), on_copy1_activate(), on_cut1_activate(), on_delete1_activate(), on_document_close(), on_edit1_select(), on_editor_button_press_event(), on_editor_menu_hide(), on_editor_menu_show(), on_go_to_line_activate(), on_hide_toolbar1_activate(), on_list_document_activate(), on_list_symbol_activate(), on_load_settings(), on_menu_project1_activate(), on_menu_select_all1_activate(), on_menu_show_sidebar1_toggled(), on_menu_toggle_all_additional_widgets1_activate(), on_paste1_activate(), on_pref_btn_clicked(), on_prefs_dialog_response(), on_reload_all(), on_save_all1_activate(), on_save_settings(), on_search1_activate(), on_show_toolbar1_toggled(), paginate(), plugin_add_toolbar_item(), plugin_show_configure(), plugins_load_active(), pm_show_dialog(), prefs_show_dialog(), prepare_openfiles(), printing_page_setup_gtk(), printing_print_gtk(), progress_bar_pulse(), project_new(), project_open(), remove_page(), replace_in_session(), run_file_chooser(), run_unsaved_dialog(), save_ui_prefs(), setup_tab_dnd(), setup_window_position(), show_build_commands_dialog(), show_prompt(), sidebar_focus_openfiles_tab(), sidebar_focus_symbols_tab(), sidebar_init(), sidebar_update_tag_list(), switch_notebook_page(), symbols_show_load_tags_dialog(), tab_count_changed(), tb_editor_create_dialog(), toolbar_get_insert_position(), toolbar_notify_style_cb(), toolbar_reload(), toolbar_set_icon_size(), toolbar_set_icon_style(), toolbar_show_hide(), toolbar_update_ui(), tools_color_chooser(), tools_create_insert_custom_command_menu_items(), tools_word_count(), ui_add_document_sensitive(), ui_create_insert_date_menu_items(), ui_create_insert_menu_items(), ui_document_buttons_update(), ui_document_show_hide(), ui_init(), ui_menu_add_document_items_sorted(), ui_progress_bar_start(), ui_progress_bar_stop(), ui_save_buttons_toggle(), ui_set_fullscreen(), ui_set_window_title(), ui_sidebar_show_hide(), ui_swap_sidebar_pos(), ui_update_fold_items(), ui_update_menu_copy_items(), ui_update_view_editor_menu_items(), and utils_open_browser().

◆ menu_copy_items

GtkWidget* menu_copy_items[3]

Definition at line 92 of file ui_utils.c.

◆ menu_insert_include_items

GtkWidget* menu_insert_include_items[2]

Definition at line 89 of file ui_utils.c.

◆ popup_copy_items

GtkWidget* popup_copy_items[3]

Definition at line 91 of file ui_utils.c.

◆ popup_goto_items

GtkWidget* popup_goto_items[4]

Definition at line 90 of file ui_utils.c.

◆ prefs_dialog

GtkWidget* prefs_dialog = NULL
static

Definition at line 81 of file ui_utils.c.

Referenced by create_prefs_dialog(), ui_finalize_builder(), and ui_init_builder().

◆ progress_bar_timer_id

guint progress_bar_timer_id = 0
static

Definition at line 2780 of file ui_utils.c.

Referenced by ui_progress_bar_start(), and ui_progress_bar_stop().

◆ project_dialog

GtkWidget* project_dialog = NULL
static

Definition at line 82 of file ui_utils.c.

Referenced by create_project_dialog(), ui_finalize_builder(), and ui_init_builder().

◆ redo_items

GtkWidget* redo_items[3]

Definition at line 93 of file ui_utils.c.

◆ save_buttons

GtkWidget* save_buttons[4]

Definition at line 95 of file ui_utils.c.

◆ toolbar_popup_menu1

GtkWidget* toolbar_popup_menu1 = NULL
static

Definition at line 79 of file ui_utils.c.

Referenced by create_toolbar_popup_menu1(), ui_finalize_builder(), and ui_init_builder().

◆ ui_prefs

◆ ui_widgets

◆ undo_items

GtkWidget* undo_items[3]

Definition at line 94 of file ui_utils.c.

◆ 

◆ window1

GtkWidget* window1 = NULL
static

Definition at line 78 of file ui_utils.c.

Referenced by create_window1(), ui_finalize_builder(), and ui_init_builder().