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)  

tools.c File Reference
#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>
Include dependency graph for tools.c:

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)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CC_COLUMN_ID 
CC_COLUMN_STATUS 
CC_COLUMN_TOOLTIP 
CC_COLUMN_CMD 
CC_COLUMN_LABEL 
CC_COLUMN_COUNT 

Definition at line 48 of file tools.c.

Function Documentation

◆ cc_dialog_add_command()

static void cc_dialog_add_command ( struct cc_dialog cc,
gint  idx,
gboolean  start_editing 
)
static

◆ cc_dialog_on_command_edited()

static void cc_dialog_on_command_edited ( GtkCellRendererText *  renderer,
gchar *  path,
gchar *  text,
struct cc_dialog cc 
)
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().

◆ cc_dialog_on_label_edited()

static void cc_dialog_on_label_edited ( GtkCellRendererText *  renderer,
gchar *  path,
gchar *  text,
struct cc_dialog cc 
)
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().

◆ cc_dialog_on_row_deleted()

static void cc_dialog_on_row_deleted ( GtkTreeModel *  model,
GtkTreePath *  path,
struct cc_dialog cc 
)
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().

◆ cc_dialog_on_row_inserted()

static void cc_dialog_on_row_inserted ( GtkTreeModel *  model,
GtkTreePath *  path,
GtkTreeIter *  iter,
struct cc_dialog cc 
)
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().

◆ cc_dialog_on_rows_reordered()

static void cc_dialog_on_rows_reordered ( GtkTreeModel *  model,
GtkTreePath *  path,
GtkTreeIter *  iter,
gpointer  new_order,
struct cc_dialog cc 
)
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().

◆ cc_dialog_on_tree_selection_changed()

static void cc_dialog_on_tree_selection_changed ( GtkTreeSelection *  selection,
struct cc_dialog cc 
)
static

Definition at line 318 of file tools.c.

References cc_dialog_update_sensitive().

Referenced by cc_show_dialog_custom_commands().

◆ cc_dialog_update_ids()

static void cc_dialog_update_ids ( struct cc_dialog cc)
static

◆ cc_dialog_update_row_status()

static void cc_dialog_update_row_status ( GtkListStore *  store,
GtkTreeIter *  iter,
const gchar *  cmd 
)
static

◆ cc_dialog_update_sensitive()

◆ cc_insert_custom_command_items()

◆ cc_on_custom_command_activate()

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

◆ cc_on_dialog_add_clicked()

static void cc_on_dialog_add_clicked ( GtkButton *  button,
struct cc_dialog cc 
)
static

Definition at line 124 of file tools.c.

References cc_dialog_add_command().

Referenced by cc_show_dialog_custom_commands().

◆ cc_on_dialog_move_down_clicked()

static void cc_on_dialog_move_down_clicked ( GtkButton *  button,
struct cc_dialog cc 
)
static

◆ cc_on_dialog_move_up_clicked()

static void cc_on_dialog_move_up_clicked ( GtkButton *  button,
struct cc_dialog cc 
)
static

◆ cc_on_dialog_remove_clicked()

static void cc_on_dialog_remove_clicked ( GtkButton *  button,
struct cc_dialog cc 
)
static

◆ cc_show_dialog_custom_commands()

◆ on_color_dialog_response()

static void on_color_dialog_response ( GtkDialog *  dialog,
gint  response,
gpointer  user_data 
)
static

◆ on_color_selection_change_palette_with_screen()

static void on_color_selection_change_palette_with_screen ( GdkScreen *  screen,
const GdkColor *  colors,
gint  n_colors 
)
static

Definition at line 814 of file tools.c.

References NULL, settings, and ui_prefs.

Referenced by tools_color_chooser().

◆ scroll_to_cursor()

static void scroll_to_cursor ( GtkTreeView *  view)
static

◆ tools_color_chooser()

◆ tools_create_insert_custom_command_menu_items()

void tools_create_insert_custom_command_menu_items ( void  )

◆ tools_execute_custom_command()

void tools_execute_custom_command ( GeanyDocument doc,
const gchar *  command 
)

◆ tools_word_count()

◆ word_count()

static void word_count ( gchar *  text,
guint *  chars,
guint *  lines,
guint *  words 
)
static

Definition at line 632 of file tools.c.

References chars, lines, and text.

Referenced by tools_word_count().