~riaguzov/xpad/add_search

« back to all changes in this revision

Viewing changes to src/xpad-toolbar.c

  • Committer: Siergiej Riaguzow
  • Date: 2019-01-28 22:37:44 UTC
  • Revision ID: siergiej.riaguzow@gmail.com-20190128223744-v5g4flcd1574vat9
Add search via toolbar/context menu/Ctrl-F shortcut

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        ACTIVATE_CUT,
65
65
        ACTIVATE_COPY,
66
66
        ACTIVATE_PASTE,
 
67
        ACTIVATE_SEARCH,
67
68
        ACTIVATE_DELETE,
68
69
        ACTIVATE_CLEAR,
69
70
        ACTIVATE_PREFERENCES,
81
82
        {"Copy", "edit-copy", ACTIVATE_COPY, XPAD_BUTTON_TYPE_BUTTON, N_("Copy to Clipboard"), N_("Add C_opy button")},
82
83
        {"Cut", "edit-cut", ACTIVATE_CUT, XPAD_BUTTON_TYPE_BUTTON, N_("Cut to Clipboard"), N_("Add C_ut button")},
83
84
        {"Delete", "edit-delete", ACTIVATE_DELETE, XPAD_BUTTON_TYPE_BUTTON, N_("Delete Pad"), N_("Add _Delete button")},
 
85
        {"Find", "edit-find", ACTIVATE_SEARCH, XPAD_BUTTON_TYPE_BUTTON, N_("Find text"), N_("Add _Find button")},
84
86
        {"New", "document-new", ACTIVATE_NEW, XPAD_BUTTON_TYPE_BUTTON, N_("Open New Pad"), N_("Add _New button")},
85
87
        {"Paste", "edit-paste", ACTIVATE_PASTE, XPAD_BUTTON_TYPE_BUTTON, N_("Paste from Clipboard"), N_("Add Pa_ste button")},
86
88
        {"Preferences", "preferences-system", ACTIVATE_PREFERENCES, XPAD_BUTTON_TYPE_BUTTON, N_("Edit Preferences"), N_("Add Pr_eferences button")},
133
135
                g_signal_new ("activate-new",
134
136
                              G_OBJECT_CLASS_TYPE (gobject_class),
135
137
                              G_SIGNAL_RUN_LAST,
136
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_new),
 
138
                              0,
137
139
                              NULL, NULL,
138
140
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
139
141
 
141
143
                g_signal_new ("activate-close",
142
144
                              G_OBJECT_CLASS_TYPE (gobject_class),
143
145
                              G_SIGNAL_RUN_LAST,
144
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_close),
 
146
                              0,
145
147
                              NULL, NULL,
146
148
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
147
149
 
149
151
                g_signal_new ("activate-undo",
150
152
                              G_OBJECT_CLASS_TYPE (gobject_class),
151
153
                              G_SIGNAL_RUN_LAST,
152
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_undo),
 
154
                              0,
153
155
                              NULL, NULL,
154
156
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
155
157
 
157
159
                g_signal_new ("activate-redo",
158
160
                              G_OBJECT_CLASS_TYPE (gobject_class),
159
161
                              G_SIGNAL_RUN_LAST,
160
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_redo),
 
162
                              0,
161
163
                              NULL, NULL,
162
164
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
163
165
 
165
167
                g_signal_new ("activate-cut",
166
168
                              G_OBJECT_CLASS_TYPE (gobject_class),
167
169
                              G_SIGNAL_RUN_LAST,
168
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_cut),
 
170
                              0,
169
171
                              NULL, NULL,
170
172
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
171
173
 
173
175
                g_signal_new ("activate-copy",
174
176
                              G_OBJECT_CLASS_TYPE (gobject_class),
175
177
                              G_SIGNAL_RUN_LAST,
176
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_copy),
 
178
                              0,
177
179
                              NULL, NULL,
178
180
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
179
181
 
181
183
                g_signal_new ("activate-paste",
182
184
                              G_OBJECT_CLASS_TYPE (gobject_class),
183
185
                              G_SIGNAL_RUN_LAST,
184
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_paste),
 
186
                              0,
 
187
                              NULL, NULL,
 
188
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
 
189
 
 
190
        signals[ACTIVATE_SEARCH] =
 
191
                g_signal_new ("activate-search",
 
192
                              G_OBJECT_CLASS_TYPE (gobject_class),
 
193
                              G_SIGNAL_RUN_LAST,
 
194
                              0,
185
195
                              NULL, NULL,
186
196
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
187
197
 
189
199
                g_signal_new ("activate-quit",
190
200
                              G_OBJECT_CLASS_TYPE (gobject_class),
191
201
                              G_SIGNAL_RUN_LAST,
192
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_quit),
 
202
                              0,
193
203
                              NULL, NULL,
194
204
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
195
205
 
197
207
                g_signal_new ("activate-clear",
198
208
                              G_OBJECT_CLASS_TYPE (gobject_class),
199
209
                              G_SIGNAL_RUN_LAST,
200
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_clear),
 
210
                              0,
201
211
                              NULL, NULL,
202
212
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
203
213
        
205
215
                g_signal_new ("activate-properties",
206
216
                              G_OBJECT_CLASS_TYPE (gobject_class),
207
217
                              G_SIGNAL_RUN_LAST,
208
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_properties),
 
218
                              0,
209
219
                              NULL, NULL,
210
220
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
211
221
 
213
223
                g_signal_new ("activate-preferences",
214
224
                              G_OBJECT_CLASS_TYPE (gobject_class),
215
225
                              G_SIGNAL_RUN_LAST,
216
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_preferences),
 
226
                              0,
217
227
                              NULL, NULL,
218
228
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
219
229
 
221
231
                g_signal_new ("activate-delete",
222
232
                              G_OBJECT_CLASS_TYPE (gobject_class),
223
233
                              G_SIGNAL_RUN_LAST,
224
 
                              G_STRUCT_OFFSET (XpadToolbarClass, activate_delete),
 
234
                              0,
225
235
                              NULL, NULL,
226
236
                              g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
227
237
 
229
239
                g_signal_new ("popup",
230
240
                              G_OBJECT_CLASS_TYPE (gobject_class),
231
241
                              G_SIGNAL_RUN_LAST,
232
 
                              G_STRUCT_OFFSET (XpadToolbarClass, popup),
 
242
                              0,
233
243
                              NULL, NULL,
234
244
                              g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GTK_TYPE_MENU);
235
245
 
237
247
                g_signal_new ("popdown",
238
248
                              G_OBJECT_CLASS_TYPE (gobject_class),
239
249
                              G_SIGNAL_RUN_LAST,
240
 
                              G_STRUCT_OFFSET (XpadToolbarClass, popdown),
 
250
                              0,
241
251
                              NULL, NULL,
242
252
                              g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GTK_TYPE_MENU);
243
253