* gtkedit.c (gtk_edit_delete_cb): Handler for "delete_event".
(edit): Connect it.
Этот коммит содержится в:
родитель
054b273045
Коммит
bcb919b457
@ -1,3 +1,8 @@
|
||||
2001-07-28 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* gtkedit.c (gtk_edit_delete_cb): Handler for "delete_event".
|
||||
(edit): Connect it.
|
||||
|
||||
2001-07-27 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* edit.c: Fix include.
|
||||
|
@ -47,7 +47,6 @@ int column_highlighting = 0;
|
||||
static GtkWidgetClass *parent_class = NULL;
|
||||
|
||||
WEdit *edit_init (WEdit * edit, int lines, int columns, const char *filename, const char *text, const char *dir, unsigned long text_size);
|
||||
void edit_destroy_callback (CWidget * w);
|
||||
int edit_translate_key (unsigned int x_keycode, long x_key, int x_state, int *cmd, int *ch);
|
||||
void gtk_edit_alloc_colors (GtkEdit *edit, GdkColormap *colormap);
|
||||
static void gtk_edit_set_position (GtkEditable *editable, gint position);
|
||||
@ -1202,6 +1201,11 @@ void gtk_edit_move (GtkEdit * widget, void *data) { GtkEdit *edit = (GtkEdit *)
|
||||
void gtk_edit_delete (GtkEdit * widget, void *data) { GtkEdit *edit = (GtkEdit *) data ; gtk_edit_command (edit, CK_Remove); }
|
||||
void gtk_edit_undo (GtkEdit * widget, void *data) { GtkEdit *edit = (GtkEdit *) data ; gtk_edit_command (edit, CK_Undo); }
|
||||
|
||||
gint gtk_edit_delete_cb (GtkWidget *widget, GdkEvent *event, GtkWidget *edit) {
|
||||
gtk_edit_quit (NULL, edit);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
struct _GnomeUIInfo {
|
||||
GnomeUIInfoType type;
|
||||
@ -1354,6 +1358,9 @@ int edit (const char *file, int line)
|
||||
GTK_EDIT(edit)->destroy_me = gtk_widget_destroy;
|
||||
GTK_EDIT(edit)->destroy_me_user_data = app;
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (app), "delete_event",
|
||||
(GtkSignalFunc) gtk_edit_delete_cb, edit);
|
||||
|
||||
gtk_widget_show (edit);
|
||||
gtk_widget_realize (edit);
|
||||
if (file)
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user