Commit 5f12b693 authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz
Browse files

stop using egg_cell_renderer_text since we can ellipsize the

2004-11-04  Vincent Untz  <vincent@vuntz.net>

	* clock.c: (create_task_list): stop using egg_cell_renderer_text since
	we can ellipsize the GtkCellRendererText now
	(create_appointment_list): ditto
	* Makefile.am:
	* cut-n-paste/: kill
parent 307980d0
2004-11-04 Vincent Untz <vincent@vuntz.net>
* clock.c: (create_task_list): stop using egg_cell_renderer_text since
we can ellipsize the GtkCellRendererText now
(create_appointment_list): ditto
* Makefile.am:
* cut-n-paste/: kill
2004-11-01 Vincent Untz <vincent@vuntz.net>
* clock.c: stop including everything from libgnome and libgnomeui
......
SUBDIRS = cut-n-paste
INCLUDES = \
-I$(srcdir)/../../libpanel-applet \
-I$(top_builddir)/libpanel-applet \
......@@ -26,7 +24,6 @@ clock_applet_SOURCES = clock.c $(CALENDAR_SOURCES)
clock_applet_LDADD = \
../../libpanel-applet/libpanel-applet-2.la \
cut-n-paste/libclockcnp.la \
$(CLOCK_LIBS)
libexec_PROGRAMS = clock-applet
......
......@@ -62,7 +62,6 @@
#ifdef HAVE_LIBECAL
#include "calendar-client.h"
#include "cut-n-paste/eggcellrenderertext.h"
#endif
#define INTERNETSECOND (864)
......@@ -973,8 +972,8 @@ create_task_list (ClockData *cd,
/* Summary */
column = gtk_tree_view_column_new ();
cell = egg_cell_renderer_text_new ();
egg_cell_renderer_text_set_ellipsize (EGG_CELL_RENDERER_TEXT (cell), TRUE);
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_column_pack_start (column, cell, TRUE);
gtk_tree_view_column_set_attributes (column, cell,
"text", TASK_COLUMN_SUMMARY,
......@@ -1116,8 +1115,8 @@ create_appointment_list (ClockData *cd,
/* Summary */
column = gtk_tree_view_column_new ();
cell = egg_cell_renderer_text_new ();
egg_cell_renderer_text_set_ellipsize (EGG_CELL_RENDERER_TEXT (cell), TRUE);
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_column_pack_start (column, cell, TRUE);
gtk_tree_view_column_add_attribute (column, cell,
"text", APPOINTMENT_COLUMN_SUMMARY);
......
Makefile.in
Makefile
.deps
.libs
*.lo
*.la
libeelcnp.la
eggmarshalers.c
eggmarshalers.h
INCLUDES = $(WARN_CFLAGS) $(CLOCK_CFLAGS) -DEEL_OMIT_SELF_CHECK
noinst_LTLIBRARIES = libclockcnp.la
libclockcnp_la_SOURCES = \
eggcellrenderertext.h \
eggcellrenderertext.c \
eggtreeprivate.h \
eggintl.h \
$(EELFILES) \
eggmarshalers.h \
eggmarshalers.c
eggmarshalers.h: eggmarshalers.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=_egg_marshal > $@
eggmarshalers.c: eggmarshalers.list $(GLIB_GENMARSHAL)
echo "#include \"eggmarshalers.h\"" > $@ && \
$(GLIB_GENMARSHAL) $< --body --prefix=_egg_marshal >> $@
BUILT_SOURCES = eggmarshalers.c eggmarshalers.h
EXTRA_DIST = eggmarshalers.list
EELFILES = \
eel-pango-extensions.h \
eel-pango-extensions.c
EELDIR = $(srcdir)/../../../../eel/eel
regenerate-built-sources:
EELFILES="$(EELFILES)" EELDIR="$(EELDIR)" $(srcdir)/update-from-eel.sh
This diff is collapsed.
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* eel-pango-extensions.h - interface for new functions that conceptually
belong in pango. Perhaps some of these will be
actually rolled into pango someday.
Copyright (C) 2001 Anders Carlsson
The Eel Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Eel Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Eel Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: Anders Carlsson <andersca@gnu.org>
*/
#ifndef EEL_PANGO_EXTENSIONS_H
#define EEL_PANGO_EXTENSIONS_H
#include <pango/pango-layout.h>
typedef enum {
EEL_ELLIPSIZE_START,
EEL_ELLIPSIZE_MIDDLE,
EEL_ELLIPSIZE_END
} EelEllipsizeMode;
PangoAttrList *eel_pango_attr_list_copy_or_create (PangoAttrList *attr_list);
PangoAttrList *eel_pango_attr_list_apply_global_attribute (PangoAttrList *attr_list,
PangoAttribute *attr);
void eel_pango_layout_set_weight (PangoLayout *layout,
PangoWeight weight);
void eel_pango_layout_set_underline (PangoLayout *layout,
PangoUnderline underline);
void eel_pango_layout_set_font_desc_from_string (PangoLayout *layout,
const char *str);
int eel_pango_font_description_get_largest_fitting_font_size (const PangoFontDescription *font_desc,
PangoContext *context,
const char *text,
int available_width,
int minimum_acceptable_font_size,
int maximum_acceptable_font_size);
PangoRectangle eel_pango_layout_fit_to_dimensions (PangoLayout *layout,
int max_width,
int max_height);
/* caution: this function is expensive. */
void eel_pango_layout_set_text_ellipsized (PangoLayout *layout,
const char *string,
int width,
EelEllipsizeMode mode);
PangoContext * eel_pango_ft2_get_context (void);
#endif /* EEL_PANGO_EXTENSIONS_H */
This diff is collapsed.
/* eggcellrenderertext.h
* Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __EGG_CELL_RENDERER_TEXT_H__
#define __EGG_CELL_RENDERER_TEXT_H__
#include <pango/pango.h>
#include <gtk/gtkcellrenderer.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define EGG_TYPE_CELL_RENDERER_TEXT (egg_cell_renderer_text_get_type ())
#define EGG_CELL_RENDERER_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_CELL_RENDERER_TEXT, EggCellRendererText))
#define EGG_CELL_RENDERER_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_CELL_RENDERER_TEXT, EggCellRendererTextClass))
#define EGG_IS_CELL_RENDERER_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_CELL_RENDERER_TEXT))
#define EGG_IS_CELL_RENDERER_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_CELL_RENDERER_TEXT))
#define EGG_CELL_RENDERER_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_CELL_RENDERER_TEXT, EggCellRendererTextClass))
typedef struct _EggCellRendererText EggCellRendererText;
typedef struct _EggCellRendererTextClass EggCellRendererTextClass;
struct _EggCellRendererText
{
GtkCellRenderer parent;
/*< private >*/
gchar *text;
PangoFontDescription *font;
gdouble font_scale;
PangoColor foreground;
PangoColor background;
PangoAttrList *extra_attrs;
PangoUnderline underline_style;
gint rise;
gint fixed_height_rows;
guint strikethrough : 1;
guint ellipsize : 1;
guint editable : 1;
guint scale_set : 1;
guint foreground_set : 1;
guint background_set : 1;
guint underline_set : 1;
guint rise_set : 1;
guint strikethrough_set : 1;
guint editable_set : 1;
guint calc_fixed_height : 1;
};
struct _EggCellRendererTextClass
{
GtkCellRendererClass parent_class;
void (* edited) (EggCellRendererText *cell_renderer_text,
const gchar *path,
const gchar *new_text);
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved3) (void);
void (*_gtk_reserved4) (void);
};
GType egg_cell_renderer_text_get_type (void);
GtkCellRenderer *egg_cell_renderer_text_new (void);
void egg_cell_renderer_text_set_fixed_height_from_font (EggCellRendererText *renderer,
gint number_of_rows);
void egg_cell_renderer_text_set_ellipsize (EggCellRendererText *renderer,
gboolean ellipsize);
gboolean egg_cell_renderer_text_get_ellipsize (EggCellRendererText *renderer);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __EGG_CELL_RENDERER_TEXT_H__ */
#ifndef __EGG_INTL_H__
#define __EGG_INTL_H__
#include <libintl.h>
#ifndef _
#define _(x) gettext(x)
#endif
#ifndef N_
#define N_(x) x
#endif
#endif /* __EGG_INTL_H__ */
/* eggtreeprivate.h
* Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __EGG_TREE_PRIVATE_H__
#define __EGG_TREE_PRIVATE_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <gtk/gtk.h>
/* FIXME: do something to make sure we're not relying on gtk+ internals */
/* cool ABI compat hack */
#define EGG_CELL_RENDERER_INFO_KEY "gtk-cell-renderer-info"
typedef struct _EggCellRendererInfo EggCellRendererInfo;
struct _EggCellRendererInfo
{
GdkColor cell_background;
/* text renderer */
gulong focus_out_id;
/* toggle renderer */
guint inconsistent :1;
};
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __EGG_TREE_PRIVATE_H__ */
#!/bin/sh
function die() {
echo $*
exit 1
}
if test -z "$EELDIR"; then
echo "Must set EELDIR"
exit 1
fi
if test -z "$EELFILES"; then
echo "Must set EELFILES"
exit 1
fi
for FILE in $EELFILES; do
if cmp -s $EELDIR/$FILE $FILE; then
echo "File $FILE is unchanged"
else
cp $EELDIR/$FILE $FILE || die "Could not move $EELDIR/$FILE to $FILE"
echo "Updated $FILE"
fi
done
Supports Markdown
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