~ghugesss/xpad/debug_support

« back to all changes in this revision

Viewing changes to src/xpad-grip-tool-item.c

  • Committer: Arthur Borsboom
  • Date: 2014-06-19 13:15:30 UTC
  • mfrom: (665.1.59 xpad-4.3)
  • Revision ID: arthurborsboom@gmail.com-20140619131530-ecsvweog8592zqie
Fix: prevented color updating conflict between preferences and pad colors
Fix: Technical - reduced code by removing double code
Fix: Technical - ensured that all the menus of each pad are updated when changing options in the View menu
Fix: renamed Xpad_periodic functions to lowercase in line with other function namings
Fix: repaired showing all the notes in the menu: pad->menu->notes
Fix: Technical - removed unnecessary initialization and unnecessary function
Fix: Resolved a disposing error of the clipboard contents after erasing a pad
Fix: Pad properties - switched foreground and background order in GUI.
Fix: Technical - got rid of the global variable: xpad_global_settings
New: added shortcuts keys for New pad (CTRL-N) and Delete (SHIFT-DEL)
Fix: Technical - changed comment style
Fix: replaced get user home dir with specific glib function
Fix: Default values are set correctly on first startup (no configuration file) by reintroducing a double default value administration.
Fix: Improved performance by reducing the amount of GTK_ casts, as suggested in the GTK best practices
Fix: Applied GTK best practices for inclusion of 1st config.h and 2nd its header file in each c-file

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
*/
21
21
 
 
22
#include "../config.h"
22
23
#include "xpad-grip-tool-item.h"
23
24
 
24
25
struct XpadGripToolItemPrivate
28
29
 
29
30
G_DEFINE_TYPE_WITH_PRIVATE(XpadGripToolItem, xpad_grip_tool_item, GTK_TYPE_TOOL_ITEM)
30
31
 
31
 
static void xpad_grip_tool_item_dispose (GObject *object);
32
 
static void xpad_grip_tool_item_finalize (GObject *object);
33
 
 
34
32
static gboolean xpad_grip_tool_item_event_box_draw (GtkWidget *widget, cairo_t *cr);
35
33
static void xpad_grip_tool_item_event_box_realize (GtkWidget *widget);
36
34
static gboolean xpad_grip_tool_item_button_pressed_event (GtkWidget *widget, GdkEventButton *event);
44
42
static void
45
43
xpad_grip_tool_item_class_init (XpadGripToolItemClass *klass)
46
44
{
47
 
        GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
48
 
        
49
 
        gobject_class->dispose = xpad_grip_tool_item_dispose;
50
 
        gobject_class->finalize = xpad_grip_tool_item_finalize;
51
45
}
52
46
 
53
47
static void
72
66
        gtk_container_add (GTK_CONTAINER (grip), alignment);
73
67
}
74
68
 
75
 
static void
76
 
xpad_grip_tool_item_dispose (GObject *object)
77
 
{
78
 
        G_OBJECT_CLASS (xpad_grip_tool_item_parent_class)->dispose (object);
79
 
}
80
 
 
81
 
static void
82
 
xpad_grip_tool_item_finalize (GObject *object)
83
 
{
84
 
        G_OBJECT_CLASS (xpad_grip_tool_item_parent_class)->finalize (object);
85
 
}
86
 
 
87
 
 
88
69
static gboolean
89
70
xpad_grip_tool_item_button_pressed_event (GtkWidget *widget, GdkEventButton *event)
90
71
{