mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-13 16:07:36 +00:00
util: Remove unused code
This commit is contained in:
parent
1489cfa796
commit
0bcf3fa08e
2 changed files with 0 additions and 85 deletions
69
src/util.c
69
src/util.c
|
@ -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,
|
||||
|
|
16
src/util.h
16
src/util.h
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue