1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-07-07 09:29:30 +00:00

util: Remove unused code

This commit is contained in:
Evangelos Ribeiro Tzaras 2022-10-10 08:50:21 +02:00
parent 3d541c4be6
commit 0b495de9eb
2 changed files with 0 additions and 85 deletions

View file

@ -25,75 +25,6 @@
#include "util.h"
void
calls_object_unref (gpointer object)
{
if (object) {
g_object_unref (object);
}
}
typedef struct {
gpointer needle;
guint needle_column;
GtkTreeIter *iter;
gboolean found;
} ListStoreFindData;
static gboolean
list_store_find_foreach_cb (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data)
{
ListStoreFindData *find_data = data;
gpointer value;
gtk_tree_model_get (model, iter, find_data->needle_column,
&value, -1);
if (value == find_data->needle) {
*find_data->iter = *iter;
return (find_data->found = TRUE);
}
return FALSE;
}
gboolean
calls_list_store_find (GtkListStore *store,
gpointer needle,
gint needle_column,
GtkTreeIter *iter)
{
ListStoreFindData find_data
= { needle, needle_column, iter, FALSE };
gtk_tree_model_foreach (GTK_TREE_MODEL (store),
list_store_find_foreach_cb,
&find_data);
return find_data.found;
}
void
calls_entry_append (GtkEntry *entry,
gchar character)
{
const gchar str[] = {character, '\0'};
GtkEntryBuffer *buf;
guint len;
g_return_if_fail (GTK_IS_ENTRY (entry));
buf = gtk_entry_get_buffer (entry);
len = gtk_entry_buffer_get_length (buf);
gtk_entry_buffer_insert_text (buf, len, str, 1);
}
gboolean
calls_date_time_is_same_day (GDateTime *a,

View file

@ -110,22 +110,6 @@ G_BEGIN_DECLS
}
/** If the GObject object is non-NULL, unref it */
void calls_object_unref (gpointer object);
/** Find a particular pointer value in a GtkListStore */
gboolean
calls_list_store_find (GtkListStore *store,
gpointer needle,
gint needle_column,
GtkTreeIter *iter);
/** Append a single character to a GtkEntry's contents */
void
calls_entry_append (GtkEntry *entry,
gchar character);
gboolean calls_date_time_is_same_day (GDateTime *a,
GDateTime *b);