Changed from a GNOME applet to a standalone application. Finished the

implementation of various things.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@53 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2001-02-24 02:35:20 +00:00
parent 4f8979557e
commit 9dcafda455
13 changed files with 1084 additions and 163 deletions
+29 -17
View File
@@ -1,41 +1,53 @@
/**
* $Id: lookuplet.c,v 1.1 2000/12/10 23:38:39 mdb Exp $
* $Id: lookuplet.c,v 1.2 2001/02/24 02:35:20 mdb Exp $
*/
#include <config.h>
#include <gnome.h>
#include <applet-widget.h>
#include "entry.h"
#include "querybox.h"
#include "preferences.h"
static void
exit_lookuplet (GtkWidget* widget, gpointer data)
{
gtk_main_quit();
}
int
main (int argc, char** argv)
{
GtkWidget* applet;
GtkWidget* window;
GtkWidget* contents;
/* initialize the i18n stuff */
bindtextdomain(PACKAGE, GNOMELOCALEDIR);
textdomain(PACKAGE);
/* intialize, this will basically set up the applet, corba and
call gnome_init */
applet_widget_init("lookuplet", NULL, argc, argv, NULL, 0, NULL);
/* initialize gtk */
gtk_init(&argc, &argv);
/* create a new applet_widget */
applet = applet_widget_new("lookuplet");
if (applet == NULL) {
g_error("Can't create applet!\n");
}
/* initialize our preferences */
lk_prefs_init();
/* create a new window */
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_signal_connect(GTK_OBJECT(window), "destroy",
GTK_SIGNAL_FUNC(exit_lookuplet), NULL);
/* create our contents and set them up real proper like */
contents = lookuplet_querybox_create();
applet_widget_add(APPLET_WIDGET(applet), contents);
gtk_widget_show(contents);
gtk_widget_show(applet);
contents = lk_querybox_create();
gtk_container_add(GTK_CONTAINER(window), contents);
gtk_container_set_border_width(GTK_CONTAINER(window), GNOME_PAD_SMALL);
gtk_widget_show_all(contents);
gtk_widget_show(window);
/* special corba main loop */
applet_widget_gtk_main();
/* initialize the querybox (which handles about everything) */
lk_querybox_init();
/* main loop */
gtk_main();
return 0;
}