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
![]() ![]() |
#include "tools.h"
#include "document.h"
#include "keybindings.h"
#include "sciwrappers.h"
#include "spawn.h"
#include "support.h"
#include "ui_utils.h"
#include "utils.h"
#include "win32.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <gtk/gtk.h>
Go to the source code of this file.
Classes | |
struct | cc_dialog |
Enumerations | |
enum | { CC_COLUMN_ID , CC_COLUMN_STATUS , CC_COLUMN_TOOLTIP , CC_COLUMN_CMD , CC_COLUMN_LABEL , CC_COLUMN_COUNT } |
Functions | |
static void | cc_dialog_update_row_status (GtkListStore *store, GtkTreeIter *iter, const gchar *cmd) |
static void | cc_dialog_add_command (struct cc_dialog *cc, gint idx, gboolean start_editing) |
static void | cc_on_dialog_add_clicked (GtkButton *button, struct cc_dialog *cc) |
static void | scroll_to_cursor (GtkTreeView *view) |
static void | cc_on_dialog_remove_clicked (GtkButton *button, struct cc_dialog *cc) |
static void | cc_on_dialog_move_up_clicked (GtkButton *button, struct cc_dialog *cc) |
static void | cc_on_dialog_move_down_clicked (GtkButton *button, struct cc_dialog *cc) |
void | tools_execute_custom_command (GeanyDocument *doc, const gchar *command) |
static void | cc_dialog_on_command_edited (GtkCellRendererText *renderer, gchar *path, gchar *text, struct cc_dialog *cc) |
static void | cc_dialog_on_label_edited (GtkCellRendererText *renderer, gchar *path, gchar *text, struct cc_dialog *cc) |
static void | cc_dialog_update_ids (struct cc_dialog *cc) |
static void | cc_dialog_update_sensitive (struct cc_dialog *cc) |
static void | cc_dialog_on_tree_selection_changed (GtkTreeSelection *selection, struct cc_dialog *cc) |
static void | cc_dialog_on_row_inserted (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct cc_dialog *cc) |
static void | cc_dialog_on_row_deleted (GtkTreeModel *model, GtkTreePath *path, struct cc_dialog *cc) |
static void | cc_dialog_on_rows_reordered (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer new_order, struct cc_dialog *cc) |
static void | cc_show_dialog_custom_commands (void) |
static void | cc_on_custom_command_activate (GtkMenuItem *menuitem, gpointer user_data) |
static void | cc_insert_custom_command_items (GtkMenu *me, const gchar *label, const gchar *tooltip, gint idx) |
void | tools_create_insert_custom_command_menu_items (void) |
static void | word_count (gchar *text, guint *chars, guint *lines, guint *words) |
void | tools_word_count (void) |
static void | on_color_dialog_response (GtkDialog *dialog, gint response, gpointer user_data) |
static void | on_color_selection_change_palette_with_screen (GdkScreen *screen, const GdkColor *colors, gint n_colors) |
void | tools_color_chooser (const gchar *color) |
anonymous enum |
|
static |
Definition at line 94 of file tools.c.
References CC_COLUMN_CMD, CC_COLUMN_ID, CC_COLUMN_LABEL, cc_dialog_update_row_status(), cc_dialog::count, cc_dialog::edit_column, label, NULL, cc_dialog::store, ui_prefs, and cc_dialog::view.
Referenced by cc_on_dialog_add_clicked(), and cc_show_dialog_custom_commands().
|
static |
Definition at line 251 of file tools.c.
References CC_COLUMN_CMD, cc_dialog_update_row_status(), cc_dialog::store, and text.
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 262 of file tools.c.
References CC_COLUMN_LABEL, cc_dialog::store, and text.
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 332 of file tools.c.
References cc_dialog_update_ids(), and cc_dialog_update_sensitive().
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 324 of file tools.c.
References cc_dialog_update_ids(), and cc_dialog_update_sensitive().
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 339 of file tools.c.
References cc_dialog_update_ids(), and cc_dialog_update_sensitive().
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 318 of file tools.c.
References cc_dialog_update_sensitive().
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 273 of file tools.c.
References CC_COLUMN_ID, cc_dialog::count, and cc_dialog::store.
Referenced by cc_dialog_on_row_deleted(), cc_dialog_on_row_inserted(), and cc_dialog_on_rows_reordered().
|
static |
Definition at line 74 of file tools.c.
References _, CC_COLUMN_STATUS, CC_COLUMN_TOOLTIP, EMPTY, NULL, and spawn_check_command().
Referenced by cc_dialog_add_command(), and cc_dialog_on_command_edited().
|
static |
Definition at line 291 of file tools.c.
References cc_dialog::button_down, cc_dialog::button_remove, cc_dialog::button_up, NULL, cc_dialog::selection, and cc_dialog::store.
Referenced by cc_dialog_on_row_deleted(), cc_dialog_on_row_inserted(), cc_dialog_on_rows_reordered(), cc_dialog_on_tree_selection_changed(), and cc_show_dialog_custom_commands().
|
static |
Definition at line 544 of file tools.c.
References cc_on_custom_command_activate(), GEANY_KEY_GROUP_FORMAT, GEANY_KEYS_FORMAT_SENDTOCMD1, GEANY_KEYS_FORMAT_SENDTOCMD2, GEANY_KEYS_FORMAT_SENDTOCMD3, GEANY_KEYS_FORMAT_SENDTOCMD4, GEANY_KEYS_FORMAT_SENDTOCMD5, GEANY_KEYS_FORMAT_SENDTOCMD6, GEANY_KEYS_FORMAT_SENDTOCMD7, GEANY_KEYS_FORMAT_SENDTOCMD8, GEANY_KEYS_FORMAT_SENDTOCMD9, gtk_container_add(), GeanyKeyBinding::key, keybindings_lookup_item(), label, and GeanyKeyBinding::mods.
Referenced by tools_create_insert_custom_command_menu_items().
|
static |
Definition at line 522 of file tools.c.
References cc_show_dialog_custom_commands(), DOC_VALID, document_get_current(), NULL, tools_execute_custom_command(), and ui_prefs.
Referenced by cc_insert_custom_command_items().
|
static |
Definition at line 124 of file tools.c.
References cc_dialog_add_command().
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 176 of file tools.c.
References NULL, scroll_to_cursor(), cc_dialog::selection, cc_dialog::store, and cc_dialog::view.
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 155 of file tools.c.
References NULL, scroll_to_cursor(), cc_dialog::selection, cc_dialog::store, and cc_dialog::view.
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 143 of file tools.c.
References NULL, scroll_to_cursor(), cc_dialog::selection, cc_dialog::store, and cc_dialog::view.
Referenced by cc_show_dialog_custom_commands().
|
static |
Definition at line 347 of file tools.c.
References _, cc_dialog::button_add, cc_dialog::button_down, cc_dialog::button_remove, cc_dialog::button_up, CC_COLUMN_CMD, CC_COLUMN_COUNT, CC_COLUMN_ID, CC_COLUMN_LABEL, CC_COLUMN_STATUS, CC_COLUMN_TOOLTIP, cc_dialog_add_command(), cc_dialog_on_command_edited(), cc_dialog_on_label_edited(), cc_dialog_on_row_deleted(), cc_dialog_on_row_inserted(), cc_dialog_on_rows_reordered(), cc_dialog_on_tree_selection_changed(), cc_dialog_update_sensitive(), cc_on_dialog_add_clicked(), cc_on_dialog_move_down_clicked(), cc_on_dialog_move_up_clicked(), cc_on_dialog_remove_clicked(), cc_dialog::count, dialog, cc_dialog::edit_column, EMPTY, gtk_container_add(), gtk_widget_show_all(), label, main_widgets, NULL, cc_dialog::selection, cc_dialog::store, tools_create_insert_custom_command_menu_items(), ui_dialog_vbox_new(), ui_prefs, ui_tree_view_set_tooltip_text_column(), cc_dialog::view, and GeanyMainWidgets::window.
Referenced by cc_on_custom_command_activate().
|
static |
Definition at line 783 of file tools.c.
References color, document_get_current(), GeanyDocument::editor, editor_insert_color(), NULL, ui_widgets, and utils_get_hex_from_color().
Referenced by tools_color_chooser().
|
static |
|
static |
Definition at line 130 of file tools.c.
Referenced by cc_on_dialog_move_down_clicked(), cc_on_dialog_move_up_clicked(), and cc_on_dialog_remove_clicked().
void tools_color_chooser | ( | const gchar * | color | ) |
Definition at line 829 of file tools.c.
References _, color, interface_prefs, main_widgets, NULL, on_color_dialog_response(), on_color_selection_change_palette_with_screen(), ui_dialog_set_primary_button_order(), ui_widgets, GeanyInterfacePrefs::use_native_windows_dialogs, utils_parse_color(), and GeanyMainWidgets::window.
Referenced by on_show_color_chooser1_activate().
void tools_create_insert_custom_command_menu_items | ( | void | ) |
Definition at line 581 of file tools.c.
References _, cc_insert_custom_command_items(), EMPTY, foreach_list, gtk_container_add(), label, main_widgets, NULL, ui_lookup_widget(), ui_prefs, and GeanyMainWidgets::window.
Referenced by cc_show_dialog_custom_commands(), main_lib(), and on_prefs_dialog_response().
void tools_execute_custom_command | ( | GeanyDocument * | doc, |
const gchar * | command | ||
) |
< non-zero if the child exited normally
< exit status of a child if exited normally
Definition at line 196 of file tools.c.
References _, command, GeanyDocument::editor, editor_select_lines(), error(), NULL, _SpawnWriteData::ptr, GeanyEditor::sci, sci_get_selection_contents(), sci_has_selection(), sci_replace_sel(), _SpawnWriteData::size, spawn_sync(), SPAWN_WEXITSTATUS, SPAWN_WIFEXITED, and ui_set_statusbar().
Referenced by cb_func_format_action(), and cc_on_custom_command_activate().
void tools_word_count | ( | void | ) |
Definition at line 683 of file tools.c.
References _, chars, dialog, document_get_current(), GeanyDocument::editor, gtk_container_add(), gtk_widget_show_all(), label, lines, main_widgets, NULL, GeanyEditor::sci, sci_get_contents(), sci_get_selection_contents(), sci_has_selection(), text, ui_dialog_vbox_new(), GeanyMainWidgets::window, and word_count().
Referenced by on_count_words1_activate().