View Frame Patch
- From: Mike Kestner <mkestner ameritech net>
- To: gnome-components-list gnome org
- Subject: View Frame Patch
- Date: Mon, 08 May 2000 22:46:45 -0500
Attached is a simple little patch to emit a new user_select signal for
button1 clicks on a covered ViewFrame. Let me know if I can commit it.
Thanks,
Mike
? components/image-x-png/Makefile.in
? components/image-x-png/Makefile
? components/image-x-png/.deps
? components/image-x-png/doc/Makefile.in
? components/image-x-png/doc/Makefile
? components/image-x-png/doc/C/Makefile.in
? components/image-x-png/doc/C/Makefile
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/bonobo/ChangeLog,v
retrieving revision 1.377
diff -u -r1.377 ChangeLog
--- ChangeLog 2000/05/08 21:48:12 1.377
+++ ChangeLog 2000/05/09 03:36:29
@@ -1,3 +1,10 @@
+2000-05-09 Mike Kestner <mkestner@ameritech.net>
+
+ * bonobo/bonobo-view-frame.[ch] : Added support for user_select signal
+ (bonobo_view_frame_wrapper_button_press_cb): emits user_select signal
+ for single button1 clicks.
+ (bonobo_view_frame_class_init): Create user_select signal.
+
2000-05-08 Michael Meeks <michael@helixcode.com>
* gshell/Makefile.am (gshell_SOURCES): add properties.h
Index: bonobo/bonobo-view-frame.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-view-frame.c,v
retrieving revision 1.41
diff -u -r1.41 bonobo-view-frame.c
--- bonobo/bonobo-view-frame.c 2000/03/08 00:28:23 1.41
+++ bonobo/bonobo-view-frame.c 2000/05/09 03:36:31
@@ -22,6 +22,7 @@
enum {
USER_ACTIVATE,
USER_CONTEXT,
+ USER_SELECT,
LAST_SIGNAL
};
@@ -82,10 +83,24 @@
if (event->type == GDK_2BUTTON_PRESS)
gtk_signal_emit (GTK_OBJECT (view_frame), view_frame_signals [USER_ACTIVATE]);
- /* Check for right click. */
- else if (event->type == GDK_BUTTON_PRESS &&
- event->button == 3)
- gtk_signal_emit (GTK_OBJECT (view_frame), view_frame_signals [USER_CONTEXT]);
+ /* Check for single click. */
+ else if (event->type == GDK_BUTTON_PRESS) {
+ switch (event->button) {
+
+ case 1:
+
+ gtk_signal_emit (GTK_OBJECT (view_frame), view_frame_signals [USER_SELECT]);
+ break;
+
+ case 3:
+
+ gtk_signal_emit (GTK_OBJECT (view_frame), view_frame_signals [USER_CONTEXT]);
+ break;
+ default:
+
+ break;
+ }
+ }
return FALSE;
}
@@ -256,6 +271,14 @@
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (BonoboViewFrameClass, user_context),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
+ view_frame_signals [USER_SELECT] =
+ gtk_signal_new ("user_select",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (BonoboViewFrameClass, user_select),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
Index: bonobo/bonobo-view-frame.h
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-view-frame.h,v
retrieving revision 1.27
diff -u -r1.27 bonobo-view-frame.h
--- bonobo/bonobo-view-frame.h 2000/02/16 05:26:56 1.27
+++ bonobo/bonobo-view-frame.h 2000/05/09 03:36:31
@@ -32,6 +32,7 @@
*/
void (*user_activate) (BonoboViewFrame *view_frame);
void (*user_context) (BonoboViewFrame *view_frame);
+ void (*user_select) (BonoboViewFrame *view_frame);
} BonoboViewFrameClass;
GtkType bonobo_view_frame_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]