--- src/gtkimhtml.c 2004-04-22 12:24:05.000000000 -0400
+++ src/gtkimhtml.c 2004-04-28 20:35:17.000000000 -0400
@@ -539,13 +539,14 @@
#if GTK_CHECK_VERSION(2,2,0)
static void gtk_imhtml_clipboard_get(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, GtkIMHtml *imhtml) {
char *text;
+ gboolean primary;
GtkTextIter start, end;
GtkTextMark *sel = gtk_text_buffer_get_selection_bound(imhtml->text_buffer);
GtkTextMark *ins = gtk_text_buffer_get_insert(imhtml->text_buffer);
gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &start, sel);
gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &end, ins);
- gboolean primary = gtk_widget_get_clipboard(GTK_WIDGET(imhtml), GDK_SELECTION_PRIMARY) == clipboard;
+ primary = gtk_widget_get_clipboard(GTK_WIDGET(imhtml), GDK_SELECTION_PRIMARY) == clipboard;
if (info == TARGET_HTML) {
int len;
--- src/gtkrequest.c 2004-04-18 02:22:41.000000000 -0400
+++ src/gtkrequest.c 2004-04-28 20:35:17.000000000 -0400
@@ -260,6 +260,7 @@
GtkWidget *label;
GtkWidget *entry;
GtkWidget *img;
+ GtkWidget *toolbar;
char *label_text;
data = g_new0(GaimGtkRequestData, 1);
@@ -338,7 +339,6 @@
gtk_widget_set_size_request(sw, 320, 130);
/* Toolbar */
- GtkWidget *toolbar;
toolbar = gtk_imhtmltoolbar_new();
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
--- src/protocols/novell/nmcontact.c 2004-04-17 14:29:20.000000000 -0400
+++ src/protocols/novell/nmcontact.c 2004-04-28 20:35:43.000000000 -0400
@@ -701,10 +701,12 @@
void
nm_folder_remove_contact(NMFolder * folder, NMContact * contact)
{
+ GSList *node;
+
if (folder == NULL || contact == NULL)
return;
- GSList *node = folder->contacts;
+ node = folder->contacts;
while (node) {
if (contact->id == ((NMContact *) (node->data))->id) {
--- src/protocols/novell/nmuser.c 2004-04-21 17:01:16.000000000 -0400
+++ src/protocols/novell/nmuser.c 2004-04-28 20:48:01.000000000 -0400
@@ -50,10 +50,12 @@
nm_initialize_user(const char *name, const char *server_addr,
int port, gpointer data, nm_event_cb event_callback)
{
+ NMUser *user;
+
if (name == NULL || server_addr == NULL || event_callback == NULL)
return NULL;
- NMUser *user = g_new0(NMUser, 1);
+ user = g_new0(NMUser, 1);
user->conn = g_new0(NMConn, 1);
@@ -1646,12 +1648,13 @@
char *
nm_typed_to_dotted(const char *typed)
{
+ char *dotted;
unsigned i = 0, j = 0;
if (typed == NULL)
return NULL;
- char *dotted = g_new0(char, strlen(typed));
+ dotted = g_new0(char, strlen(typed));
do {
@@ -1690,6 +1693,7 @@
{
NMField *list, *cursor, *locate;
gint objid1;
+ gpointer item;
NMContact *contact;
NMFolder *folder;
@@ -1713,8 +1717,7 @@
nm_locate_field(NM_A_SZ_OBJECT_ID, (NMField *) cursor->value);
if (locate != NULL && locate->value != 0) {
objid1 = atoi((char *) locate->value);
- gpointer item =
- nm_folder_find_item_by_object_id(user->root_folder, objid1);
+ item = nm_folder_find_item_by_object_id(user->root_folder, objid1);
if (item != NULL) {
if (cursor->method == NMFIELD_METHOD_ADD) {
if (g_ascii_strcasecmp(cursor->tag, NM_A_FA_CONTACT) == 0) {
--- src/protocols/novell/novell.c 2004-04-21 21:53:15.000000000 -0400
+++ src/protocols/novell/novell.c 2004-04-28 20:35:17.000000000 -0400
@@ -893,6 +893,7 @@
NMUserRecord *user_record = NULL;
NMContact *contact = NULL;
GaimBuddy *buddy = NULL;
+ GaimGroup *group = NULL;
NMERR_T cnt = 0, i;
const char *text = NULL;
const char *name = NULL;
@@ -912,7 +913,7 @@
nm_contact_get_display_name(contact));
/* Does the Gaim group exist already? */
- GaimGroup *group = gaim_find_group(nm_folder_get_name(folder));
+ group = gaim_find_group(nm_folder_get_name(folder));
if (group == NULL) {
group = gaim_group_new(nm_folder_get_name(folder));
@@ -2062,6 +2063,7 @@
{
NMERR_T rc = NM_OK;
NMUser *user;
+ NMFolder *folder;
if (gc == NULL || old_name == NULL || new_name == NULL || tobemoved == NULL) {
return;
@@ -2078,7 +2080,7 @@
return;
}
- NMFolder *folder = nm_find_folder(user, old_name);
+ folder = nm_find_folder(user, old_name);
if (folder) {
rc = nm_send_rename_folder(user, folder, new_name,
Index: src/gtkimhtml.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v
retrieving revision 1.318
--- src/gtkimhtml.c 22 Apr 2004 16:24:05 -0000 1.318
+++ src/gtkimhtml.c 23 Apr 2004 04:21:43 -0000
@@ -66,6 +66,11 @@
#define TOOLTIP_TIMEOUT 500
+/* GTK+ 2.0 hack */
+#if (!GTK_CHECK_VERSION(2,2,0))
+#define gtk_widget_get_clipboard(x, y) gtk_clipboard_get(y)
+#endif
+
static void preinsert_cb(GtkTextBuffer *buffer, GtkTextIter *iter, gchar *text, gint len, GtkIMHtml *imhtml);
static void insert_cb(GtkTextBuffer *buffer, GtkTextIter *iter, gchar *text, gint len, GtkIMHtml *imhtml);
static gboolean gtk_imhtml_is_amp_escape (const gchar *string, gchar **replace, gint *length);
@@ -536,7 +541,6 @@ gboolean gtk_key_pressed_cb(GtkIMHtml *i
return FALSE;
}
-#if GTK_CHECK_VERSION(2,2,0)
static void gtk_imhtml_clipboard_get(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, GtkIMHtml *imhtml) {
char *text;
GtkTextIter start, end;
@@ -805,7 +809,6 @@ static void imhtml_destroy_add_primary(G
gtk_text_buffer_add_selection_clipboard(GTK_IMHTML(imhtml)->text_buffer,
gtk_widget_get_clipboard(GTK_WIDGET(imhtml), GDK_SELECTION_PRIMARY));
}
-#endif
static void mark_set_so_update_selection_cb(GtkTextBuffer *buffer, GtkTextIter *arg1, GtkTextMark *mark, GtkIMHtml *imhtml)
{
@@ -988,14 +991,12 @@ static void gtk_imhtml_init (GtkIMHtml *
GDK_ACTION_COPY);
g_signal_connect(G_OBJECT(imhtml), "drag_data_received", G_CALLBACK(gtk_imhtml_link_drag_rcv_cb), imhtml);
-#if GTK_CHECK_VERSION(2,2,0)
g_signal_connect(G_OBJECT(imhtml), "copy-clipboard", G_CALLBACK(copy_clipboard_cb), NULL);
g_signal_connect(G_OBJECT(imhtml), "cut-clipboard", G_CALLBACK(cut_clipboard_cb), NULL);
g_signal_connect(G_OBJECT(imhtml), "paste-clipboard", G_CALLBACK(paste_clipboard_cb), NULL);
//g_signal_connect_after(G_OBJECT(imhtml), "button-release-event", G_CALLBACK(button_release_cb), imhtml);
g_signal_connect_after(G_OBJECT(imhtml), "realize", G_CALLBACK(imhtml_realized_remove_primary), NULL);
g_signal_connect(G_OBJECT(imhtml), "unrealize", G_CALLBACK(imhtml_destroy_add_primary), NULL);
-#endif
g_signal_connect_after(G_OBJECT(GTK_IMHTML(imhtml)->text_buffer), "mark-set",
G_CALLBACK(mark_set_so_update_selection_cb), imhtml);