Commit c6d96267 authored by Elliot Lee's avatar Elliot Lee

Committing in a vain attempt to get things synced up...

parent dcc00e21
......@@ -9,9 +9,37 @@ SUBDIRS = libapplet clock @PROGRAMS_PANEL_CDPLAYER@
INCLUDES = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-I$(includedir) $(X_CFLAGS)
-I$(includedir)
bin_PROGRAMS = panel
bin_PROGRAMS = panel clock_applet
lib_LTLIBRARIES = libpanel_applet.la
CORBA_SOURCES = \
gnome-panel.cc \
gnome-panel.h
MICO_VERS = 2.0.3
MICO_LIBS = -lmicocoss$(MICO_VERS) -lmicoaux$(MICO_VERS) -lmico$(MICO_VERS)
libpanel_applet_la_SOURCES = \
applet-lib.cc \
applet-widget.c \
$(CORBA_SOURCES)
libpanel_appletinclude_HEADERS = \
applet-lib.h \
applet-widget.h
libpanel_applet_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
libpanel_applet_la_LIBADD = $(MICO_LIBS) -lm $(DL_LIB)
BUILT_SOURCES = $(CORBA_SOURCES)
gnome-panel.cc: gnome-panel.idl
## `idl' version 2.0.3 lamely fails to strip the path part of the file
## name when computing the name of the output file, so we prod it a
## little.
idl --name gnome-panel $(srcdir)/gnome-panel.idl
panel_SOURCES = \
drawer.c \
......@@ -30,15 +58,16 @@ panel_SOURCES = \
panel_config_global.c \
panel_config_global.h \
panel-widget.c \
panel-widget.h
# $(CORBA_SOURCES)
panel-widget.h \
$(CORBA_SOURCES)
MICO_VERS = 2.0.3
MICO_LIBS = -lmicocoss$(MICO_VERS) -lmicoaux$(MICO_VERS) -lmico$(MICO_VERS)
panel_LDADD = $(GNOME_LIBDIR) $(MICO_LIBS) -lXt $(GNOMEUI_LIBS) $(INTLLIBS)
## FIXME: move clock applet into clock
clock_applet_SOURCES = \
clock.c
panel_LDADD = libapplet/libapplet.a \
$(GNOME_LIBDIR) $(MICO_LIBS) -lXt \
$(GNOMEUI_LIBS) $(INTLLIBS)
clock_applet_LDADD = -lpanel_applet $(GNOME_LIBDIR) $(MICO_LIBS) -lXt $(GNOMEUI_LIBS) $(INTLLIBS)
data_DATA = panelrc
......
......@@ -45,7 +45,7 @@ load_applet(char *id, char *params, int pos, int panel)
Menu *menu;
menu = create_menu_applet(GTK_WIDGET(panels->data),
params,MENU_UP);
params, MENU_UP);
register_toy(menu->button,menu->menu,menu,MENU_ID,params,pos,
......
......@@ -655,10 +655,11 @@ create_menu_applet(GtkWidget *window, char *arguments, MenuOrient orient)
if (*arguments == '/')
this_menu = g_strdup (arguments);
else
else
this_menu = g_concat_dir_and_file (menu_base, arguments);
if (!g_file_exists (this_menu)) {
g_warning("Menu %s does not exist (base is %s, arguments are %s)\n", this_menu, menu_base, arguments);
g_free (menu_base);
g_free (this_menu);
return NULL;
......
......@@ -53,6 +53,14 @@ public:
printf ("APPLET_REMOVE_FROM_PANEL!\n");
/*FIXME: */
}
void applet_add_callback (CORBA::Short id,
CORBA::String callback_name,
CORBA::String menuitem_text) {
::applet_add_callback(id, (char *)callback_name, (char *)menuitem_text);
}
void quit(void) {
::panel_quit();
}
};
CORBA::ORB_ptr orb_ptr;
......@@ -115,3 +123,14 @@ send_applet_change_orient (const char *ior, int id, int orient)
/* Now, use corba to invoke the routine in the panel */
applet->change_orient(id,orient);
}
void
send_applet_do_callback (const char *ior, int id, char *callback_name)
{
/* Use the ior that was sent to us to get an Applet CORBA object */
CORBA::Object_var obj = orb_ptr->string_to_object (ior);
GNOME::Applet_var applet = GNOME::Applet::_narrow (obj);
/* Now, use corba to invoke the routine in the panel */
applet->do_callback(id, callback_name);
}
......@@ -6,4 +6,5 @@ void panel_corba_gtk_main (int *argc, char ***argv, char *service_name);
void send_applet_session_save (const char *ior, int id, int panel, int pos);
void send_applet_shutdown_applet (const char *ior, int id);
void send_applet_change_orient (const char *ior, int id, int orient);
void send_applet_do_callback (const char *ior, int id, char *callback_name);
END_GNOME_DECLS
......@@ -549,6 +549,12 @@ applet_drag_stop(int id)
panel_widget_applet_drag_end_no_grab(panel);
}
void
applet_add_callback(short id, char *callback_name, char *menuitem_text)
{
g_warning("Unimplemented\n");
}
void
reparent_window_id (unsigned long winid, int id)
{
......
......@@ -97,7 +97,7 @@ int applet_get_panel(int id);
int applet_get_pos(int id);
void applet_drag_start(int id);
void applet_drag_stop(int id);
void applet_add_callback(short id, char *callback_name, char *menuitem_text);
/*this is in main.c*/
void load_applet(char *id, char *params, int pos, int panel);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment