From a7e62dc77b8fe59bf65c90775886090f17b44f98 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Fri, 12 Jun 2009 14:18:11 +0200 Subject: [PATCH] Remove hildon-banner-private.h * po/POTFILES.in * doc/Makefile.am * hildon/Makefile.am * hildon/hildon-banner-private.h * hildon/hildon-banner.c: Move HildonBannerPrivate to hildon-banner.c and remove hildon-banner-private.h Use a bit field to store private booleans. --- ChangeLog | 11 ++++++++ doc/Makefile.am | 3 +- hildon/Makefile.am | 3 +- hildon/hildon-banner-private.h | 59 ---------------------------------------- hildon/hildon-banner.c | 24 ++++++++++++++-- po/POTFILES.in | 1 - 6 files changed, 35 insertions(+), 66 deletions(-) delete mode 100644 hildon/hildon-banner-private.h diff --git a/ChangeLog b/ChangeLog index f9eb15d..1073786 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2009-06-12 Alberto Garcia + * po/POTFILES.in + * doc/Makefile.am + * hildon/Makefile.am + * hildon/hildon-banner-private.h + * hildon/hildon-banner.c: + Move HildonBannerPrivate to hildon-banner.c and remove + hildon-banner-private.h + Use a bit field to store private booleans. + +2009-06-12 Alberto Garcia + * hildon/hildon-app-menu.c (hildon_app_menu_map): Don't install a new idle function if there's already one installed. diff --git a/doc/Makefile.am b/doc/Makefile.am index f8e9705..58a032c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -20,8 +20,7 @@ HFILE_GLOB = $(top_srcdir)/hildon/*.h CFILE_GLOB = $(top_srcdir)/hildon/*.c -IGNORE_HFILES = hildon-banner-private.h \ - hildon-calendar-popup-private.h \ +IGNORE_HFILES = hildon-calendar-popup-private.h \ hildon-caption-private.h \ hildon-code-dialog-private.h \ hildon-color-button-private.h \ diff --git a/hildon/Makefile.am b/hildon/Makefile.am index 5b8ddee..849491c 100644 --- a/hildon/Makefile.am +++ b/hildon/Makefile.am @@ -161,8 +161,7 @@ libhildon_@API_VERSION_MAJOR@_include_HEADERS = \ $(libhildon_@API_VERSION_MAJOR@_public_headers) \ $(libhildon_@API_VERSION_MAJOR@_built_public_headers) -noinst_HEADERS = hildon-banner-private.h \ - hildon-calendar-popup-private.h \ +noinst_HEADERS = hildon-calendar-popup-private.h \ hildon-private.h \ hildon-caption-private.h \ hildon-code-dialog-private.h \ diff --git a/hildon/hildon-banner-private.h b/hildon/hildon-banner-private.h deleted file mode 100644 index 2eb2e07..0000000 --- a/hildon/hildon-banner-private.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is a part of hildon - * - * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved. - * - * Contact: Rodrigo Novo - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; version 2.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - * - */ - -#ifndef __HILDON_BANNER_PRIVATE_H__ -#define __HILDON_BANNER_PRIVATE_H__ - -G_BEGIN_DECLS - -typedef struct _HildonBannerPrivate HildonBannerPrivate; - -#define HILDON_BANNER_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - HILDON_TYPE_BANNER, HildonBannerPrivate)); - -struct _HildonBannerPrivate -{ - GtkWidget *main_item; - GtkWidget *alignment; - GtkWidget *label; - GtkWidget *layout; - guint timeout_id; - guint is_timed : 1, has_been_wrapped : 1, has_been_truncated : 1; - guint timeout; - GtkWindow *parent; - - gboolean require_override_dnd; - gboolean overrides_dnd; -}; - -/* For internal use of hildon libraries only */ -void G_GNUC_INTERNAL -hildon_gtk_label_set_text_n_lines (GtkLabel *label, - const gchar *text, - gint max_lines); - -G_END_DECLS - -#endif /* __HILDON_BANNER_PRIVATE_H__ */ diff --git a/hildon/hildon-banner.c b/hildon/hildon-banner.c index 9323778..11b8ca8 100644 --- a/hildon/hildon-banner.c +++ b/hildon/hildon-banner.c @@ -84,7 +84,6 @@ #undef HILDON_DISABLE_DEPRECATED #include "hildon-banner.h" -#include "hildon-banner-private.h" #include "hildon-defines.h" #include "hildon-gtk.h" @@ -215,9 +214,30 @@ hildon_banner_real_show_information (GtkWidget *widget, const gchar *text, gboolean override_dnd); - G_DEFINE_TYPE (HildonBanner, hildon_banner, GTK_TYPE_WINDOW) +typedef struct _HildonBannerPrivate HildonBannerPrivate; + +#define HILDON_BANNER_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ + HILDON_TYPE_BANNER, HildonBannerPrivate)); + +struct _HildonBannerPrivate +{ + GtkWidget *main_item; + GtkWidget *alignment; + GtkWidget *label; + GtkWidget *layout; + GtkWindow *parent; + guint timeout; + guint timeout_id; + guint is_timed : 1; + guint has_been_wrapped : 1; + guint has_been_truncated : 1; + guint require_override_dnd : 1; + guint overrides_dnd : 1; +}; + static GQuark hildon_banner_timed_quark (void) { diff --git a/po/POTFILES.in b/po/POTFILES.in index 4992e92..c99dacb 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -12,7 +12,6 @@ hildon/hildon-weekday-picker.c hildon/hildon-time-picker.c hildon/hildon-weekday-picker.h hildon/hildon-note.h -hildon/hildon-banner-private.h hildon/hildon-time-picker.h hildon/hildon-calendar.c hildon/hildon-calendar-popup.c -- 1.7.9.5