Some small header cleanups & fixes, and fix to translate all popup menus
(woohoo!): 2001-04-05 Gediminas Paulauskas <menesis@delfi.lt> * gal/widgets/e-popup-menu.c: Copied gnome_app_helper_gettext function here, and use it for translating menu names (they are passed from app as well as from gal in arrays with N_(), and domains differ). svn path=/trunk/; revision=9190
This commit is contained in:

committed by
Gediminas Paulauskas

parent
7210c85ade
commit
c77e63e2cc
@ -2,7 +2,6 @@
|
||||
#define _E_UTIL_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <glib.h>
|
||||
#include <gtk/gtktypeutils.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -24,13 +24,12 @@
|
||||
|
||||
#include "e-xml-utils.h"
|
||||
|
||||
#include "gal/util/e-i18n.h"
|
||||
#include <glib.h>
|
||||
#include <locale.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <gnome-xml/parser.h>
|
||||
#include <gnome-xml/xmlmemory.h>
|
||||
#include <libgnome/libgnome.h>
|
||||
#include "gal/util/e-i18n.h"
|
||||
|
||||
xmlNode *
|
||||
e_xml_get_child_by_name (const xmlNode *parent, const xmlChar *child_name)
|
||||
|
@ -8,10 +8,9 @@
|
||||
* (C) 2000 Helix Code, Inc.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include "gal/util/e-i18n.h"
|
||||
#include "gal-view-factory-etable.h"
|
||||
#include "gal-view-etable.h"
|
||||
#include <libgnome/gnome-defs.h>
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
|
||||
#define GVFE_CLASS(e) ((GalViewFactoryEtableClass *)((GtkObject *)e)->klass)
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
#ifndef __E_CANVAS_H__
|
||||
#define __E_CANVAS_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <libgnomeui/gnome-canvas.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -17,9 +17,35 @@ nnn *
|
||||
#include <gtk/gtksignal.h>
|
||||
#include <libgnomeui/gtkpixmapmenuitem.h>
|
||||
#include <libgnomeui/gnome-stock.h>
|
||||
|
||||
#include "e-popup-menu.h"
|
||||
#include "e-gui-utils.h"
|
||||
#include "gal/util/e-i18n.h"
|
||||
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
|
||||
#ifndef GNOME_APP_HELPER_H
|
||||
/* Copied this i18n function to use for the same purpose */
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define L_(x) gnome_app_helper_gettext(x)
|
||||
|
||||
static gchar *
|
||||
gnome_app_helper_gettext (const gchar *str)
|
||||
{
|
||||
char *s;
|
||||
|
||||
s = gettext (str);
|
||||
if ( s == str )
|
||||
s = dgettext (PACKAGE, str);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
#else
|
||||
#define L_(x) x
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Creates an item with an optional icon
|
||||
@ -86,7 +112,7 @@ e_popup_menu_create (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_m
|
||||
if ((!(seperator && last_item_seperator)) && !(menu_list [i].disable_mask & hide_mask)) {
|
||||
GtkWidget *item;
|
||||
|
||||
item = make_item (menu, seperator ? "" : _(menu_list[i].name), menu_list[i].pixname);
|
||||
item = make_item (menu, seperator ? "" : L_(menu_list[i].name), menu_list[i].pixname);
|
||||
gtk_menu_append (menu, item);
|
||||
|
||||
if (!menu_list[i].submenu) {
|
||||
|
@ -21,7 +21,6 @@
|
||||
#ifndef __E_REFLOW_H__
|
||||
#define __E_REFLOW_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <libgnomeui/gnome-canvas.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -8,9 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <libgnomeui/libgnomeui.h>
|
||||
|
||||
#include <libgnomeui/gnome-canvas.h>
|
||||
#include "e-cell-pixbuf.h"
|
||||
|
||||
static ECellClass *parent_class;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <math.h>
|
||||
#include <ctype.h>
|
||||
#include <unicode.h>
|
||||
#include <string.h>
|
||||
#include <gdk/gdkx.h> /* for BlackPixel */
|
||||
#include <gtk/gtkinvisible.h>
|
||||
#include <gtk/gtkmain.h>
|
||||
@ -34,12 +35,11 @@
|
||||
#include "gal/widgets/e-canvas.h"
|
||||
#include "gal/widgets/e-canvas-utils.h"
|
||||
#include "gal/widgets/e-unicode.h"
|
||||
#include "gal/util/e-text-event-processor-emacs-like.h"
|
||||
#include <libart_lgpl/art_affine.h>
|
||||
#include <libart_lgpl/art_rgb.h>
|
||||
#include <libart_lgpl/art_rgb_bitmap_affine.h>
|
||||
|
||||
#include "gal/util/e-text-event-processor-emacs-like.h"
|
||||
|
||||
#define BORDER_INDENT 4
|
||||
|
||||
enum {
|
||||
|
Reference in New Issue
Block a user