[Xfce4-commits] [xfce/exo] 01/01: Add exo_gtk_dialog_* public API and documentation
noreply at xfce.org
noreply at xfce.org
Sun Jul 9 15:25:41 CEST 2017
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/exo.
commit 09872036ed2e72d593a9a2a050726bc5df9f4ab2
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Jul 9 09:25:34 2017 -0400
Add exo_gtk_dialog_* public API and documentation
---
docs/reference/exo-docs.xml | 5 +++
docs/reference/exo-sections.txt | 2 ++
exo-desktop-item-edit/main.c | 5 +--
exo-helper/exo-helper-chooser-dialog.c | 4 +--
exo/Makefile.am | 4 ---
exo/exo-common.c | 60 ----------------------------------
exo/exo-common.h | 31 ------------------
exo/exo-gtk-extensions.c | 43 ++++++++++++++++++++++++
exo/exo-gtk-extensions.h | 17 ++++++----
exo/exo-private.c | 1 -
exo/exo-toolbars-editor-dialog.c | 6 ++--
exo/exo.symbols | 9 ++---
12 files changed, 74 insertions(+), 113 deletions(-)
diff --git a/docs/reference/exo-docs.xml b/docs/reference/exo-docs.xml
index db35600..ace5857 100644
--- a/docs/reference/exo-docs.xml
+++ b/docs/reference/exo-docs.xml
@@ -358,6 +358,11 @@
<xi:include href="xml/api-index-0.10.2.xml"><xi:fallback /></xi:include>
</index>
+ <index id="api-index-0.11.4">
+ <title>Added in 0.11.4</title>
+ <xi:include href="xml/api-index-0.11.4.xml"><xi:fallback /></xi:include>
+ </index>
+
<index id="api-index-deprecated">
<title>Deprecated symbols</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
diff --git a/docs/reference/exo-sections.txt b/docs/reference/exo-sections.txt
index a1fe34f..98bf661 100644
--- a/docs/reference/exo-sections.txt
+++ b/docs/reference/exo-sections.txt
@@ -392,6 +392,8 @@ exo_g_value_transform_negate
exo_gtk_object_destroy_later
exo_gtk_file_chooser_add_thumbnail_preview
exo_gtk_url_about_dialog_hook
+exo_gtk_dialog_get_action_area
+exo_gtk_dialog_add_secondary_button
</SECTION>
<SECTION>
diff --git a/exo-desktop-item-edit/main.c b/exo-desktop-item-edit/main.c
index 07c66a3..ae8c6f3 100644
--- a/exo-desktop-item-edit/main.c
+++ b/exo-desktop-item-edit/main.c
@@ -36,7 +36,8 @@
#include <gio/gio.h>
#include <libxfce4ui/libxfce4ui.h>
-#include <exo/exo-common.h>
+
+#include <exo/exo.h>
#include <exo-desktop-item-edit/exo-die-editor.h>
#include <exo-desktop-item-edit/exo-die-utils.h>
@@ -328,7 +329,7 @@ main (int argc, char **argv)
gtk_window_set_icon_name (GTK_WINDOW (dialog), ICON_NAMES[mode]);
button = gtk_button_new_with_mnemonic (_("_Help"));
- exo_dialog_add_secondary_button(GTK_DIALOG (dialog), GTK_WIDGET (button));
+ exo_gtk_dialog_add_secondary_button(GTK_DIALOG (dialog), GTK_WIDGET (button));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (exo_die_help), dialog);
gtk_widget_show (button);
diff --git a/exo-helper/exo-helper-chooser-dialog.c b/exo-helper/exo-helper-chooser-dialog.c
index 33669ef..8db9893 100644
--- a/exo-helper/exo-helper-chooser-dialog.c
+++ b/exo-helper/exo-helper-chooser-dialog.c
@@ -23,7 +23,7 @@
#include <gdk/gdkkeysyms.h>
#include <libxfce4ui/libxfce4ui.h>
-#include <exo/exo-common.h>
+#include <exo/exo.h>
#include <exo-helper/exo-helper-chooser-dialog.h>
@@ -104,7 +104,7 @@ exo_helper_chooser_dialog_init (ExoHelperChooserDialog *chooser_dialog)
/* add the "Help" button */
button = gtk_button_new_with_mnemonic (_("_Help"));
g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (exo_helper_chooser_dialog_show_help), chooser_dialog);
- exo_dialog_add_secondary_button (GTK_DIALOG (chooser_dialog), GTK_WIDGET (button));
+ exo_gtk_dialog_add_secondary_button (GTK_DIALOG (chooser_dialog), GTK_WIDGET (button));
gtk_widget_show (button);
notebook = gtk_notebook_new ();
diff --git a/exo/Makefile.am b/exo/Makefile.am
index 6ddddb5..e67916e 100644
--- a/exo/Makefile.am
+++ b/exo/Makefile.am
@@ -14,7 +14,6 @@ libexo_headers = \
exo-binding.h \
exo-cell-renderer-ellipsized-text.h \
exo-cell-renderer-icon.h \
- exo-common.h \
exo-execute.h \
exo-gdk-pixbuf-extensions.h \
exo-gtk-extensions.h \
@@ -59,7 +58,6 @@ libexo_1_la_SOURCES = \
exo-binding.c \
exo-cell-renderer-ellipsized-text.c \
exo-cell-renderer-icon.c \
- exo-common.c \
exo-config.c \
exo-execute.c \
exo-gdk-pixbuf-extensions.c \
@@ -124,7 +122,6 @@ lib_LTLIBRARIES += libexo-2.la
libexo_2_include_HEADERS = \
exo.h \
exo-binding.h \
- exo-common.h \
exo-config.h \
exo-execute.h \
exo-gdk-pixbuf-extensions.h \
@@ -151,7 +148,6 @@ libexo_2_la_SOURCES = \
exo-marshal.h \
exo-private.c \
exo-private.h \
- exo-common.c \
exo-config.c \
exo-execute.c \
exo-gdk-pixbuf-extensions.c \
diff --git a/exo/exo-common.c b/exo/exo-common.c
deleted file mode 100644
index c862645..0000000
--- a/exo/exo-common.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* vi:set et ai sw=2 sts=2 ts=2: */
-/*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <exo/exo-common.h>
-
-/**
- * exo_dialog_get_action_area:
- * @dialog : a #GtkDialog.
- *
- * Returns the action area of a #GtkDialog. The internal function has been
- * deprecated in GTK+, so this wraps and dispels the deprecation warning.
- *
- * Returns: the action area.
- **/
-GtkWidget *
-exo_dialog_get_action_area (GtkDialog *dialog)
-{
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- return gtk_dialog_get_action_area (dialog);
-G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
-/**
- * exo_dialog_add_secondary_button:
- * @dialog : a #GtkDialog.
- * @button : a #GtkButton to add and mark as secondary.
- *
- * Convenience function to add a secondary button to a #GtkDialog.
- **/
-void
-exo_dialog_add_secondary_button (GtkDialog *dialog,
- GtkWidget *button)
-{
- GtkWidget *button_box;
-
- button_box = exo_dialog_get_action_area (dialog);
- gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 0);
- gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (button_box), button, TRUE);
-}
diff --git a/exo/exo-common.h b/exo/exo-common.h
deleted file mode 100644
index ce5a0a6..0000000
--- a/exo/exo-common.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* vi:set et ai sw=2 sts=2 ts=2: */
-/*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __EXO_COMMON_H__
-#define __EXO_COMMON_H__
-
-#include <gtk/gtk.h>
-
-GtkWidget * exo_dialog_get_action_area (GtkDialog *dialog);
-
-void exo_dialog_add_secondary_button (GtkDialog *dialog,
- GtkWidget *button);
-
-#endif /* !__EXO_COMMON_H__ */
diff --git a/exo/exo-gtk-extensions.c b/exo/exo-gtk-extensions.c
index 0d68fa3..0686c1f 100644
--- a/exo/exo-gtk-extensions.c
+++ b/exo/exo-gtk-extensions.c
@@ -258,5 +258,48 @@ exo_gtk_url_about_dialog_hook (GtkAboutDialog *about_dialog,
+/**
+ * exo_gtk_dialog_get_action_area:
+ * @dialog : a #GtkDialog.
+ *
+ * Returns the action area of a #GtkDialog. The internal function has been
+ * deprecated in GTK+, so this wraps and dispels the deprecation warning.
+ *
+ * Returns: the action area.
+ *
+ * Since: 0.11.4
+ **/
+GtkWidget *
+exo_gtk_dialog_get_action_area (GtkDialog *dialog)
+{
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ return gtk_dialog_get_action_area (dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
+}
+
+
+
+/**
+ * exo_gtk_dialog_add_secondary_button:
+ * @dialog : a #GtkDialog.
+ * @button : a #GtkButton to add and mark as secondary.
+ *
+ * Convenience function to add a secondary button to a #GtkDialog.
+ *
+ * Since: 0.11.4
+ **/
+void
+exo_gtk_dialog_add_secondary_button (GtkDialog *dialog,
+ GtkWidget *button)
+{
+ GtkWidget *button_box;
+
+ button_box = exo_gtk_dialog_get_action_area (dialog);
+ gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 0);
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (button_box), button, TRUE);
+}
+
+
+
#define __EXO_GTK_EXTENSIONS_C__
#include <exo/exo-aliasdef.c>
diff --git a/exo/exo-gtk-extensions.h b/exo/exo-gtk-extensions.h
index cbc419c..e094a76 100644
--- a/exo/exo-gtk-extensions.h
+++ b/exo/exo-gtk-extensions.h
@@ -31,16 +31,21 @@
G_BEGIN_DECLS
#if GTK_CHECK_VERSION (3, 0, 0)
-void exo_gtk_object_destroy_later (GtkWidget *object);
+void exo_gtk_object_destroy_later (GtkWidget *object);
#else
-void exo_gtk_object_destroy_later (GtkObject *object);
+void exo_gtk_object_destroy_later (GtkObject *object);
#endif
-void exo_gtk_file_chooser_add_thumbnail_preview (GtkFileChooser *chooser);
+void exo_gtk_file_chooser_add_thumbnail_preview (GtkFileChooser *chooser);
-void exo_gtk_url_about_dialog_hook (GtkAboutDialog *about_dialog,
- const gchar *address,
- gpointer user_data);
+void exo_gtk_url_about_dialog_hook (GtkAboutDialog *about_dialog,
+ const gchar *address,
+ gpointer user_data);
+
+GtkWidget * exo_gtk_dialog_get_action_area (GtkDialog *dialog);
+
+void exo_gtk_dialog_add_secondary_button (GtkDialog *dialog,
+ GtkWidget *button);
G_END_DECLS
diff --git a/exo/exo-private.c b/exo/exo-private.c
index e1c98b9..a8e9a93 100644
--- a/exo/exo-private.c
+++ b/exo/exo-private.c
@@ -76,4 +76,3 @@ _exo_gtk_widget_send_focus_change (GtkWidget *widget,
g_object_unref (G_OBJECT (widget));
gdk_event_free (fevent);
}
-
diff --git a/exo/exo-toolbars-editor-dialog.c b/exo/exo-toolbars-editor-dialog.c
index 938d8ea..3f35bac 100644
--- a/exo/exo-toolbars-editor-dialog.c
+++ b/exo/exo-toolbars-editor-dialog.c
@@ -33,7 +33,7 @@
#include <libxfce4util/libxfce4util.h>
-#include <exo/exo-common.h>
+#include <exo/exo-gtk-extensions.h>
#include <exo/exo-private.h>
#include <exo/exo-string.h>
#include <exo/exo-toolbars-editor.h>
@@ -100,7 +100,7 @@ exo_toolbars_editor_dialog_init (ExoToolbarsEditorDialog *dialog)
button = gtk_button_new ();
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (exo_toolbars_editor_dialog_add_toolbar), dialog);
- gtk_box_pack_start (GTK_BOX (exo_dialog_get_action_area (GTK_DIALOG (dialog))), button, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (exo_gtk_dialog_get_action_area (GTK_DIALOG (dialog))), button, FALSE, TRUE, 0);
gtk_widget_show (button);
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
@@ -122,7 +122,7 @@ exo_toolbars_editor_dialog_init (ExoToolbarsEditorDialog *dialog)
button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy), dialog);
- gtk_box_pack_start (GTK_BOX (exo_dialog_get_action_area (GTK_DIALOG (dialog))), button, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (exo_gtk_dialog_get_action_area (GTK_DIALOG (dialog))), button, FALSE, TRUE, 0);
gtk_widget_show (button);
}
diff --git a/exo/exo.symbols b/exo/exo.symbols
index 9c3a659..b340038 100644
--- a/exo/exo.symbols
+++ b/exo/exo.symbols
@@ -19,12 +19,12 @@
/* This file lists all exported symbols. It is used to generate
* the gobject.def file used to control exports on Windows and the
- * exo-alias.h/exo-aliasdef.c files used to avoid PLT entries for
+ * exo-alias.h/exo-aliasdef.c files used to avoid PLT entries for
* internal uses of exported functions (see make-exo-alias.pl).
- *
+ *
* Every symbol must be included in the right
* #ifdef IN_HEADER(sym) #endif and
- * #ifdef IN_SOURCE(sym) #endif sections.
+ * #ifdef IN_SOURCE(sym) #endif sections.
*/
#ifdef ALL_FILES
@@ -119,6 +119,8 @@ exo_g_value_transform_negate
exo_gtk_object_destroy_later
exo_gtk_file_chooser_add_thumbnail_preview
exo_gtk_url_about_dialog_hook
+exo_gtk_dialog_get_action_area
+exo_gtk_dialog_add_secondary_button
#endif
#endif
@@ -376,4 +378,3 @@ exo_xsession_client_get_restart_command
exo_xsession_client_set_restart_command
#endif
#endif
-
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list