[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src/gtk extgtktext.c,1.1,1.2
From: |
Edward L. Haletky <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src/gtk extgtktext.c,1.1,1.2 |
Date: |
Fri, 28 Mar 2003 14:24:12 -0500 |
Update of /cvsroot/ayttm/ayttm/src/gtk
In directory subversions:/tmp/cvs-serv24456/src/gtk
Modified Files:
extgtktext.c
Log Message:
Updates for MINGW32 GUI issues
Updates to remove Yahoo async connect specifically for MINGW32 only
Index: extgtktext.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/gtk/extgtktext.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- extgtktext.c 28 Jan 2003 00:35:05 -0000 1.1
+++ extgtktext.c 28 Mar 2003 19:24:10 -0000 1.2
@@ -2262,6 +2262,29 @@
if ((GTK_EDITABLE(text)->editable == FALSE))
{
+#ifdef __MINGW32__
+ gint extend_selection;
+ gint extend_start;
+ guint initial_pos = editable->current_pos;
+
+ text->point = find_mark (text, text->cursor_mark.index);
+
+ extend_selection = event->state & GDK_SHIFT_MASK;
+ extend_start = FALSE;
+
+ if (extend_selection)
+ {
+ editable->has_selection = TRUE;
+
+ if (editable->selection_start_pos == editable->selection_end_pos)
+ {
+ editable->selection_start_pos = text->point.index;
+ editable->selection_end_pos = text->point.index;
+ }
+
+ extend_start = (text->point.index == editable->selection_start_pos);
+ }
+#endif
switch (event->keyval)
{
case GDK_Home:
@@ -2288,8 +2311,54 @@
break;
default:
return_val = FALSE;
+#ifdef __MINGW32__
+ /* We want to trap ctrl-c here */
+ if (event->state & GDK_CONTROL_MASK)
+ {
+ if (key == 'C')
+ key -= 'A' - 'a';
+
+ if ((key == 'c') && control_keys[(int) (key - 'a')])
+ {
+ (* control_keys[(int) (key - 'a')]) (editable, event->time);
+ return_val = TRUE;
+ }
+ }
+ else
+ return_val = FALSE;
+#endif
break;
}
+
+#ifdef __MINGW32__
+ if (return_val && (editable->current_pos != initial_pos))
+ {
+ if (extend_selection)
+ {
+ if (editable->current_pos < editable->selection_start_pos)
+ gtk_text_set_selection (editable, editable->current_pos,
+ editable->selection_end_pos);
+ else if (editable->current_pos > editable->selection_end_pos)
+ gtk_text_set_selection (editable,
editable->selection_start_pos,
+ editable->current_pos);
+ else
+ {
+ if (extend_start)
+ gtk_text_set_selection (editable, editable->current_pos,
+ editable->selection_end_pos);
+ else
+ gtk_text_set_selection (editable,
editable->selection_start_pos,
+ editable->current_pos);
+ }
+ }
+ else
+ gtk_text_set_selection (editable, 0, 0);
+
+ gtk_editable_claim_selection (editable,
+ editable->selection_start_pos !=
editable->selection_end_pos,
+ event->time);
+ }
+#endif
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src/gtk extgtktext.c,1.1,1.2,
Edward L. Haletky <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm/src chat_window.c,1.68,1.69
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.463,1.464 configure.in,1.459,1.460
- Previous by thread:
[Ayttm-commits] CVS: ayttm/src chat_window.c,1.68,1.69
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.463,1.464 configure.in,1.459,1.460
- Index(es):