[gedit/zbrown/deteplification-src: 213/633] Remove all deprecated APIs
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/zbrown/deteplification-src: 213/633] Remove all deprecated APIs
- Date: Sat, 10 Apr 2021 12:47:58 +0000 (UTC)
commit f4a3d50a3da4aa0b8c3c5e7183be9a19fab64b1e
Author: Sébastien Wilmet <swilmet gnome org>
Date: Tue Mar 17 13:49:42 2020 +0100
Remove all deprecated APIs
Since there has been an API version bump.
I've checked that all removed symbols are no longer used by gedit and
gedit-plugins.
docs/reference/api-breaks.xml | 2 -
docs/reference/gedit-sections.txt | 2 -
gedit/gedit-utils.c | 105 --------------------------------------
gedit/gedit-utils.h | 13 -----
4 files changed, 122 deletions(-)
---
diff --git a/docs/reference/api-breaks.xml b/docs/reference/api-breaks.xml
index 0b15d9cca..267f65e23 100644
--- a/docs/reference/api-breaks.xml
+++ b/docs/reference/api-breaks.xml
@@ -24,13 +24,11 @@
<refsect1>
<title>3.36.0 -> 3.37.1</title>
<itemizedlist>
- <!--
<listitem>
<para>
All previously deprecated APIs have been removed.
</para>
</listitem>
- -->
<listitem>
<para>
The lockdown support has been removed (for the
diff --git a/docs/reference/gedit-sections.txt b/docs/reference/gedit-sections.txt
index 3bba51075..a7d2058d1 100644
--- a/docs/reference/gedit-sections.txt
+++ b/docs/reference/gedit-sections.txt
@@ -364,6 +364,4 @@ gedit_utils_is_valid_location
gedit_utils_location_get_dirname_for_display
gedit_utils_set_direct_save_filename
gedit_utils_newline_type_to_string
-gedit_utils_menu_position_under_widget
-gedit_utils_set_atk_relation
</SECTION>
diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c
index c2b6fe152..23bf91e6c 100644
--- a/gedit/gedit-utils.c
+++ b/gedit/gedit-utils.c
@@ -33,61 +33,6 @@
#include "gedit-debug.h"
-static void
-widget_get_origin (GtkWidget *widget,
- gint *x,
- gint *y)
-
-{
- GdkWindow *window;
-
- window = gtk_widget_get_window (widget);
- gdk_window_get_origin (window, x, y);
-}
-
-/**
- * gedit_utils_menu_position_under_widget:
- * @menu:
- * @x:
- * @y:
- * @push_in:
- * @user_data:
- *
- * Deprecated: 3.36: Use gtk_menu_popup_at_widget() instead.
- */
-void
-gedit_utils_menu_position_under_widget (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer user_data)
-{
- GtkWidget *widget;
- GtkRequisition requisition;
- GtkAllocation allocation;
-
- widget = GTK_WIDGET (user_data);
- widget_get_origin (widget, x, y);
-
- gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition,
- NULL);
-
- gtk_widget_get_allocation (widget, &allocation);
-
- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- {
- *x += allocation.x + allocation.width - requisition.width;
- }
- else
- {
- *x += allocation.x;
- }
-
- *y += allocation.y + allocation.height;
-
- *push_in = TRUE;
-}
-
gboolean
gedit_utils_menu_position_under_tree_view (GtkTreeView *tree_view,
GdkRectangle *rect)
@@ -149,43 +94,6 @@ gedit_utils_set_atk_name_description (GtkWidget *widget,
atk_object_set_description (aobj, description);
}
-/**
- * gedit_utils_set_atk_relation:
- * @obj1: specified widget.
- * @obj2: specified widget.
- * @rel_type: the type of relation to set up.
- *
- * This function establishes atk relation
- * between 2 specified widgets.
- *
- * Deprecated: 3.36: This function is no longer used by gedit. If you need it,
- * copy it.
- */
-void
-gedit_utils_set_atk_relation (GtkWidget *obj1,
- GtkWidget *obj2,
- AtkRelationType rel_type)
-{
- AtkObject *atk_obj1, *atk_obj2;
- AtkRelationSet *relation_set;
- AtkObject *targets[1];
- AtkRelation *relation;
-
- atk_obj1 = gtk_widget_get_accessible (obj1);
- atk_obj2 = gtk_widget_get_accessible (obj2);
-
- if (!(GTK_IS_ACCESSIBLE (atk_obj1)) || !(GTK_IS_ACCESSIBLE (atk_obj2)))
- return;
-
- relation_set = atk_object_ref_relation_set (atk_obj1);
- targets[0] = atk_obj2;
-
- relation = atk_relation_new (targets, 1, rel_type);
- atk_relation_set_add (relation_set, relation);
-
- g_object_unref (G_OBJECT (relation));
-}
-
void
gedit_warning (GtkWindow *parent, const gchar *format, ...)
{
@@ -302,19 +210,6 @@ gedit_utils_str_end_truncate (const gchar *string,
return gedit_utils_str_truncate (string, truncate_length, FALSE);
}
-/**
- * gedit_utils_make_valid_utf8:
- * @name:
- *
- * Returns:
- * Deprecated: 3.36: Use g_utf8_make_valid() instead.
- */
-gchar *
-gedit_utils_make_valid_utf8 (const char *name)
-{
- return g_utf8_make_valid (name, -1);
-}
-
static gchar *
uri_get_dirname (const gchar *uri)
{
diff --git a/gedit/gedit-utils.h b/gedit/gedit-utils.h
index a8ad0accd..88130fc60 100644
--- a/gedit/gedit-utils.h
+++ b/gedit/gedit-utils.h
@@ -72,19 +72,6 @@ GtkSourceCompressionType gedit_utils_get_compression_type_from_content_type (c
gchar *gedit_utils_set_direct_save_filename (GdkDragContext
*context);
const gchar *gedit_utils_newline_type_to_string (GtkSourceNewlineType
newline_type);
-
-G_DEPRECATED_FOR (gtk_menu_popup_at_widget)
-void gedit_utils_menu_position_under_widget (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer user_data);
-
-G_DEPRECATED
-void gedit_utils_set_atk_relation (GtkWidget *obj1,
- GtkWidget *obj2,
- AtkRelationType rel_type);
-
G_END_DECLS
#endif /* GEDIT_UTILS_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]