[file-roller/wip/jtojnar/engrampa-backports] gtk-utils: Delete some more unused functions
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller/wip/jtojnar/engrampa-backports] gtk-utils: Delete some more unused functions
- Date: Wed, 27 Jul 2022 17:19:40 +0000 (UTC)
commit a70ef71abeb792edce7d853f557449b8bc948979
Author: Jan Tojnar <jtojnar gmail com>
Date: Wed Jul 27 15:25:07 2022 +0200
gtk-utils: Delete some more unused functions
src/gtk-utils.c | 116 --------------------------------------------------------
src/gtk-utils.h | 12 ------
2 files changed, 128 deletions(-)
---
diff --git a/src/gtk-utils.c b/src/gtk-utils.c
index c09f164a..6ac7ab7a 100644
--- a/src/gtk-utils.c
+++ b/src/gtk-utils.c
@@ -23,8 +23,6 @@
#include <string.h>
#include "gtk-utils.h"
-#define LOAD_BUFFER_SIZE 65536
-
GtkWidget *
_gtk_message_dialog_new (GtkWindow *parent,
@@ -326,98 +324,6 @@ _gtk_entry_get_locale_text (GtkEntry *entry)
}
-void
-_gtk_label_set_locale_text (GtkLabel *label,
- const char *text)
-{
- char *utf8_text;
-
- utf8_text = g_locale_to_utf8 (text, -1, NULL, NULL, NULL);
- if (utf8_text != NULL) {
- gtk_label_set_text (label, utf8_text);
- g_free (utf8_text);
- }
- else
- gtk_label_set_text (label, "");
-}
-
-
-char *
-_gtk_label_get_locale_text (GtkLabel *label)
-{
- const char *utf8_text;
- char *text;
-
- utf8_text = gtk_label_get_text (label);
- if (utf8_text == NULL)
- return NULL;
-
- text = g_locale_from_utf8 (utf8_text, -1, NULL, NULL, NULL);
-
- return text;
-}
-
-
-void
-_gtk_entry_set_filename_text (GtkEntry *entry,
- const char *text)
-{
- char *utf8_text;
-
- utf8_text = g_filename_to_utf8 (text, -1, NULL, NULL, NULL);
- if (utf8_text != NULL) {
- gtk_entry_set_text (entry, utf8_text);
- g_free (utf8_text);
- }
- else
- gtk_entry_set_text (entry, "");
-}
-
-
-char *
-_gtk_entry_get_filename_text (GtkEntry *entry)
-{
- const char *utf8_text;
- char *text;
-
- utf8_text = gtk_entry_get_text (entry);
- if (utf8_text == NULL)
- return NULL;
-
- text = g_filename_from_utf8 (utf8_text, -1, NULL, NULL, NULL);
-
- return text;
-}
-
-
-void
-_gtk_label_set_filename_text (GtkLabel *label,
- const char *text)
-{
- char *utf8_text;
-
- utf8_text = g_filename_display_name (text);
- gtk_label_set_text (label, utf8_text);
- g_free (utf8_text);
-}
-
-
-char *
-_gtk_label_get_filename_text (GtkLabel *label)
-{
- const char *utf8_text;
- char *text;
-
- utf8_text = gtk_label_get_text (label);
- if (utf8_text == NULL)
- return NULL;
-
- text = g_filename_from_utf8 (utf8_text, -1, NULL, NULL, NULL);
-
- return text;
-}
-
-
GdkPixbuf *
_g_icon_get_pixbuf (GIcon *icon,
int icon_size,
@@ -447,28 +353,6 @@ _g_icon_get_pixbuf (GIcon *icon,
}
-GdkPixbuf *
-_g_mime_type_get_icon (const char *mime_type,
- int icon_size,
- GtkIconTheme *icon_theme)
-{
- GdkPixbuf *pixbuf = NULL;
- GIcon *icon;
-
- if (icon_theme == NULL)
- icon_theme = gtk_icon_theme_get_default ();
-
- icon = g_content_type_get_icon (mime_type);
- if (icon == NULL)
- icon = g_themed_icon_new ("text-x-generic");
- pixbuf = _g_icon_get_pixbuf (icon, icon_size, icon_theme);
-
- g_object_unref (icon);
-
- return pixbuf;
-}
-
-
void
_gtk_show_help_dialog (GtkWindow *parent,
const char *section)
diff --git a/src/gtk-utils.h b/src/gtk-utils.h
index 3c5c897a..e2eb3541 100644
--- a/src/gtk-utils.h
+++ b/src/gtk-utils.h
@@ -68,21 +68,9 @@ void _gtk_dialog_add_to_window_group (GtkDialog *dialog);
void _gtk_entry_set_locale_text (GtkEntry *entry,
const char *text);
char * _gtk_entry_get_locale_text (GtkEntry *entry);
-void _gtk_label_set_locale_text (GtkLabel *label,
- const char *text);
-char * _gtk_label_get_locale_text (GtkLabel *label);
-void _gtk_entry_set_filename_text (GtkEntry *entry,
- const char *text);
-char * _gtk_entry_get_filename_text (GtkEntry *entry);
-void _gtk_label_set_filename_text (GtkLabel *label,
- const char *text);
-char * _gtk_label_get_filename_text (GtkLabel *label);
GdkPixbuf * _g_icon_get_pixbuf (GIcon *icon,
int size,
GtkIconTheme *icon_theme);
-GdkPixbuf * _g_mime_type_get_icon (const char *mime_type,
- int icon_size,
- GtkIconTheme *icon_theme);
void _gtk_show_help_dialog (GtkWindow *parent,
const char *section);
GtkWidget * _gtk_builder_get_widget (GtkBuilder *builder,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]