Mercurial > pidgin.yaz
changeset 11677:8004885fabbe
[gaim-migrate @ 13963]
Remove some things from the public namespace by making them static
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 17 Oct 2005 05:50:30 +0000 |
parents | 0c54f9b0e67c |
children | b37c439dfcc0 |
files | src/cipher.c src/gtkimhtml.c src/gtkstatusbox.c src/gtkstatusbox.h src/idle.c src/internal.h src/log.c src/protocols/bonjour/dns_sd.c src/stun.c |
diffstat | 9 files changed, 32 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cipher.c Mon Oct 17 05:32:33 2005 +0000 +++ b/src/cipher.c Mon Oct 17 05:50:30 2005 +0000 @@ -705,7 +705,7 @@ * * These two tables are part of the 'permuted choice 1' function. * * In this implementation several speed improvements are done. * */ -guint32 leftkey_swap[16] = +static guint32 leftkey_swap[16] = { 0x00000000, 0x00000001, 0x00000100, 0x00000101, 0x00010000, 0x00010001, 0x00010100, 0x00010101, @@ -713,7 +713,7 @@ 0x01010000, 0x01010001, 0x01010100, 0x01010101 }; -guint32 rightkey_swap[16] = +static guint32 rightkey_swap[16] = { 0x00000000, 0x01000000, 0x00010000, 0x01010000, 0x00000100, 0x01000100, 0x00010100, 0x01010100,
--- a/src/gtkimhtml.c Mon Oct 17 05:32:33 2005 +0000 +++ b/src/gtkimhtml.c Mon Oct 17 05:50:30 2005 +0000 @@ -362,7 +362,8 @@ } -void gtk_smiley_tree_destroy (GtkSmileyTree *tree) +static void +gtk_smiley_tree_destroy (GtkSmileyTree *tree) { GSList *list = g_slist_append (NULL, tree); @@ -589,7 +590,8 @@ return FALSE; } -gboolean gtk_enter_event_notify(GtkWidget *imhtml, GdkEventCrossing *event, gpointer data) +static gboolean +gtk_enter_event_notify(GtkWidget *imhtml, GdkEventCrossing *event, gpointer data) { if (GTK_IMHTML(imhtml)->editable) gdk_window_set_cursor( @@ -606,7 +608,8 @@ return FALSE; } -gboolean gtk_leave_event_notify(GtkWidget *imhtml, GdkEventCrossing *event, gpointer data) +static gboolean +gtk_leave_event_notify(GtkWidget *imhtml, GdkEventCrossing *event, gpointer data) { /* when leaving the widget, clear any current & pending tooltips and restore the cursor */ if (GTK_IMHTML(imhtml)->prelit_tag) { @@ -1889,7 +1892,7 @@ return t->image; } -GdkPixbufAnimation * +static GdkPixbufAnimation * gtk_smiley_tree_image (GtkIMHtml *imhtml, const gchar *sml, const gchar *text)
--- a/src/gtkstatusbox.c Mon Oct 17 05:32:33 2005 +0000 +++ b/src/gtkstatusbox.c Mon Oct 17 05:50:30 2005 +0000 @@ -499,6 +499,11 @@ gtk_gaim_status_box_refresh(status_box); } +void +gtk_gaim_status_box_activate_saved_status(GaimSavedStatus *saved_status) +{ +} + static void activate_currently_selected_status(GtkGaimStatusBox *status_box) {
--- a/src/gtkstatusbox.h Mon Oct 17 05:32:33 2005 +0000 +++ b/src/gtkstatusbox.h Mon Oct 17 05:50:30 2005 +0000 @@ -30,6 +30,7 @@ #include <gtk/gtk.h> #include "gtkimhtml.h" #include "account.h" +#include "savedstatuses.h" #include <gtk/gtktreemodel.h> #include <gtk/gtktreeview.h> #if !GTK_CHECK_VERSION(2,6,0) @@ -118,6 +119,7 @@ void gtk_gaim_status_box_pulse_connecting(GtkGaimStatusBox *status_box); +void gtk_gaim_status_box_activate_saved_status(GaimSavedStatus *saved_status); char *gtk_gaim_status_box_get_active_type(GtkGaimStatusBox *status_box);
--- a/src/idle.c Mon Oct 17 05:32:33 2005 +0000 +++ b/src/idle.c Mon Oct 17 05:50:30 2005 +0000 @@ -35,11 +35,13 @@ #include "connection.h" #include "debug.h" +#include "gtkstatusbox.h" #include "log.h" #include "prefs.h" +#include "savedstatuses.h" #include "signals.h" -#define IDLEMARK 600 /* 10 minutes! */ +#define IDLEMARK 600 /* 10 minutes! */ typedef enum { @@ -110,6 +112,7 @@ * 2. Set or unset your auto-away message. * 3. Report your current idle time to the IM server. */ +/* TODO: This needs to be namespaced or moved elsewhere. */ gint check_idle(gpointer data) { @@ -148,6 +151,7 @@ if (gaim_presence_is_available(presence)) { const char *idleaway_name; + GaimSavedStatus *saved_status; gaim_debug_info("idle", "Making %s auto-away\n", gaim_account_get_username(account)); @@ -155,6 +159,8 @@ /* TODO XXX STATUS AWAY CORE/UI */ /* Mark our accounts "away" using the idleaway status */ idleaway_name = gaim_prefs_get_string("/core/status/idleaway"); + saved_status = gaim_savedstatus_find(idleaway_name); + gtk_gaim_status_box_activate_saved_status(saved_status); gc->is_auto_away = GAIM_IDLE_AUTO_AWAY; } else {
--- a/src/internal.h Mon Oct 17 05:32:33 2005 +0000 +++ b/src/internal.h Mon Oct 17 05:50:30 2005 +0000 @@ -110,10 +110,6 @@ # include <unistd.h> #endif -#ifndef I_KNOW_I_SHOULD_NOT_SEEK_HELP_WITH_GAIM_CVS -#error You are using Gaim CVS. Do not seek help. Do not pass Go. Do not collect Gaim 2.0.0. -#endif - #ifndef MAXPATHLEN # define MAXPATHLEN 1024 #endif
--- a/src/log.c Mon Oct 17 05:32:33 2005 +0000 +++ b/src/log.c Mon Oct 17 05:50:30 2005 +0000 @@ -406,7 +406,8 @@ return (gint)b->type - (gint)a->type; } -guint log_set_hash(gconstpointer key) +static guint +log_set_hash(gconstpointer key) { const GaimLogSet *set = key; @@ -416,7 +417,8 @@ return g_int_hash((gint *)&set->type) + g_str_hash(set->name); } -gboolean log_set_equal(gconstpointer a, gconstpointer b) +static gboolean +log_set_equal(gconstpointer a, gconstpointer b) { /* I realize that the choices made for GList and GHashTable * make sense for those data types, but I wish the comparison @@ -424,7 +426,8 @@ return !gaim_log_set_compare(a, b); } -void log_add_log_set_to_hash(GHashTable *sets, GaimLogSet *set) +static void +log_add_log_set_to_hash(GHashTable *sets, GaimLogSet *set) { GaimLogSet *existing_set = g_hash_table_lookup(sets, set);
--- a/src/protocols/bonjour/dns_sd.c Mon Oct 17 05:32:33 2005 +0000 +++ b/src/protocols/bonjour/dns_sd.c Mon Oct 17 05:50:30 2005 +0000 @@ -229,7 +229,7 @@ return SW_OKAY; } -int +static int _dns_sd_publish(BonjourDnsSd *data, PublishType type) { sw_text_record dns_data; @@ -281,33 +281,13 @@ return 0; } -gboolean +static gboolean _dns_sd_handle_packets(GIOChannel *source, GIOCondition condition, gpointer data) { sw_discovery_read_socket(*((sw_discovery*)data)); return TRUE; } -gpointer -_dns_sd_wait_for_connections(gpointer data) -{ - sw_discovery_oid session_id; - BonjourDnsSd *dns_sd_data = (BonjourDnsSd*)data; - - // Advise the daemon that we are waiting for connections - if (sw_discovery_browse(*(dns_sd_data->session), 0, ICHAT_SERVICE, NULL, _browser_reply, - dns_sd_data->account, &session_id) != SW_OKAY) - { - gaim_debug_error("bonjour", "Unable to get service."); - return NULL; - } - - // Yields control of the cpu to the daemon - sw_discovery_run(*(dns_sd_data->session)); - - return NULL; -} - // End private functions /**