[gnome-control-center] user-accounts: Remove unused popup_menu_below_button function
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Remove unused popup_menu_below_button function
- Date: Tue, 13 Nov 2018 21:16:17 +0000 (UTC)
commit 4e31c3face8c502a233c3e7daf414948f5680acd
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Nov 9 09:22:46 2018 +1300
user-accounts: Remove unused popup_menu_below_button function
panels/user-accounts/um-utils.c | 28 ----------------------------
panels/user-accounts/um-utils.h | 6 ------
2 files changed, 34 deletions(-)
---
diff --git a/panels/user-accounts/um-utils.c b/panels/user-accounts/um-utils.c
index 5238cae89..f8def3ef5 100644
--- a/panels/user-accounts/um-utils.c
+++ b/panels/user-accounts/um-utils.c
@@ -334,34 +334,6 @@ clear_entry_validation_error (GtkEntry *entry)
g_object_set (entry, "caps-lock-warning", TRUE, NULL);
}
-void
-popup_menu_below_button (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- GtkWidget *button)
-{
- GtkRequisition menu_req;
- GtkTextDirection direction;
- GtkAllocation allocation;
-
- gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &menu_req);
-
- direction = gtk_widget_get_direction (button);
-
- gdk_window_get_origin (gtk_widget_get_window (button), x, y);
- gtk_widget_get_allocation (button, &allocation);
- *x += allocation.x;
- *y += allocation.y + allocation.height;
-
- if (direction == GTK_TEXT_DIR_LTR)
- *x += MAX (allocation.width - menu_req.width, 0);
- else if (menu_req.width > allocation.width)
- *x -= menu_req.width - allocation.width;
-
- *push_in = TRUE;
-}
-
/* Taken from defines.h in shadow-utils. On Linux, this value is much smaller
* than the sysconf limit LOGIN_NAME_MAX, and values larger than this will
* result in failure when running useradd. We could check UT_NAMESIZE instead,
diff --git a/panels/user-accounts/um-utils.h b/panels/user-accounts/um-utils.h
index 5127f1768..4970b22b3 100644
--- a/panels/user-accounts/um-utils.h
+++ b/panels/user-accounts/um-utils.h
@@ -38,12 +38,6 @@ void set_entry_validation_error (GtkEntry *entry,
const gchar *text);
void clear_entry_validation_error (GtkEntry *entry);
-void popup_menu_below_button (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- GtkWidget *button);
-
gboolean is_valid_name (const gchar *name);
gboolean is_valid_username (const gchar *name,
gchar **tip);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]