grim/guifications2

Fix cp gf_config.h.mingw gf_config.h
org.guifications.gf2
2007-05-02, datallah
5e11127271b1
Fix cp gf_config.h.mingw gf_config.h
make -C ./src -f Makefile.mingw
make[1]: Entering directory `/home/datallah/winpidgin/gf2/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/datallah/winpidgin/gf2/src'
make -C ./po -f Makefile.mingw
make[1]: Entering directory `/home/datallah/winpidgin/gf2/po'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/datallah/winpidgin/gf2/po'
make -C ./pixmaps -f Makefile.mingw install
make[1]: Entering directory `/home/datallah/winpidgin/gf2/pixmaps'
if test 'item_icon_size_big.png item_icon_size_huge.png item_icon_size_large.png item_icon_size_little.png item_icon_size_normal.png item_icon_size_small.png item_icon_size_tiny.png item_position_center.png item_position_east.png item_position_north_east.png item_position_north.png item_position_north_west.png item_position_south_east.png item_position_south.png item_position_south_west.png item_position_west.png item_text_clipping_ellipsis_end.png item_text_clipping_ellipsis_middle.png item_text_clipping_ellipsis_start.png item_text_clipping_truncate.png window_position_north_east.png window_position_north_west.png window_position_south_east.png window_position_south_west.png'; then \
mkdir -p ../../pidgin/win32-install-dir/pixmaps/pidgin/guifications/conf; \
cp item_icon_size_big.png item_icon_size_huge.png item_icon_size_large.png item_icon_size_little.png item_icon_size_normal.png item_icon_size_small.png item_icon_size_tiny.png item_position_center.png item_position_east.png item_position_north_east.png item_position_north.png item_position_north_west.png item_position_south_east.png item_position_south.png item_position_south_west.png item_position_west.png item_text_clipping_ellipsis_end.png item_text_clipping_ellipsis_middle.png item_text_clipping_ellipsis_start.png item_text_clipping_truncate.png window_position_north_east.png window_position_north_west.png window_position_south_east.png window_position_south_west.png ../../pidgin/win32-install-dir/pixmaps/pidgin/guifications/conf; \
fi;
if test ''; then \
mkdir -p ; \
cp ; \
fi;
make[1]: Leaving directory `/home/datallah/winpidgin/gf2/pixmaps'
make -C ./themes -f Makefile.mingw install
make[1]: Entering directory `/home/datallah/winpidgin/gf2/themes'
make -C ./default -f Makefile.mingw install
make[2]: Entering directory `/home/datallah/winpidgin/gf2/themes/default'
if test 'background.png theme.xml'; then \
mkdir -p ../../../pidgin/win32-install-dir/pixmaps/pidgin/guifications/themes/default; \
cp background.png theme.xml ../../../pidgin/win32-install-dir/pixmaps/pidgin/guifications/themes/default; \
fi;
make[2]: Leaving directory `/home/datallah/winpidgin/gf2/themes/default'
make -C ./mini -f Makefile.mingw install
make[2]: Entering directory `/home/datallah/winpidgin/gf2/themes/mini'
if test 'background.png theme.xml'; then \
mkdir -p ../../../pidgin/win32-install-dir/pixmaps/pidgin/guifications/themes/mini; \
cp background.png theme.xml ../../../pidgin/win32-install-dir/pixmaps/pidgin/guifications/themes/mini; \
fi;
make[2]: Leaving directory `/home/datallah/winpidgin/gf2/themes/mini'
make -C ./Penguins -f Makefile.mingw install
make[2]: Entering directory `/home/datallah/winpidgin/gf2/themes/Penguins'
if test 'penguin.png theme.xml'; then \
mkdir -p ../../../pidgin/win32-install-dir/pixmaps/pidgin/guifications/themes/Penguins; \
cp penguin.png theme.xml ../../../pidgin/win32-install-dir/pixmaps/pidgin/guifications/themes/Penguins; \
fi;
make[2]: Leaving directory `/home/datallah/winpidgin/gf2/themes/Penguins'
make[1]: Leaving directory `/home/datallah/winpidgin/gf2/themes'
make -C ./src -f Makefile.mingw install
make[1]: Entering directory `/home/datallah/winpidgin/gf2/src'
cp guifications.dll ../../pidgin/win32-install-dir/plugins
make[1]: Leaving directory `/home/datallah/winpidgin/gf2/src'
make -C ./po -f Makefile.mingw install
make[1]: Entering directory `/home/datallah/winpidgin/gf2/po'
mkdir -p ../../pidgin/win32-install-dir/locale
installing bn.gmo as ../../pidgin/win32-install-dir/locale/bn/LC_MESSAGES/guifications.mo
installing cs.gmo as ../../pidgin/win32-install-dir/locale/cs/LC_MESSAGES/guifications.mo
installing de.gmo as ../../pidgin/win32-install-dir/locale/de/LC_MESSAGES/guifications.mo
installing en_AU.gmo as ../../pidgin/win32-install-dir/locale/en_AU/LC_MESSAGES/guifications.mo
installing en_GB.gmo as ../../pidgin/win32-install-dir/locale/en_GB/LC_MESSAGES/guifications.mo
installing es.gmo as ../../pidgin/win32-install-dir/locale/es/LC_MESSAGES/guifications.mo
installing fr.gmo as ../../pidgin/win32-install-dir/locale/fr/LC_MESSAGES/guifications.mo
installing gl.gmo as ../../pidgin/win32-install-dir/locale/gl/LC_MESSAGES/guifications.mo
installing he.gmo as ../../pidgin/win32-install-dir/locale/he/LC_MESSAGES/guifications.mo
installing hu.gmo as ../../pidgin/win32-install-dir/locale/hu/LC_MESSAGES/guifications.mo
installing it.gmo as ../../pidgin/win32-install-dir/locale/it/LC_MESSAGES/guifications.mo
installing ja.gmo as ../../pidgin/win32-install-dir/locale/ja/LC_MESSAGES/guifications.mo
installing mk.gmo as ../../pidgin/win32-install-dir/locale/mk/LC_MESSAGES/guifications.mo
installing nl.gmo as ../../pidgin/win32-install-dir/locale/nl/LC_MESSAGES/guifications.mo
installing no.gmo as ../../pidgin/win32-install-dir/locale/no/LC_MESSAGES/guifications.mo
installing pt_BR.gmo as ../../pidgin/win32-install-dir/locale/pt_BR/LC_MESSAGES/guifications.mo
installing pt.gmo as ../../pidgin/win32-install-dir/locale/pt/LC_MESSAGES/guifications.mo
installing ru.gmo as ../../pidgin/win32-install-dir/locale/ru/LC_MESSAGES/guifications.mo
installing sk.gmo as ../../pidgin/win32-install-dir/locale/sk/LC_MESSAGES/guifications.mo
installing sr@Latn.gmo as ../../pidgin/win32-install-dir/locale/sr@Latn/LC_MESSAGES/guifications.mo
installing sr.gmo as ../../pidgin/win32-install-dir/locale/sr/LC_MESSAGES/guifications.mo
installing sv.gmo as ../../pidgin/win32-install-dir/locale/sv/LC_MESSAGES/guifications.mo
installing uk.gmo as ../../pidgin/win32-install-dir/locale/uk/LC_MESSAGES/guifications.mo
installing zh_CN.gmo as ../../pidgin/win32-install-dir/locale/zh_CN/LC_MESSAGES/guifications.mo
installing zh_TW.gmo as ../../pidgin/win32-install-dir/locale/zh_TW/LC_MESSAGES/guifications.mo
make[1]: Leaving directory `/home/datallah/winpidgin/gf2/po'
/*
* Guifications - The end all, be all, toaster popup plugin
* Copyright (C) 2003-2005 Gary Kramlich
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <glib.h>
#include <string.h>
struct _GfThemeOptions {
gchar *date_format;
gchar *time_format;
gchar *warning;
gchar *ellipsis;
};
#include "gf_theme_ops.h"
#include <debug.h>
#include <xmlnode.h>
GfThemeOptions *
gf_theme_options_new() {
GfThemeOptions *ops;
ops = g_new0(GfThemeOptions, 1);
ops->date_format = g_strdup("%x");
ops->time_format = g_strdup("%X");
ops->warning = g_strdup("N/A");
ops->ellipsis = g_strdup("...");
return ops;
}
GfThemeOptions *
gf_theme_options_new_from_xmlnode(xmlnode *node) {
GfThemeOptions *ops;
xmlnode *child;
gchar *data;
g_return_val_if_fail(node, NULL);
ops = gf_theme_options_new();
child = xmlnode_get_child(node, "date_format");
if(child && (data = xmlnode_get_data(child))) {
gf_theme_options_set_date_format(ops, data);
g_free(data);
}
child = xmlnode_get_child(node, "time_format");
if(child && (data = xmlnode_get_data(child))) {
gf_theme_options_set_time_format(ops, data);
g_free(data);
}
child = xmlnode_get_child(node, "warning");
if(child && (data = xmlnode_get_data(child))) {
gf_theme_options_set_warning(ops, data);
g_free(data);
}
child = xmlnode_get_child(node, "ellipsis");
if(child && (data = xmlnode_get_data(child))) {
gf_theme_options_set_ellipsis(ops, data);
g_free(data);
}
return ops;
}
xmlnode *
gf_theme_options_to_xmlnode(GfThemeOptions *ops) {
xmlnode *parent, *child;
parent = xmlnode_new("options");
if(ops->date_format && strlen(ops->date_format)) {
child = xmlnode_new_child(parent, "date_format");
xmlnode_insert_data(child, ops->date_format, strlen(ops->date_format));
}
if(ops->time_format && strlen(ops->time_format)) {
child = xmlnode_new_child(parent, "time_format");
xmlnode_insert_data(child, ops->time_format, strlen(ops->time_format));
}
if(ops->warning && strlen(ops->warning)) {
child = xmlnode_new_child(parent, "warning");
xmlnode_insert_data(child, ops->warning, strlen(ops->warning));
}
if(ops->ellipsis && strlen(ops->ellipsis)) {
child = xmlnode_new_child(parent, "ellipsis");
xmlnode_insert_data(child, ops->ellipsis, strlen(ops->ellipsis));
}
return parent;
}
void
gf_theme_options_destroy(GfThemeOptions *ops) {
g_return_if_fail(ops);
if(ops->date_format)
g_free(ops->date_format);
if(ops->time_format)
g_free(ops->time_format);
if(ops->warning)
g_free(ops->warning);
if(ops->ellipsis)
g_free(ops->ellipsis);
g_free(ops);
ops = NULL;
}
void
gf_theme_options_set_time_format(GfThemeOptions *ops, const gchar *format) {
g_return_if_fail(ops);
g_return_if_fail(format);
if(ops->time_format)
g_free(ops->time_format);
ops->time_format = g_strdup(format);
}
const gchar *
gf_theme_options_get_time_format(GfThemeOptions *ops) {
g_return_val_if_fail(ops, NULL);
return ops->time_format;
}
void
gf_theme_options_set_date_format(GfThemeOptions *ops, const gchar *format) {
g_return_if_fail(ops);
g_return_if_fail(format);
if(ops->date_format)
g_free(ops->date_format);
ops->date_format = g_strdup(format);
}
const gchar *
gf_theme_options_get_date_format(GfThemeOptions *ops) {
g_return_val_if_fail(ops, NULL);
return ops->date_format;
}
void
gf_theme_options_set_warning(GfThemeOptions *ops, const gchar *warning) {
g_return_if_fail(ops);
g_return_if_fail(warning);
if(ops->warning)
g_free(ops->warning);
ops->warning = g_strdup(warning);
}
const gchar *
gf_theme_options_get_warning(GfThemeOptions *ops) {
g_return_val_if_fail(ops, NULL);
return ops->warning;
}
void
gf_theme_options_set_ellipsis(GfThemeOptions *ops, const gchar *ellipsis) {
g_return_if_fail(ops);
g_return_if_fail(ellipsis);
if(ops->ellipsis)
g_free(ops->ellipsis);
ops->ellipsis = g_strdup(ellipsis);
}
const gchar *
gf_theme_options_get_ellipsis(GfThemeOptions *ops) {
g_return_val_if_fail(ops, NULL);
return ops->ellipsis;
}