* Added Epplet_change_popbutton_label
* Added gatghet type checking to Epplet_draw_popupbutton and Epplet_draw_label. SVN revision: 2895
This commit is contained in:
parent
3804b901b5
commit
320c97df7d
23
api/epplet.c
23
api/epplet.c
|
@ -3393,6 +3393,7 @@ Epplet_draw_label(Epplet_gadget eg, char un_only)
|
|||
XGCValues gcv;
|
||||
int x;
|
||||
|
||||
GADGET_CONFIRM_TYPE(eg, E_LABEL);
|
||||
g = (GadLabel *) eg;
|
||||
gc = XCreateGC(disp, g->general.parent->bg_pmap, 0, &gcv);
|
||||
if (g->x < 0)
|
||||
|
@ -3794,6 +3795,7 @@ Epplet_draw_popupbutton(Epplet_gadget eg)
|
|||
GadPopupButton *g;
|
||||
char *state;
|
||||
|
||||
GADGET_CONFIRM_TYPE(eg, E_POPUPBUTTON);
|
||||
g = (GadPopupButton *) eg;
|
||||
if (g->hilited)
|
||||
{
|
||||
|
@ -3891,6 +3893,27 @@ Epplet_change_popbutton_popup(Epplet_gadget gadget, Epplet_gadget popup)
|
|||
Epplet_draw_popupbutton(gadget);
|
||||
}
|
||||
|
||||
void
|
||||
Epplet_change_popbutton_label(Epplet_gadget gadget, char *label)
|
||||
{
|
||||
GadPopupButton *g;
|
||||
GadGeneral *gg;
|
||||
|
||||
GADGET_CONFIRM_TYPE(gadget, E_POPUPBUTTON);
|
||||
g = (GadPopupButton *) gadget;
|
||||
gg = (GadGeneral *) gadget;
|
||||
if (g->label)
|
||||
{
|
||||
if (label && !strcmp(g->label, label))
|
||||
return; /* The labels are identical, so no sense in redrawing */
|
||||
else
|
||||
free(g->label); /* The labels are different. Proceed. */
|
||||
}
|
||||
g->label = Estrdup(label);
|
||||
if (gg->visible != 0)
|
||||
Epplet_draw_popupbutton(gadget);
|
||||
}
|
||||
|
||||
void
|
||||
Epplet_change_image(Epplet_gadget gadget, int w, int h, char *image)
|
||||
{
|
||||
|
|
|
@ -434,6 +434,10 @@ void Epplet_redraw(void);
|
|||
void Epplet_change_popbutton_popup(Epplet_gadget gadget,
|
||||
Epplet_gadget popup);
|
||||
|
||||
/* change the label string contents of the gadget popbutton */
|
||||
void Epplet_change_popbutton_label(Epplet_gadget gadget,
|
||||
char *label);
|
||||
|
||||
/* display the popup gadget above or below (dpeending where the window ww */
|
||||
/* is) the window ww, or if it's 0, deisplay where the pointer is */
|
||||
void Epplet_pop_popup(Epplet_gadget gadget, Window ww);
|
||||
|
|
|
@ -30,9 +30,10 @@ slideshow, a URL grabber, a panel-like toolbar, and more.
|
|||
|
||||
%build
|
||||
if [ -z $GNOME_FRIENDLY ]; then
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --enable-fsstd
|
||||
else
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-autorespawn
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} \
|
||||
--disable-autorespawn --enable-fsstd
|
||||
fi
|
||||
|
||||
make
|
||||
|
|
|
@ -238,12 +238,14 @@ install-data-hook:
|
|||
$(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data
|
||||
@for i in `echo $(bin_PROGRAMS) | sed 's/\.epplet//g'`; do \
|
||||
if test -d $${i}-data ; then \
|
||||
echo $(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data/$$i ; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data/$$i ; \
|
||||
data=`echo $$i-data/* | sed s#$$i-data/CVS##`;\
|
||||
echo $(INSTALL_DATA) $$data $(DESTDIR)$(EROOT)/epplet_data/$$i/ ; \
|
||||
$(INSTALL_DATA) $$data $(DESTDIR)$(EROOT)/epplet_data/$$i/ ; \
|
||||
fi ; \
|
||||
if test -d $${i}.ABOUT ; then \
|
||||
echo $(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT ; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT ; \
|
||||
ABOUT=`echo $$i.ABOUT/* | sed s#$$i.ABOUT/CVS##`;\
|
||||
echo $(INSTALL_DATA) $$ABOUT $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT/ ; \
|
||||
|
@ -255,10 +257,14 @@ install-data-hook:
|
|||
fi ; \
|
||||
done
|
||||
@for i in $(NEED_BG) ; do \
|
||||
echo $(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT ; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT ; \
|
||||
echo $(INSTALL_DATA) $(srcdir)/$(BG_SRC) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT/ ; \
|
||||
$(INSTALL_DATA) $(srcdir)/$(BG_SRC) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT/ || : ; \
|
||||
done
|
||||
@for i in $(NEED_FONT) ; do \
|
||||
echo $(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT ; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT ; \
|
||||
echo $(INSTALL_DATA) $(srcdir)/$(FONT_SRC) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT/ ; \
|
||||
$(INSTALL_DATA) $(srcdir)/$(FONT_SRC) $(DESTDIR)$(EROOT)/epplet_data/$$i/$${i}.ABOUT/ || : ; \
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue