Problems+Patch for GtkICQ
- From: Ian Campbell <ijc25 cam ac uk>
- To: gnome-list gnome org
- Subject: Problems+Patch for GtkICQ
- Date: Thu, 14 Jan 1999 19:50:19 +0000 (GMT)
I've made a patch to fix a few small problems with GtkICQ, these are:
1) GtkICQ did not start up from the panel "add applet" menu.
2) Double clicking the applet was supposed to hide/show the main window
and it wasn't, I've fixed that, and cured the gtk-warning during startup
in the process.
3) When starting as an applet, there was code commented out that made the
main window not appear, I assume this was because of #2 so I uncommented
the code.
I have attached a patch to the code and a new file GtkICQ.gnorba which
should be added to the src/ subdirectory.
Thanks,
Ian
[gtkicq]
type=exe
repo_id=IDL:GNOME/Applet:1.0
description=ICQ Network Interface
description[fr]=Interface Réseau ICQ
location_info=gtkicq
? src/GtkICQ.gnorba
Index: src/GtkICQ.desktop
===================================================================
RCS file: /cvs/gnome/gtkicq/src/GtkICQ.desktop,v
retrieving revision 1.2
diff -u -r1.2 GtkICQ.desktop
--- GtkICQ.desktop 1998/12/30 21:10:04 1.2
+++ GtkICQ.desktop 1999/01/14 19:25:29
@@ -3,7 +3,7 @@
Name[fr]=GtkICQ
Comment=ICQ Network Interface
Comment[fr]=Interface Réseau ICQ
-Exec=gtkicq
+Exec=gtkicq --activate-goad-server=gtkicq
Icon=gnome-gtkicq.xpm
Terminal=0
Type=Application
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/gtkicq/src/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- Makefile.am 1999/01/03 00:13:05 1.9
+++ Makefile.am 1999/01/14 19:25:29
@@ -55,6 +55,7 @@
EXTRA_DIST= \
GtkICQ.desktop \
+ GtkICQ.gnorba \
gnome-gtkicq.xpm \
applet.c
@@ -64,3 +65,5 @@
Iconsdir = $(datadir)/pixmaps
Icons_DATA = gnome-gtkicq.xpm
+gnorbadir = $(sysconfdir)/CORBA/servers
+gnorba_DATA = GtkICQ.gnorba
Index: src/applet.c
===================================================================
RCS file: /cvs/gnome/gtkicq/src/applet.c,v
retrieving revision 1.6
diff -u -r1.6 applet.c
--- applet.c 1998/12/22 16:02:03 1.6
+++ applet.c 1999/01/14 19:25:29
@@ -16,7 +16,8 @@
GtkWidget *mess_pm;
void applet_exposed_cb( GtkWidget *widget, gpointer data );
-GtkWidget *create_applet(GtkWidget *window, struct sokandlb *data );
+GtkWidget *create_applet(void);
+void init_applet_signals(GtkWidget *window, struct sokandlb *data );
void applet_exposed_cb( GtkWidget *widget, gpointer data )
{
@@ -153,8 +154,18 @@
gtk_widget_hide( app );
}
-GtkWidget *create_applet(GtkWidget *window, struct sokandlb *data )
+void init_applet_signals(GtkWidget *window, struct sokandlb *data)
{
+ gtk_widget_set_events(window, gtk_widget_get_events( window ) |
+ GDK_BUTTON_PRESS_MASK | GDK_EXPOSURE_MASK );
+ gtk_signal_connect( GTK_OBJECT( window ), "expose_event",
+ GTK_SIGNAL_FUNC( applet_exposed_cb ), data );
+ gtk_signal_connect( GTK_OBJECT( window ), "button_press_event",
+ GTK_SIGNAL_FUNC( applet_clicked_cb ), NULL );
+}
+
+GtkWidget *create_applet(void)
+{
#if 0
GtkStyle *style;
#endif
@@ -198,13 +209,6 @@
gtk_box_pack_start( GTK_BOX( hbox ), frame, FALSE, FALSE, 0 );
- gtk_widget_set_events(window, gtk_widget_get_events( window ) |
- GDK_BUTTON_PRESS_MASK | GDK_EXPOSURE_MASK );
- gtk_signal_connect( GTK_OBJECT( window ), "expose_event",
- GTK_SIGNAL_FUNC( applet_exposed_cb ), data );
- gtk_signal_connect( GTK_OBJECT( window ), "button_press_event",
- GTK_SIGNAL_FUNC( applet_clicked_cb ), NULL );
-
gtk_container_add( GTK_CONTAINER( frame ), table );
gtk_widget_show( table );
gtk_widget_show( frame );
@@ -273,9 +277,10 @@
style = gtk_widget_get_style( applet );
+ init_applet_signals( applet, data );
gtk_widget_realize( applet );
init_pixmaps( style, applet );
- widget = create_applet( applet, data );
+ widget = create_applet();
gtk_widget_show( widget );
applet_widget_add( APPLET_WIDGET( applet ), widget );
Index: src/gtkicq.c
===================================================================
RCS file: /cvs/gnome/gtkicq/src/gtkicq.c,v
retrieving revision 1.14
diff -u -r1.14 gtkicq.c
--- gtkicq.c 1998/12/31 17:09:41 1.14
+++ gtkicq.c 1999/01/14 19:25:29
@@ -1350,9 +1350,7 @@
tcp_gdk_input = gdk_input_add( our_sok, GDK_INPUT_READ, (GdkInputFunction) TCPAcceptIncoming, &sal );
#ifdef GNOME
-/*
if( applet_toggle == FALSE )
-*/
gtk_widget_show( GTK_WIDGET( app ) );
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]