I got this one dockapp that is not behaving absolutely the way I believe it should. it is called "minicontrol" that shows the then and two buttons one for WPref the other is to display a ShutDown,restart,cancel message box window.
When the second button is pressed to shutdown, or reboot. that window and another window gets displayed. the second window that shows up is like another dockapp and takes its place in the dockapp area. Which is no big deal if one is shutting down or rebooting, because it will go away along with the entire desktop.
BUT, if cancel is selected that is when I get upset. The extra dockapp window that shows up with the message selection box window, (or whatever it is called) does not go away.
this is the sniplet of code that fires off the box and how it deals with the cancle button part.
Code:
gtk_signal_connect (GTK_OBJECT(button3), "clicked", GTK_SIGNAL_FUNC(exitwidget), dialog);
gtk_container_add (GTK_CONTAINER (dialog), table);
gtk_widget_show_all (dialog);
return;
} // end launchdialog
void exitwidget (GtkWidget *wgt, gpointer data){
gtk_widget_destroy (GTK_WIDGET(data));
return;
} // end exitwidget
this is gtk 1
as I have been googling around looking for a way to fix it. Seeing that it is
Code:
gtk_signal_connect is deprecated and should not be used in newly-written code.
with no use this instead to take its place, and the simple fact this is Slackware 41.2 I am using I am putting this in Slackware, and not programming.
Because if I take on this task, I thought to just fix that one thing, why not just updated the entire file which is only approx 400 lines of code. so it complies and works with the gtk that is being used today.
Code:
$ whereis gtk-3.0
gtk-3: /usr/lib64/gtk-3.0 /etc/gtk-3.0 /usr/include/gtk-3.0 /usr/share/gtk-3.0
userx@slackwhere101:~/Documents/minicontrol
$ whereis gtk-2.0
gtk-2: /usr/lib64/gtk-2.0 /etc/gtk-2.0 /usr/include/gtk-2.0 /usr/share/gtk-2.0
make file that came with it updated to reflect 2.0 or 3.0.
Code:
#LIBCONFIG = `gtk-config --cflags --libs`
LIBCONFIG = `pkg-config --cflags --libs gtk+-3.0`
c file replaced
Code:
/*
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
*/
#include <gtk-2.0/gtk.h>
#include <gdk-2.0/gdk.h>
#include <gdk-2.0/gdkx.h>
2.0 or 3.0 does not matter I keep getting that same Ole error.
Code:
$ make
gcc -g -Wall -D__CONFPATH='"/usr/local/share/minicontrol"' -D__CONFFILE='"minicontrol.cf"' `pkg-config --cflags --libs gtk+-2.0` -o minicontrol minicontrol.c
minicontrol.c:19:25: fatal error: gtk-2.0/gtk.h: No such file or directory
compilation terminated.
makefile:28: recipe for target 'minicontrol' failed
make: *** [minicontrol] Error 1
-----
$ make
gcc -g -Wall -D__CONFPATH='"/usr/local/share/minicontrol"' -D__CONFFILE='"minicontrol.cf"' `pkg-config --cflags --libs gtk+-3.0` -o minicontrol minicontrol.c
minicontrol.c:19:25: fatal error: gtk-3.0/gtk.h: No such file or directory
compilation terminated.
makefile:28: recipe for target 'minicontrol' failed
make: *** [minicontrol] Error 1
so after all of that, how do I get that to work?