forked from AuroraMiddleware/gtk
remove unused function.
Fri Feb 4 14:16:31 2005 Manish Singh <yosh@gimp.org> * gtk/gtkaccelgroup.c (substitute_underscores): remove unused function. * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render): Add some extra parens for bitop order of operations disambiguiation. * gtk/gtkstock.c: Fix const confusion, make our own copy of the domain when setting a translate function. * tests/testcombo.c: removed unused variable.
This commit is contained in:
parent
8ccd6cba27
commit
cbf21238c3
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
Fri Feb 4 14:16:31 2005 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c (substitute_underscores): remove unused
|
||||
function.
|
||||
|
||||
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
|
||||
Add some extra parens for bitop order of operations disambiguiation.
|
||||
|
||||
* gtk/gtkstock.c: Fix const confusion, make our own copy of the
|
||||
domain when setting a translate function.
|
||||
|
||||
* tests/testcombo.c: removed unused variable.
|
||||
|
||||
2005-02-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstock.c (gtk_stock_lookup): Handle item->translation_domain
|
||||
|
@ -1,3 +1,16 @@
|
||||
Fri Feb 4 14:16:31 2005 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c (substitute_underscores): remove unused
|
||||
function.
|
||||
|
||||
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
|
||||
Add some extra parens for bitop order of operations disambiguiation.
|
||||
|
||||
* gtk/gtkstock.c: Fix const confusion, make our own copy of the
|
||||
domain when setting a translate function.
|
||||
|
||||
* tests/testcombo.c: removed unused variable.
|
||||
|
||||
2005-02-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstock.c (gtk_stock_lookup): Handle item->translation_domain
|
||||
|
@ -1,3 +1,16 @@
|
||||
Fri Feb 4 14:16:31 2005 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c (substitute_underscores): remove unused
|
||||
function.
|
||||
|
||||
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
|
||||
Add some extra parens for bitop order of operations disambiguiation.
|
||||
|
||||
* gtk/gtkstock.c: Fix const confusion, make our own copy of the
|
||||
domain when setting a translate function.
|
||||
|
||||
* tests/testcombo.c: removed unused variable.
|
||||
|
||||
2005-02-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstock.c (gtk_stock_lookup): Handle item->translation_domain
|
||||
|
@ -1186,19 +1186,6 @@ gtk_accelerator_name (guint accelerator_key,
|
||||
return accelerator;
|
||||
}
|
||||
|
||||
/* Underscores in key names are better displayed as spaces
|
||||
* E.g., Page_Up should be "Page Up"
|
||||
*/
|
||||
static void
|
||||
substitute_underscores (char *str)
|
||||
{
|
||||
char *p;
|
||||
|
||||
for (p = str; *p; p++)
|
||||
if (*p == '_')
|
||||
*p = ' ';
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_accelerator_get_label:
|
||||
* @accelerator_key: accelerator keyval
|
||||
|
@ -575,11 +575,11 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell,
|
||||
pixbuf = invisible;
|
||||
}
|
||||
else if (priv->follow_state &&
|
||||
(flags & (GTK_CELL_RENDERER_SELECTED|GTK_CELL_RENDERER_PRELIT) != 0))
|
||||
(flags & (GTK_CELL_RENDERER_SELECTED|GTK_CELL_RENDERER_PRELIT)) != 0)
|
||||
{
|
||||
GtkStateType state;
|
||||
|
||||
if (flags & GTK_CELL_RENDERER_SELECTED != 0)
|
||||
if ((flags & GTK_CELL_RENDERER_SELECTED) != 0)
|
||||
{
|
||||
if (GTK_WIDGET_HAS_FOCUS (widget))
|
||||
state = GTK_STATE_SELECTED;
|
||||
|
@ -436,9 +436,12 @@ gtk_stock_set_translate_func (const gchar *domain,
|
||||
GtkDestroyNotify notify)
|
||||
{
|
||||
GtkStockTranslateFunc *translate;
|
||||
|
||||
gchar *domainname;
|
||||
|
||||
domainname = g_strdup (domain);
|
||||
|
||||
translate = (GtkStockTranslateFunc *)
|
||||
g_hash_table_lookup (translate_hash, domain);
|
||||
g_hash_table_lookup (translate_hash, domainname);
|
||||
|
||||
if (translate)
|
||||
{
|
||||
@ -452,14 +455,16 @@ gtk_stock_set_translate_func (const gchar *domain,
|
||||
translate->data = data;
|
||||
translate->notify = notify;
|
||||
|
||||
g_hash_table_insert (translate_hash, domain, translate);
|
||||
g_hash_table_insert (translate_hash, domainname, translate);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
sgettext_swapped (const gchar *msgid,
|
||||
const gchar *domainname)
|
||||
gpointer data)
|
||||
{
|
||||
return g_strip_context (msgid, dgettext (domainname, msgid));
|
||||
gchar *domainname = data;
|
||||
|
||||
return (gchar *)g_strip_context (msgid, dgettext (domainname, msgid));
|
||||
}
|
||||
|
||||
|
||||
@ -475,7 +480,8 @@ init_stock_hash (void)
|
||||
|
||||
if (translate_hash == NULL)
|
||||
{
|
||||
translate_hash = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
translate_hash = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
g_free, NULL);
|
||||
|
||||
gtk_stock_set_translate_func (GETTEXT_PACKAGE,
|
||||
sgettext_swapped,
|
||||
|
@ -884,7 +884,6 @@ main (int argc, char **argv)
|
||||
GtkCellRenderer *renderer;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkTreeModel *model;
|
||||
GValue value = {0, };
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user