[Xfce4-commits] <libxfce4ui:master> Drop visibility code and use new xdt functions.
Nick Schermer
noreply at xfce.org
Sun Oct 18 13:44:04 CEST 2009
Updating branch refs/heads/master
to f0bf11f6433970749065685cf56a989371fffcdb (commit)
from 34a5e7dafb0c266bb7d2240f7b22e6c73c2d3edc (commit)
commit f0bf11f6433970749065685cf56a989371fffcdb
Author: Nick Schermer <nick at xfce.org>
Date: Sun Oct 18 13:36:32 2009 +0200
Drop visibility code and use new xdt functions.
autogen.sh | 2 +-
configure.in.in | 105 +-----------------------
libxfce4ui/Makefile.am | 18 +----
libxfce4ui/libxfce4ui-config.c | 6 --
libxfce4ui/libxfce4ui.symbols | 77 ++++--------------
libxfce4ui/make-libxfce4ui-alias.pl | 155 -----------------------------------
libxfce4ui/xfce-dialogs.c | 6 --
libxfce4ui/xfce-gdk-extensions.c | 6 --
libxfce4ui/xfce-gtk-extensions.c | 6 --
libxfce4ui/xfce-heading.c | 154 +++++++++++++++++------------------
libxfce4ui/xfce-heading.h | 22 +++---
libxfce4ui/xfce-spawn.c | 6 --
libxfce4ui/xfce-titled-dialog.c | 16 +---
13 files changed, 110 insertions(+), 469 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 6dd7849..26212d7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,6 +18,6 @@ EOF
exit 1
}
-XDT_AUTOGEN_REQUIRED_VERSION="4.7.0" exec xdt-autogen $@
+XDT_AUTOGEN_REQUIRED_VERSION="4.7.2" exec xdt-autogen $@
# vi:set ts=2 sw=2 et ai:
diff --git a/configure.in.in b/configure.in.in
index 506b9bf..ea6877c 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -192,112 +192,12 @@ GTK_DOC_CHECK([1.0])
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
-AC_ARG_ENABLE([debug],
-AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=libxfce4ui_debug_default@:>@]),
- [], [enable_debug=libxfce4ui_debug_default])
-AC_MSG_CHECKING([whether to enable debugging support])
-if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
- dnl Print the result
- AC_MSG_RESULT([$enable_debug])
-
- dnl Make sure we detect possible errors (if supported)
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wall -Werror"
- AC_MSG_CHECKING([whether $CC accepts -Wall -Werror])
- AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
- AC_MSG_RESULT([yes])
- PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall -Werror"
- ], [
- AC_MSG_RESULT([no])
- ])
- CFLAGS="$save_CFLAGS"
-
- dnl Paranoia for --enable-debug=full
- if test x"$enable_debug" = x"full"; then
- dnl Enable extensive debugging
- PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_ENABLE_DEBUG"
-
- dnl Use -O0 -g3 if the compiler supports it
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -O0 -g3"
- AC_MSG_CHECKING([whether $CC accepts -O0 -g3])
- AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
- AC_MSG_RESULT([yes])
- PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
- ], [
- AC_MSG_RESULT([no])
- ])
- CFLAGS="$save_CFLAGS"
- fi
-else
- dnl Print the result
- AC_MSG_RESULT([$enable_debug])
-
- dnl Disable debugging (release build)
- PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DNDEBUG"
-
- dnl Disable object cast checks
- PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS"
-
- dnl Disable all checks for --enable-debug=no
- if test x"$enable_debug" = x"no"; then
- PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
- fi
-fi
+XDT_FEATURE_DEBUG([libxfce4ui_debug_default])
dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
-AC_MSG_CHECKING([whether $LD accepts --as-needed])
-case `$LD --as-needed -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- LDFLAGS="$LDFLAGS -Wl,--as-needed"
- AC_MSG_RESULT([yes])
- ;;
-*)
- AC_MSG_RESULT([no])
- ;;
-esac
-AC_MSG_CHECKING([whether $LD accepts -O1])
-case `$LD -O1 -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -Wl,-O1"
- AC_MSG_RESULT([yes])
- ;;
-*)
- AC_MSG_RESULT([no])
- ;;
-esac
-
-dnl ****************************************
-dnl *** Check for ELF visibility support ***
-dnl ****************************************
-AC_ARG_ENABLE([visibility], AC_HELP_STRING([--disable-visibility], [Do not use ELF visibility attributes]), [], [enable_visibility=yes])
-have_gnuc_visibility=no
-if test x"$enable_visibility" != x"no"; then
- dnl Check whether the compiler supports the visibility attribute
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wall -Werror"
- AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
- AC_COMPILE_IFELSE(AC_LANG_SOURCE(
- [
- void __attribute__ ((visibility("default"))) test_default (void) {}
- void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
- int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
- ]),
- [
- have_gnuc_visibility=yes
- AC_MSG_RESULT([yes])
- ],
- [
- AC_MSG_RESULT([no])
- ])
- CFLAGS="$save_CFLAGS"
-fi
-if test x"$have_gnuc_visibility" = x"yes"; then
- PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DHAVE_GNUC_VISIBILITY"
-fi
-AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])
+XDT_FEATURE_LINKER_OPTS()
dnl *********************************
dnl *** Substitute platform flags ***
@@ -360,5 +260,4 @@ echo "* Startup Notification: no"
fi
echo
echo "* Debug Support: $enable_debug"
-echo "* GNU Visibility: $have_gnuc_visibility"
echo
diff --git a/libxfce4ui/Makefile.am b/libxfce4ui/Makefile.am
index 49b660a..5515d5a 100644
--- a/libxfce4ui/Makefile.am
+++ b/libxfce4ui/Makefile.am
@@ -28,8 +28,6 @@ libxfce4ui_headers = \
$(libxfce4ui_enum_headers)
libxfce4ui_built_sources = \
- libxfce4ui-alias.h \
- libxfce4ui-aliasdef.c \
libxfce4ui-enum-types.c \
libxfce4ui-enum-types.h \
libxfce4ui-marshal.c \
@@ -97,16 +95,8 @@ DISTCLEANFILES = \
BUILT_SOURCES = \
$(libxfce4ui_built_sources)
-if HAVE_GNUC_VISIBILITY
TESTS = \
abicheck.sh
-endif
-
-libxfce4ui-alias.h: make-libxfce4ui-alias.pl libxfce4ui.symbols
- $(PERL) $(srcdir)/make-libxfce4ui-alias.pl < $(srcdir)/libxfce4ui.symbols > libxfce4ui-alias.h
-
-libxfce4ui-aliasdef.c: make-libxfce4ui-alias.pl libxfce4ui.symbols
- $(PERL) $(srcdir)/make-libxfce4ui-alias.pl -def < $(srcdir)/libxfce4ui.symbols > libxfce4ui-aliasdef.c
libxfce4ui-marshal.h: stamp-libxfce4ui-marshal.h
@true
@@ -136,12 +126,11 @@ stamp-libxfce4ui-enum-types.h: $(libxfce4ui_enum_headers) Makefile
echo timestamp > $(@F)
libxfce4ui-enum-types.c: $(libxfce4ui_enum_headers) Makefile
( cd $(srcdir) && glib-mkenums \
- --fhead "#include <libxfce4ui/libxfce4ui.h>\n#include <libxfce4ui/libxfce4ui-alias.h>\n\n" \
+ --fhead "#include <libxfce4ui/libxfce4ui.h>\n\n" \
--fprod "/* enumerations from \"@filename@\" */\n\n" \
--vhead "GType\n at enum_name@_get_type(void)\n{\n static GType type = 0;\n\n if(!type) {\n static const G at Type@Value values[] = {"\
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n\t};\n\ttype = g_ at type@_register_static(\"@EnumName@\", values);\n }\n\n return type;\n}\n\n" \
- --ftail "\n#define __LIBXFCE4UI_ENUM_TYPES_C__\n#include \"libxfce4ui-aliasdef.c\"\n" \
$(libxfce4ui_enum_headers) ) > xgen-letc
cp xgen-letc libxfce4ui-enum-types.c
rm -f xgen-letc
@@ -152,9 +141,6 @@ dist-hook: all
EXTRA_DIST = \
abicheck.sh \
- libxfce4ui.symbols \
- libxfce4ui-alias.h \
- libxfce4ui-aliasdef.c \
- make-libxfce4ui-alias.pl
+ libxfce4ui.symbols
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/libxfce4ui/libxfce4ui-config.c b/libxfce4ui/libxfce4ui-config.c
index e5c1b2f..f477540 100644
--- a/libxfce4ui/libxfce4ui-config.c
+++ b/libxfce4ui/libxfce4ui-config.c
@@ -23,7 +23,6 @@
#endif
#include <libxfce4ui/libxfce4ui-config.h>
-#include <libxfce4ui/libxfce4ui-alias.h>
@@ -79,8 +78,3 @@ libxfce4ui_check_version (guint required_major,
return "Libxfce4ui version too old (micro mismatch)";
return NULL;
}
-
-
-
-#define __LIBXFCE4UI_CONFIG_C__
-#include <libxfce4ui/libxfce4ui-aliasdef.c>
diff --git a/libxfce4ui/libxfce4ui.symbols b/libxfce4ui/libxfce4ui.symbols
index 0d5cbe9..39288c4 100644
--- a/libxfce4ui/libxfce4ui.symbols
+++ b/libxfce4ui/libxfce4ui.symbols
@@ -18,83 +18,40 @@
* Boston, MA 02111-1307, USA.
*/
-/* This file lists all exported symbols. It is used to generate
- * the gobject.def file used to control exports on Windows and the
- * libxfce4ui-alias.h/libxfce4ui-aliasdef.c files used to avoid
- * PLT entries for internal uses of exported functions (see
- * make-libxfce4ui-alias.pl).
- *
- * Every symbol must be included in the right
- * #ifdef IN_HEADER(sym) #endif and
- * #ifdef IN_SOURCE(sym) #endif sections.
- */
-
-#ifdef ALL_FILES
-#define IN_HEADER(x) 1
-#define IN_SOURCE(x) 1
-#endif
-
/* libxfce4ui-config variables */
-#if IN_HEADER(__LIBXFCE4UI_CONFIG_H__)
-#if IN_SOURCE(__LIBXFCE4UI_CONFIG_C__)
-#ifdef INCLUDE_VARIABLES
libxfce4ui_major_version
libxfce4ui_minor_version
libxfce4ui_micro_version
-#endif
libxfce4ui_check_version
-#endif
-#endif
/* libxfce4ui-enum-types functions */
-#if IN_HEADER(__LIBXFCE4UI_ENUM_TYPES_H__)
-#if IN_SOURCE(__LIBXFCE4UI_ENUM_TYPES_C__)
xfce_sm_client_restart_style_get_type
xfce_sm_client_priority_get_type
xfce_sm_client_shutdown_hint_get_type
-#endif
-#endif
/* xfce-dialogs functions */
-#if IN_HEADER(__XFCE_DIALOGS_H__)
-#if IN_SOURCE(__XFCE_DIALOGS_C__)
-xfce_dialog_show_info G_GNUC_PRINTF (3, 4)
-xfce_dialog_show_warning G_GNUC_PRINTF (3, 4)
-xfce_dialog_show_error G_GNUC_PRINTF (3, 4)
-xfce_dialog_confirm G_GNUC_PRINTF (5, 6)
-xfce_message_dialog_new G_GNUC_NULL_TERMINATED G_GNUC_MALLOC
-xfce_message_dialog G_GNUC_NULL_TERMINATED
-#endif
-#endif
+xfce_dialog_show_info
+xfce_dialog_show_warning
+xfce_dialog_show_error
+xfce_dialog_confirm
+xfce_message_dialog_new
+xfce_message_dialog_new_valist
+xfce_message_dialog
/* xfce-gdk-extensions functions */
-#if IN_HEADER(__XFCE_GDK_EXTENSIONS_H__)
-#if IN_SOURCE(__XFCE_GDK_EXTENSIONS_C__)
xfce_gdk_screen_get_active
-#endif
-#endif
/* xfce-gtk-extensions functions */
-#if IN_HEADER(__XFCE_GTK_EXTENSIONS_H__)
-#if IN_SOURCE(__XFCE_GTK_EXTENSIONS_C__)
-xfce_gtk_button_new_mixed G_GNUC_MALLOC
-xfce_gtk_frame_box_new G_GNUC_MALLOC
-xfce_gtk_frame_box_new_with_content G_GNUC_MALLOC
+xfce_gtk_button_new_mixed
+xfce_gtk_frame_box_new
+xfce_gtk_frame_box_new_with_content
xfce_gtk_window_center_on_active_screen
-#endif
-#endif
/* xfce-spawn functions */
-#if IN_HEADER(__XFCE_SPAWN_H__)
-#if IN_SOURCE(__XFCE_SPAWN_C__)
xfce_spawn_on_screen
xfce_spawn_command_line_on_screen
-#endif
-#endif
/* xfce-sm-client functions */
-#if IN_HEADER(__XFCE_SM_CLIENT_H__)
-#if IN_SOURCE(__XFCE_SM_CLIENT_C__)
xfce_sm_client_get_type
xfce_sm_client_get_option_group
xfce_sm_client_get
@@ -106,6 +63,8 @@ xfce_sm_client_is_connected
xfce_sm_client_is_resumed
xfce_sm_client_set_desktop_file
xfce_sm_client_request_shutdown
+xfce_sm_client_get_current_directory
+xfce_sm_client_set_current_directory
xfce_sm_client_get_client_id
xfce_sm_client_get_state_file
xfce_sm_client_set_restart_style
@@ -114,16 +73,10 @@ xfce_sm_client_set_priority
xfce_sm_client_get_priority
xfce_sm_client_set_restart_command
xfce_sm_client_get_restart_command
-#endif
-#endif
/* xfce-titled-dialog functions */
-#if IN_HEADER(__XFCE_TITLED_DIALOG_H__)
-#if IN_SOURCE(__XFCE_TITLED_DIALOG_C__)
-xfce_titled_dialog_get_type G_GNUC_CONST
-xfce_titled_dialog_new G_GNUC_MALLOC
-xfce_titled_dialog_new_with_buttons G_GNUC_MALLOC
+xfce_titled_dialog_get_type
+xfce_titled_dialog_new
+xfce_titled_dialog_new_with_buttons
xfce_titled_dialog_get_subtitle
xfce_titled_dialog_set_subtitle
-#endif
-#endif
diff --git a/libxfce4ui/make-libxfce4ui-alias.pl b/libxfce4ui/make-libxfce4ui-alias.pl
deleted file mode 100644
index abae0a6..0000000
--- a/libxfce4ui/make-libxfce4ui-alias.pl
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/usr/bin/env perl -w
-#
-# Copyright (c) 2004 The GLib Development Team.
-# Copyright (c) 2005 Benedikt Meurer <benny at xfce.org>.
-#
-# 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.
-#
-
-my $option_def = 0;
-
-if (($#ARGV >= 0) && ($ARGV[0] eq "-def"))
- {
- shift;
- $option_def = 1;
- }
-
-print <<EOF;
-/* Generated by make-libxfce4ui-alias.pl. Do not edit this file. */
-
-#ifdef HAVE_GNUC_VISIBILITY
-
-#include <glib.h>
-
-EOF
-
-if ($option_def)
- {
- print <<EOF
-#undef IN_HEADER
-#define IN_HEADER(x) 1
-
-#undef IN_SOURCE
-#define IN_SOURCE defined
-
-EOF
- }
-else
- {
- print <<EOF
-#define IN_HEADER defined
-#define IN_SOURCE(x) 1
-
-EOF
- }
-
-my $in_comment = 0;
-my $in_skipped_section = 0;
-
-while (<>)
- {
- # ignore empty lines
- next if /^\s*$/;
-
- # skip comments
- if ($_ =~ /^\s*\/\*/)
- {
- $in_comment = 1;
- }
-
- if ($in_comment)
- {
- if ($_ =~ /\*\/\s$/)
- {
- $in_comment = 0;
- }
- next;
- }
-
- # handle ifdefs
- if ($_ =~ /^\#endif/)
- {
- if (!$in_skipped_section)
- {
- print $_;
- }
-
- $in_skipped_section = 0;
- next;
- }
-
- if ($_ =~ /^\#ifdef\s+(INCLUDE_VARIABLES|INCLUDE_INTERNAL_SYMBOLS|ALL_FILES)/)
- {
- $in_skipped_section = 1;
- }
-
- if ($in_skipped_section)
- {
- next;
- }
-
- if ($_ =~ /^\#ifn?def\s+G/)
- {
- print $_;
- next;
- }
-
- if ($_ =~ /^\#if.*(IN_SOURCE|IN_HEADER)/)
- {
- print $_;
- next;
- }
-
- chop;
- my $line = $_;
- my @words;
- my $attributes = "";
-
- @words = split (/ /, $line);
- my $symbol = shift (@words);
- chomp ($symbol);
- my $alias = "IA__".$symbol;
-
- # Drop any Win32 specific .def file syntax, but keep attributes
- foreach $word (@words)
- {
- $attributes = "$attributes $word" unless $word eq "PRIVATE";
- }
-
- if (!$option_def)
- {
- print <<EOF
-extern __typeof ($symbol) $alias __attribute((visibility("hidden")))$attributes;
-\#define $symbol $alias
-
-EOF
- }
- else
- {
- print <<EOF
-\#undef $symbol
-extern __typeof ($symbol) $symbol __attribute((alias("$alias"), visibility("default")));
-
-EOF
- }
- }
-
-print <<EOF;
-
-#endif /* HAVE_GNUC_VISIBILITY */
-EOF
-
-
diff --git a/libxfce4ui/xfce-dialogs.c b/libxfce4ui/xfce-dialogs.c
index a0c76e2..b41554c 100644
--- a/libxfce4ui/xfce-dialogs.c
+++ b/libxfce4ui/xfce-dialogs.c
@@ -38,7 +38,6 @@
#include <libxfce4ui/xfce-gtk-extensions.h>
#include <libxfce4ui/xfce-gdk-extensions.h>
#include <libxfce4ui/libxfce4ui-private.h>
-#include <libxfce4ui/libxfce4ui-alias.h>
@@ -497,8 +496,3 @@ xfce_message_dialog (GtkWindow *parent,
return response_id;
}
-
-
-
-#define __XFCE_DIALOGS_C__
-#include <libxfce4ui/libxfce4ui-aliasdef.c>
diff --git a/libxfce4ui/xfce-gdk-extensions.c b/libxfce4ui/xfce-gdk-extensions.c
index 45e9723..ac34220 100644
--- a/libxfce4ui/xfce-gdk-extensions.c
+++ b/libxfce4ui/xfce-gdk-extensions.c
@@ -29,7 +29,6 @@
#include <libxfce4ui/xfce-gdk-extensions.h>
#include <libxfce4ui/libxfce4ui-private.h>
-#include <libxfce4ui/libxfce4ui-alias.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
@@ -101,8 +100,3 @@ out:
return gdk_screen_get_default ();
#endif
}
-
-
-
-#define __XFCE_GDK_EXTENSIONS_C__
-#include <libxfce4ui/libxfce4ui-aliasdef.c>
diff --git a/libxfce4ui/xfce-gtk-extensions.c b/libxfce4ui/xfce-gtk-extensions.c
index 340e7ba..63cf282 100644
--- a/libxfce4ui/xfce-gtk-extensions.c
+++ b/libxfce4ui/xfce-gtk-extensions.c
@@ -28,7 +28,6 @@
#include <libxfce4ui/xfce-gtk-extensions.h>
#include <libxfce4ui/xfce-gdk-extensions.h>
#include <libxfce4ui/libxfce4ui-private.h>
-#include <libxfce4ui/libxfce4ui-alias.h>
/* Xfce frame padding */
#define PADDING (6)
@@ -196,8 +195,3 @@ xfce_gtk_window_center_on_active_screen (GtkWindow *window)
/* gtk+ handles the centering of the window properly after resize */
gtk_window_set_position (window, GTK_WIN_POS_CENTER);
}
-
-
-
-#define __XFCE_GTK_EXTENSIONS_C__
-#include <libxfce4ui/libxfce4ui-aliasdef.c>
diff --git a/libxfce4ui/xfce-heading.c b/libxfce4ui/xfce-heading.c
index 0425aee..40805db 100644
--- a/libxfce4ui/xfce-heading.c
+++ b/libxfce4ui/xfce-heading.c
@@ -31,7 +31,6 @@
#include <libxfce4ui/xfce-heading.h>
#include <libxfce4ui/libxfce4ui-private.h>
-#include <libxfce4ui/libxfce4ui-alias.h>
@@ -55,29 +54,29 @@ enum
-static void xfce_heading_finalize (GObject *object);
-static void xfce_heading_get_property (GObject *object,
+static void _xfce_heading_finalize (GObject *object);
+static void _xfce_heading_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
-static void xfce_heading_set_property (GObject *object,
+static void _xfce_heading_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
-static void xfce_heading_realize (GtkWidget *widget);
-static void xfce_heading_size_request (GtkWidget *widget,
+static void _xfce_heading_realize (GtkWidget *widget);
+static void _xfce_heading_size_request (GtkWidget *widget,
GtkRequisition *requisition);
-static void xfce_heading_style_set (GtkWidget *widget,
+static void _xfce_heading_style_set (GtkWidget *widget,
GtkStyle *previous_style);
-static gboolean xfce_heading_expose_event (GtkWidget *widget,
+static gboolean _xfce_heading_expose_event (GtkWidget *widget,
GdkEventExpose *event);
-static AtkObject *xfce_heading_get_accessible (GtkWidget *widget);
-static PangoLayout *xfce_heading_make_layout (XfceHeading *heading);
-static GdkPixbuf *xfce_heading_make_pixbuf (XfceHeading *heading);
-static GdkPixbuf *xfce_heading_get_icon (XfceHeading *heading);
-static const gchar *xfce_heading_get_icon_name (XfceHeading *heading);
-static const gchar *xfce_heading_get_subtitle (XfceHeading *heading);
-static const gchar *xfce_heading_get_title (XfceHeading *heading);
+static AtkObject *_xfce_heading_get_accessible (GtkWidget *widget);
+static PangoLayout *_xfce_heading_make_layout (XfceHeading *heading);
+static GdkPixbuf *_xfce_heading_make_pixbuf (XfceHeading *heading);
+static GdkPixbuf *_xfce_heading_get_icon (XfceHeading *heading);
+static const gchar *_xfce_heading_get_icon_name (XfceHeading *heading);
+static const gchar *_xfce_heading_get_subtitle (XfceHeading *heading);
+static const gchar *_xfce_heading_get_title (XfceHeading *heading);
@@ -91,12 +90,12 @@ struct _XfceHeadingPrivate
-G_DEFINE_TYPE (XfceHeading, xfce_heading, GTK_TYPE_WIDGET)
+G_DEFINE_TYPE (XfceHeading, _xfce_heading, GTK_TYPE_WIDGET)
static void
-xfce_heading_class_init (XfceHeadingClass *klass)
+_xfce_heading_class_init (XfceHeadingClass *klass)
{
GtkWidgetClass *gtkwidget_class;
GObjectClass *gobject_class;
@@ -105,16 +104,16 @@ xfce_heading_class_init (XfceHeadingClass *klass)
g_type_class_add_private (klass, sizeof (XfceHeadingPrivate));
gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->finalize = xfce_heading_finalize;
- gobject_class->get_property = xfce_heading_get_property;
- gobject_class->set_property = xfce_heading_set_property;
+ gobject_class->finalize = _xfce_heading_finalize;
+ gobject_class->get_property = _xfce_heading_get_property;
+ gobject_class->set_property = _xfce_heading_set_property;
gtkwidget_class = GTK_WIDGET_CLASS (klass);
- gtkwidget_class->realize = xfce_heading_realize;
- gtkwidget_class->size_request = xfce_heading_size_request;
- gtkwidget_class->style_set = xfce_heading_style_set;
- gtkwidget_class->expose_event = xfce_heading_expose_event;
- gtkwidget_class->get_accessible = xfce_heading_get_accessible;
+ gtkwidget_class->realize = _xfce_heading_realize;
+ gtkwidget_class->size_request = _xfce_heading_size_request;
+ gtkwidget_class->style_set = _xfce_heading_style_set;
+ gtkwidget_class->expose_event = _xfce_heading_expose_event;
+ gtkwidget_class->get_accessible = _xfce_heading_get_accessible;
/**
* XfceHeading:icon:
@@ -190,7 +189,7 @@ xfce_heading_class_init (XfceHeadingClass *klass)
static void
-xfce_heading_init (XfceHeading *heading)
+_xfce_heading_init (XfceHeading *heading)
{
/* setup the private data */
heading->priv = XFCE_HEADING_GET_PRIVATE (heading);
@@ -202,7 +201,7 @@ xfce_heading_init (XfceHeading *heading)
static void
-xfce_heading_finalize (GObject *object)
+_xfce_heading_finalize (GObject *object)
{
XfceHeading *heading = XFCE_HEADING (object);
@@ -214,13 +213,13 @@ xfce_heading_finalize (GObject *object)
g_free (heading->priv->subtitle);
g_free (heading->priv->title);
- (*G_OBJECT_CLASS (xfce_heading_parent_class)->finalize) (object);
+ (*G_OBJECT_CLASS (_xfce_heading_parent_class)->finalize) (object);
}
static void
-xfce_heading_get_property (GObject *object,
+_xfce_heading_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
@@ -230,19 +229,19 @@ xfce_heading_get_property (GObject *object,
switch (prop_id)
{
case PROP_ICON:
- g_value_set_object (value, xfce_heading_get_icon (heading));
+ g_value_set_object (value, _xfce_heading_get_icon (heading));
break;
case PROP_ICON_NAME:
- g_value_set_string (value, xfce_heading_get_icon_name (heading));
+ g_value_set_string (value, _xfce_heading_get_icon_name (heading));
break;
case PROP_SUBTITLE:
- g_value_set_string (value, xfce_heading_get_subtitle (heading));
+ g_value_set_string (value, _xfce_heading_get_subtitle (heading));
break;
case PROP_TITLE:
- g_value_set_string (value, xfce_heading_get_title (heading));
+ g_value_set_string (value, _xfce_heading_get_title (heading));
break;
default:
@@ -254,7 +253,7 @@ xfce_heading_get_property (GObject *object,
static void
-xfce_heading_set_property (GObject *object,
+_xfce_heading_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
@@ -264,19 +263,19 @@ xfce_heading_set_property (GObject *object,
switch (prop_id)
{
case PROP_ICON:
- xfce_heading_set_icon (heading, g_value_get_object (value));
+ _xfce_heading_set_icon (heading, g_value_get_object (value));
break;
case PROP_ICON_NAME:
- xfce_heading_set_icon_name (heading, g_value_get_string (value));
+ _xfce_heading_set_icon_name (heading, g_value_get_string (value));
break;
case PROP_SUBTITLE:
- xfce_heading_set_subtitle (heading, g_value_get_string (value));
+ _xfce_heading_set_subtitle (heading, g_value_get_string (value));
break;
case PROP_TITLE:
- xfce_heading_set_title (heading, g_value_get_string (value));
+ _xfce_heading_set_title (heading, g_value_get_string (value));
break;
default:
@@ -288,7 +287,7 @@ xfce_heading_set_property (GObject *object,
static void
-xfce_heading_realize (GtkWidget *widget)
+_xfce_heading_realize (GtkWidget *widget)
{
GdkWindowAttr attributes;
@@ -322,7 +321,7 @@ xfce_heading_realize (GtkWidget *widget)
static void
-xfce_heading_size_request (GtkWidget *widget,
+_xfce_heading_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
XfceHeading *heading = XFCE_HEADING (widget);
@@ -334,12 +333,12 @@ xfce_heading_size_request (GtkWidget *widget,
gint pixbuf_height = 0;
/* determine the dimensions of the title text */
- layout = xfce_heading_make_layout (heading);
+ layout = _xfce_heading_make_layout (heading);
pango_layout_get_pixel_size (layout, &layout_width, &layout_height);
g_object_unref (G_OBJECT (layout));
/* determine the dimensions of the pixbuf */
- pixbuf = xfce_heading_make_pixbuf (heading);
+ pixbuf = _xfce_heading_make_pixbuf (heading);
if (G_LIKELY (pixbuf != NULL))
{
pixbuf_width = gdk_pixbuf_get_width (pixbuf);
@@ -359,7 +358,7 @@ xfce_heading_size_request (GtkWidget *widget,
static void
-xfce_heading_style_set (GtkWidget *widget,
+_xfce_heading_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
/* check if we're already realized */
@@ -373,7 +372,7 @@ xfce_heading_style_set (GtkWidget *widget,
static gboolean
-xfce_heading_expose_event (GtkWidget *widget,
+_xfce_heading_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
XfceHeading *heading = XFCE_HEADING (widget);
@@ -392,7 +391,7 @@ xfce_heading_expose_event (GtkWidget *widget,
x = (rtl ? widget->allocation.width - XFCE_HEADING_BORDER : XFCE_HEADING_BORDER);
/* check if we have a pixbuf to render */
- pixbuf = xfce_heading_make_pixbuf (heading);
+ pixbuf = _xfce_heading_make_pixbuf (heading);
if (G_LIKELY (pixbuf != NULL))
{
/* determine the pixbuf dimensions */
@@ -415,7 +414,7 @@ xfce_heading_expose_event (GtkWidget *widget,
}
/* generate the title layout */
- layout = xfce_heading_make_layout (heading);
+ layout = _xfce_heading_make_layout (heading);
pango_layout_get_pixel_size (layout, &width, &height);
/* determine the vertical position */
@@ -434,11 +433,11 @@ xfce_heading_expose_event (GtkWidget *widget,
static AtkObject*
-xfce_heading_get_accessible (GtkWidget *widget)
+_xfce_heading_get_accessible (GtkWidget *widget)
{
AtkObject *object;
- object = (*GTK_WIDGET_CLASS (xfce_heading_parent_class)->get_accessible) (widget);
+ object = (*GTK_WIDGET_CLASS (_xfce_heading_parent_class)->get_accessible) (widget);
atk_object_set_role (object, ATK_ROLE_HEADER);
return object;
@@ -447,7 +446,7 @@ xfce_heading_get_accessible (GtkWidget *widget)
static PangoLayout*
-xfce_heading_make_layout (XfceHeading *heading)
+_xfce_heading_make_layout (XfceHeading *heading)
{
PangoAttribute *attribute;
PangoAttrList *attr_list;
@@ -498,7 +497,7 @@ xfce_heading_make_layout (XfceHeading *heading)
static GdkPixbuf*
-xfce_heading_make_pixbuf (XfceHeading *heading)
+_xfce_heading_make_pixbuf (XfceHeading *heading)
{
GtkIconTheme *icon_theme;
GdkPixbuf *pixbuf = NULL;
@@ -527,14 +526,14 @@ xfce_heading_make_pixbuf (XfceHeading *heading)
/**
- * xfce_heading_new:
+ * _xfce_heading_new:
*
* Allocates a new #XfceHeading instance.
*
* Return value: the newly allocated #XfceHeading.
**/
GtkWidget*
-xfce_heading_new (void)
+_xfce_heading_new (void)
{
return g_object_new (XFCE_TYPE_HEADING, NULL);
}
@@ -542,7 +541,7 @@ xfce_heading_new (void)
/**
- * xfce_heading_get_icon:
+ * _xfce_heading_get_icon:
* @heading : a #XfceHeading.
*
* Returns the #GdkPixbuf that was set as icon for
@@ -552,7 +551,7 @@ xfce_heading_new (void)
* Return value: the icon for @heading, or %NULL.
**/
static GdkPixbuf*
-xfce_heading_get_icon (XfceHeading *heading)
+_xfce_heading_get_icon (XfceHeading *heading)
{
g_return_val_if_fail (XFCE_IS_HEADING (heading), NULL);
return heading->priv->icon;
@@ -561,17 +560,17 @@ xfce_heading_get_icon (XfceHeading *heading)
/**
- * xfce_heading_set_icon:
+ * _xfce_heading_set_icon:
* @heading : a #XfceHeading.
* @icon : the new icon or %NULL.
*
* If @icon is not %NULL, @heading will display the new @icon
* aside the title. Else, if @icon is %NULL no icon is displayed
- * unless an icon name was set with xfce_heading_set_icon_name().
+ * unless an icon name was set with _xfce_heading_set_icon_name().
**/
void
-xfce_heading_set_icon (XfceHeading *heading,
- GdkPixbuf *icon)
+_xfce_heading_set_icon (XfceHeading *heading,
+ GdkPixbuf *icon)
{
g_return_if_fail (XFCE_IS_HEADING (heading));
g_return_if_fail (icon == NULL || GDK_IS_PIXBUF (icon));
@@ -601,17 +600,17 @@ xfce_heading_set_icon (XfceHeading *heading,
/**
- * xfce_heading_get_icon_name:
+ * _xfce_heading_get_icon_name:
* @heading : a #XfceHeading.
*
* Returns the icon name previously set by a call to
- * xfce_heading_set_icon_name() or %NULL if no icon name
+ * _xfce_heading_set_icon_name() or %NULL if no icon name
* is set for @heading.
*
* Return value: the icon name for @heading, or %NULL.
**/
static const gchar*
-xfce_heading_get_icon_name (XfceHeading *heading)
+_xfce_heading_get_icon_name (XfceHeading *heading)
{
g_return_val_if_fail (XFCE_IS_HEADING (heading), NULL);
return heading->priv->icon_name;
@@ -620,17 +619,17 @@ xfce_heading_get_icon_name (XfceHeading *heading)
/**
- * xfce_heading_set_icon_name:
+ * _xfce_heading_set_icon_name:
* @heading : a #XfceHeading.
* @icon_name : the new icon name, or %NULL.
*
* If @icon_name is not %NULL and the "icon" property is set to
- * %NULL, see xfce_heading_set_icon(), the @heading will display
+ * %NULL, see _xfce_heading_set_icon(), the @heading will display
* the name icon identified by the @icon_name.
**/
void
-xfce_heading_set_icon_name (XfceHeading *heading,
- const gchar *icon_name)
+_xfce_heading_set_icon_name (XfceHeading *heading,
+ const gchar *icon_name)
{
g_return_if_fail (XFCE_IS_HEADING (heading));
@@ -650,7 +649,7 @@ xfce_heading_set_icon_name (XfceHeading *heading,
/**
- * xfce_heading_get_subtitle:
+ * _xfce_heading_get_subtitle:
* @heading : a #XfceHeading.
*
* Returns the sub title displayed below the
@@ -660,7 +659,7 @@ xfce_heading_set_icon_name (XfceHeading *heading,
* Return value: the subtitle of @heading, or %NULL.
**/
static const gchar*
-xfce_heading_get_subtitle (XfceHeading *heading)
+_xfce_heading_get_subtitle (XfceHeading *heading)
{
g_return_val_if_fail (XFCE_IS_HEADING (heading), NULL);
return heading->priv->subtitle;
@@ -669,7 +668,7 @@ xfce_heading_get_subtitle (XfceHeading *heading)
/**
- * xfce_heading_set_subtitle:
+ * _xfce_heading_set_subtitle:
* @heading : a #XfceHeading.
* @subtitle : the new subtitle for @heading, or %NULL.
*
@@ -677,8 +676,8 @@ xfce_heading_get_subtitle (XfceHeading *heading)
* will be displayed by @heading below the main title.
**/
void
-xfce_heading_set_subtitle (XfceHeading *heading,
- const gchar *subtitle)
+_xfce_heading_set_subtitle (XfceHeading *heading,
+ const gchar *subtitle)
{
g_return_if_fail (XFCE_IS_HEADING (heading));
g_return_if_fail (subtitle == NULL || g_utf8_validate (subtitle, -1, NULL));
@@ -699,7 +698,7 @@ xfce_heading_set_subtitle (XfceHeading *heading,
/**
- * xfce_heading_get_title:
+ * _xfce_heading_get_title:
* @heading : a #XfceHeading.
*
* Returns the title displayed by the @heading.
@@ -707,7 +706,7 @@ xfce_heading_set_subtitle (XfceHeading *heading,
* Return value: the title displayed by the @heading.
**/
static const gchar*
-xfce_heading_get_title (XfceHeading *heading)
+_xfce_heading_get_title (XfceHeading *heading)
{
g_return_val_if_fail (XFCE_IS_HEADING (heading), NULL);
return heading->priv->title;
@@ -716,7 +715,7 @@ xfce_heading_get_title (XfceHeading *heading)
/**
- * xfce_heading_set_title:
+ * _xfce_heading_set_title:
* @heading : a #XfceHeading.
* @title : the new title for the @heading.
*
@@ -724,8 +723,8 @@ xfce_heading_get_title (XfceHeading *heading)
* specified @title.
**/
void
-xfce_heading_set_title (XfceHeading *heading,
- const gchar *title)
+_xfce_heading_set_title (XfceHeading *heading,
+ const gchar *title)
{
g_return_if_fail (XFCE_IS_HEADING (heading));
g_return_if_fail (title == NULL || g_utf8_validate (title, -1, NULL));
@@ -742,8 +741,3 @@ xfce_heading_set_title (XfceHeading *heading,
/* notify listeners */
g_object_notify (G_OBJECT (heading), "title");
}
-
-
-
-#define __XFCE_HEADING_C__
-#include <libxfce4ui/libxfce4ui-aliasdef.c>
diff --git a/libxfce4ui/xfce-heading.h b/libxfce4ui/xfce-heading.h
index 2f81e67..9ad1f01 100644
--- a/libxfce4ui/xfce-heading.h
+++ b/libxfce4ui/xfce-heading.h
@@ -33,7 +33,7 @@ typedef struct _XfceHeadingPrivate XfceHeadingPrivate;
typedef struct _XfceHeadingClass XfceHeadingClass;
typedef struct _XfceHeading XfceHeading;
-#define XFCE_TYPE_HEADING (xfce_heading_get_type ())
+#define XFCE_TYPE_HEADING (_xfce_heading_get_type ())
#define XFCE_HEADING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_HEADING, XfceHeading))
#define XFCE_HEADING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_HEADING, XfceHeadingClass))
#define XFCE_IS_HEADING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_HEADING))
@@ -53,21 +53,21 @@ struct _XfceHeading
XfceHeadingPrivate *priv;
};
-G_GNUC_INTERNAL GType xfce_heading_get_type (void) G_GNUC_CONST;
+GType _xfce_heading_get_type (void) G_GNUC_CONST;
-G_GNUC_INTERNAL GtkWidget *xfce_heading_new (void) G_GNUC_MALLOC;
+GtkWidget *_xfce_heading_new (void) G_GNUC_MALLOC;
-G_GNUC_INTERNAL void xfce_heading_set_icon (XfceHeading *heading,
- GdkPixbuf *icon);
+void _xfce_heading_set_icon (XfceHeading *heading,
+ GdkPixbuf *icon);
-G_GNUC_INTERNAL void xfce_heading_set_icon_name (XfceHeading *heading,
- const gchar *icon_name);
+void _xfce_heading_set_icon_name (XfceHeading *heading,
+ const gchar *icon_name);
-G_GNUC_INTERNAL void xfce_heading_set_subtitle (XfceHeading *heading,
- const gchar *subtitle);
+void _xfce_heading_set_subtitle (XfceHeading *heading,
+ const gchar *subtitle);
-G_GNUC_INTERNAL void xfce_heading_set_title (XfceHeading *heading,
- const gchar *title);
+void _xfce_heading_set_title (XfceHeading *heading,
+ const gchar *title);
G_END_DECLS
diff --git a/libxfce4ui/xfce-spawn.c b/libxfce4ui/xfce-spawn.c
index 2ba5fc5..91ec977 100644
--- a/libxfce4ui/xfce-spawn.c
+++ b/libxfce4ui/xfce-spawn.c
@@ -44,7 +44,6 @@
#include <libxfce4ui/xfce-spawn.h>
#include <libxfce4ui/xfce-gdk-extensions.h>
#include <libxfce4ui/libxfce4ui-private.h>
-#include <libxfce4ui/libxfce4ui-alias.h>
/* the maximum time for an application to startup */
#define XFCE_SPAWN_STARTUP_TIMEOUT (30 * 1000)
@@ -410,8 +409,3 @@ xfce_spawn_command_line_on_screen (GdkScreen *screen,
return succeed;
}
-
-
-
-#define __XFCE_SPAWN_C__
-#include <libxfce4ui/libxfce4ui-aliasdef.c>
diff --git a/libxfce4ui/xfce-titled-dialog.c b/libxfce4ui/xfce-titled-dialog.c
index e8c350a..fea4ab5 100644
--- a/libxfce4ui/xfce-titled-dialog.c
+++ b/libxfce4ui/xfce-titled-dialog.c
@@ -31,7 +31,6 @@
#include <libxfce4ui/xfce-heading.h>
#include <libxfce4ui/xfce-titled-dialog.h>
#include <libxfce4ui/libxfce4ui-private.h>
-#include <libxfce4ui/libxfce4ui-alias.h>
#define XFCE_TITLED_DIALOG_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFCE_TYPE_TITLED_DIALOG, XfceTitledDialogPrivate))
@@ -132,7 +131,7 @@ xfce_titled_dialog_init (XfceTitledDialog *titled_dialog)
gtk_widget_show (vbox);
/* add the heading to the window */
- titled_dialog->priv->heading = xfce_heading_new ();
+ titled_dialog->priv->heading = _xfce_heading_new ();
gtk_box_pack_start (GTK_BOX (vbox), titled_dialog->priv->heading, FALSE, FALSE, 0);
gtk_widget_show (titled_dialog->priv->heading);
@@ -237,9 +236,9 @@ static void
xfce_titled_dialog_update_heading (XfceTitledDialog *titled_dialog)
{
/* update the heading properties using the window property values */
- xfce_heading_set_icon (XFCE_HEADING (titled_dialog->priv->heading), gtk_window_get_icon (GTK_WINDOW (titled_dialog)));
- xfce_heading_set_icon_name (XFCE_HEADING (titled_dialog->priv->heading), gtk_window_get_icon_name (GTK_WINDOW (titled_dialog)));
- xfce_heading_set_title (XFCE_HEADING (titled_dialog->priv->heading), gtk_window_get_title (GTK_WINDOW (titled_dialog)));
+ _xfce_heading_set_icon (XFCE_HEADING (titled_dialog->priv->heading), gtk_window_get_icon (GTK_WINDOW (titled_dialog)));
+ _xfce_heading_set_icon_name (XFCE_HEADING (titled_dialog->priv->heading), gtk_window_get_icon_name (GTK_WINDOW (titled_dialog)));
+ _xfce_heading_set_title (XFCE_HEADING (titled_dialog->priv->heading), gtk_window_get_title (GTK_WINDOW (titled_dialog)));
}
@@ -351,13 +350,8 @@ xfce_titled_dialog_set_subtitle (XfceTitledDialog *titled_dialog,
titled_dialog->priv->subtitle = g_strdup (subtitle);
/* update the subtitle for the heading */
- xfce_heading_set_subtitle (XFCE_HEADING (titled_dialog->priv->heading), subtitle);
+ _xfce_heading_set_subtitle (XFCE_HEADING (titled_dialog->priv->heading), subtitle);
/* notify listeners */
g_object_notify (G_OBJECT (titled_dialog), "subtitle");
}
-
-
-
-#define __XFCE_TITLED_DIALOG_C__
-#include <libxfce4ui/libxfce4ui-aliasdef.c>
More information about the Xfce4-commits
mailing list