# HG changeset patch # User Eric Warmenhoven # Date 1005864424 0 # Node ID f3c094e78609a24d24eac245c912187e162be48e # Parent 7f3f4aa114ad5a071d9712478f9039fc0cfe91dd [gaim-migrate @ 2738] this actually doesn't change anything, unless you want to use gtk2. committer: Tailor Script diff -r 7f3f4aa114ad -r f3c094e78609 ChangeLog --- a/ChangeLog Thu Nov 15 22:34:47 2001 +0000 +++ b/ChangeLog Thu Nov 15 22:47:04 2001 +0000 @@ -1,5 +1,8 @@ Gaim: The Pimpin' Penguin IM Clone thats good for the soul! +version 0.49: + * Can compile against GTK+ 2.0 (version 1.3.10) + version 0.48 (11/18/2001): * Right-click on links to open/copy URL * Yahoo changes diff -r 7f3f4aa114ad -r f3c094e78609 TODO --- a/TODO Thu Nov 15 22:34:47 2001 +0000 +++ b/TODO Thu Nov 15 22:47:04 2001 +0000 @@ -75,10 +75,6 @@ There's probably 100 other things but since I've hardly used the Windows client before I'm not sure what any of them are -Future Plugins? : - ICQ through Oscar plugin (ICQ2000) (requires hacking libfaim :-/) - this would allow us to send SMS messages. - ---- THE UIS: @@ -112,6 +108,8 @@ Have a stock ticker (a plugin could easily make use of GtkTicker) + Buddy Icons need to be converted to use new gdk-pixbuf (GTK2) + Then, of course, are all the Bugs that need to be fixed http://sourceforge.net/tracker/?atid=100235&group_id=235&func=broswe diff -r 7f3f4aa114ad -r f3c094e78609 configure.ac --- a/configure.ac Thu Nov 15 22:34:47 2001 +0000 +++ b/configure.ac Thu Nov 15 22:47:04 2001 +0000 @@ -83,8 +83,9 @@ AC_SUBST(STATIC_LINK_LIBS) AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init void static_proto_init() { $load_proto }) +AC_ARG_ENABLE(gtk2, [ --enable-gtk2 compile using GTK 2 (BROKEN)],,enable_gtk2=no) AC_ARG_ENABLE(gnome, [ --disable-gnome compile without Gnome bits],,enable_gnome=yes) -AC_ARG_ENABLE(pixbuf, [ --disable-pixbuf compile without GdkPixbuf (needed for Buddy Icons)],,enable_pixbuf=yes) +AC_ARG_ENABLE(pixbuf, [ --disable-pixbuf compile without GdkPixbuf (needed for Buddy Icons)],,enable_pixbuf=yes) AC_ARG_ENABLE(panel, [ --enable-panel compile as a GNOME applet],,enable_panel=$enable_distrib) AM_CONDITIONAL(GNOMEAPPLET, test "x$enable_panel" = "xyes") @@ -104,6 +105,32 @@ AC_DEFINE(DEBUG) fi +if test "x$enable_gtk2" = "xyes" ; then + dnl AM_PATH_GTK_2_0(1.3.10,[ + dnl enable_gnome=no + dnl enable_pixbuf=no + dnl CFLAGS="$CFLAGS -DGTK_ENABLE_BROKEN" + dnl UI_LIBS="$UI_LIBS $GTK_LIBS" + dnl ],enable_gtk2=no) + + AC_PATH_PROG(pkgcfg, pkg-config) + if test "x$pkgcfg" = "x" ; then + enable_gtk2=no + else + GTK_VER=`$pkgcfg gtk+-2.0 --modversion 2>/dev/null` + if test "x$GTK_VER" = "x" ; then + enable_gtk2=no + else + GTK_CFLAGS=`$pkgcfg gtk+-2.0 --cflags` + CFLAGS="$CFLAGS -DGTK_ENABLE_BROKEN" + GTK_LIBS=`$pkgcfg gtk+-2.0 --libs` + UI_LIBS="$UI_LIBS $GTK_LIBS" + enable_gnome=no + enable_pixbuf=no + fi + fi +fi + if test "x$enable_gnome" = "xyes" ; then if test "x$enable_panel" = "xyes" ; then GNOME_INIT(applets) @@ -139,7 +166,7 @@ fi fi -if test "x$enable_gnome" != "xyes" ; then +if test "x$enable_gnome" != "xyes" -a "x$enable_gtk2" != "xyes" ; then AM_PATH_GLIB(1.2.3,,AC_MSG_ERROR([ *** GLib is required to build Gaim; please make sure you have the GLib *** development headers installed. The latest version of GLib is @@ -393,24 +420,35 @@ echo $PACKAGE $VERSION echo -echo Allow Multiple Connections.. : $enable_multi -echo Build Protocol Plugins...... : $enable_prpls -echo Protocols to link statically : $STATIC_PRPLS -echo -echo Build with GNOME bits....... : $enable_gnome -echo Use GdkPixbuf for Icons..... : $use_pixbuf -echo Build as GNOME applet....... : $enable_panel +echo Allow Multiple Connections.... : $enable_multi +echo Build Protocol Plugins........ : $enable_prpls +echo Protocols to link statically.. : $STATIC_PRPLS echo -echo Build with Plugin support... : $enable_plugins -echo Build with Perl support..... : $enable_perl -echo -echo Use XScreenSaver Extension.. : $enable_xss +if test "x$enable_panel" = "xyes" ; then + echo UI Library.................... : GNOME Panel +elif test "x$enable_gnome" = "xyes" ; then + echo UI Library.................... : GNOME App +elif test "x$enable_gtk2" = "xyes" ; then + echo UI Library.................... : GTK+ 2.0 +else + echo UI Library.................... : GTK+ 1.2 +fi +if test "x$enable_gtk2" = "xyes" ; then + echo Use GdkPixbuf for Buddy Icons. : yes +else + echo Use GdkPixbuf for Buddy Icons. : $enable_pixbuf +fi echo -echo Build with ESD.............. : $enable_esd -echo Build with NAS.............. : $enable_nas -echo Build with ArtsC............ : $enable_artsc +echo Build with Plugin support..... : $enable_plugins +echo Build with Perl support....... : $enable_perl +echo +echo Use XScreenSaver Extension.... : $enable_xss echo -echo Print debugging messages.... : $enable_debug +echo Build with ESD................ : $enable_esd +echo Build with NAS................ : $enable_nas +echo Build with ArtsC.............. : $enable_artsc +echo +echo Print debugging messages...... : $enable_debug echo eval eval echo Gaim will be installed in $bindir. if test "x$gaimpath" != "x" ; then diff -r 7f3f4aa114ad -r f3c094e78609 plugins/lagmeter.c --- a/plugins/lagmeter.c Thu Nov 15 22:34:47 2001 +0000 +++ b/plugins/lagmeter.c Thu Nov 15 22:47:04 2001 +0000 @@ -206,7 +206,7 @@ return; } - confdlg = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(confdlg); gtk_window_set_title(GTK_WINDOW(confdlg), "Gaim Lag Delay"); box = gtk_hbox_new(FALSE, 0); diff -r 7f3f4aa114ad -r f3c094e78609 plugins/spellchk.c --- a/plugins/spellchk.c Thu Nov 15 22:34:47 2001 +0000 +++ b/plugins/spellchk.c Thu Nov 15 22:47:04 2001 +0000 @@ -357,7 +357,7 @@ char *pair[2] = {"Replace", "With"}; if (configwin) return; - configwin = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(configwin); gtk_widget_set_usize(configwin, 450, 250); gtk_window_set_title(GTK_WINDOW(configwin), "Spell Check Config"); diff -r 7f3f4aa114ad -r f3c094e78609 src/about.c --- a/src/about.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/about.c Thu Nov 15 22:47:04 2001 +0000 @@ -89,7 +89,7 @@ if (!about) { - about = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(about); gtk_widget_set_usize(GTK_WIDGET(about), 450, -1); g_snprintf(abouttitle, sizeof(abouttitle), _("About Gaim v%s"), VERSION); gtk_window_set_title(GTK_WINDOW(about), abouttitle); diff -r 7f3f4aa114ad -r f3c094e78609 src/away.c --- a/src/away.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/away.c Thu Nov 15 22:47:04 2001 +0000 @@ -195,7 +195,7 @@ return; if (!imaway) { - imaway = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(imaway); gtk_window_set_wmclass(GTK_WINDOW(imaway), "imaway", "Gaim"); if (strlen(a->name)) gtk_window_set_title(GTK_WINDOW(imaway), a->name); diff -r 7f3f4aa114ad -r f3c094e78609 src/buddy.c --- a/src/buddy.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/buddy.c Thu Nov 15 22:47:04 2001 +0000 @@ -500,15 +500,17 @@ #endif -void handle_click_group(GtkWidget *widget, GdkEventButton *event, struct group *g) +static int handle_click_group(GtkWidget *widget, GdkEventButton *event, struct group *g) { if (event->type == GDK_2BUTTON_PRESS) { if (GTK_TREE_ITEM(widget)->expanded) gtk_tree_item_collapse(GTK_TREE_ITEM(widget)); else gtk_tree_item_expand(GTK_TREE_ITEM(widget)); - } else if ((event->type == GDK_BUTTON_PRESS) && (event->button == 3)) { + return TRUE; } + + return FALSE; } void pressed_im_bud(GtkWidget *widget, struct buddy *b) @@ -585,10 +587,10 @@ g_list_free(first); } -void handle_click_buddy(GtkWidget *widget, GdkEventButton *event, struct buddy_show *b) +static int handle_click_buddy(GtkWidget *widget, GdkEventButton *event, struct buddy_show *b) { if (!b->connlist) - return; + return FALSE; if (event->type == GDK_2BUTTON_PRESS && event->button == 1) { struct conversation *c; @@ -708,6 +710,8 @@ /* Anything for other buttons? :) */ } + + return FALSE; } static void un_alias(GtkWidget *a, struct buddy *b) @@ -734,10 +738,10 @@ GtkWidget *button; if (event->button != 3 || event->type != GDK_BUTTON_PRESS) - return TRUE; + return FALSE; if (!gtk_clist_get_selection_info(GTK_CLIST(edittree), event->x, event->y, &row, &column)) - return TRUE; + return FALSE; node = gtk_ctree_node_nth(GTK_CTREE(edittree), row); type = gtk_ctree_node_get_row_data(GTK_CTREE(edittree), node); @@ -752,6 +756,8 @@ gtk_widget_show(button); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time); + + return TRUE; } else if (*type == EDIT_BUDDY) { struct buddy *b = (struct buddy *)type; menu = gtk_menu_new(); @@ -793,9 +799,11 @@ gtk_widget_show(button); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time); + + return TRUE; } - return TRUE; + return FALSE; } @@ -2357,7 +2365,7 @@ } #ifdef USE_APPLET - blist = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(blist); #else blist = gtk_window_new(GTK_WINDOW_TOPLEVEL); #endif diff -r 7f3f4aa114ad -r f3c094e78609 src/buddy_chat.c --- a/src/buddy_chat.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/buddy_chat.c Thu Nov 15 22:47:04 2001 +0000 @@ -256,7 +256,7 @@ } if (!joinchat) { - joinchat = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(joinchat); gtk_window_set_wmclass(GTK_WINDOW(joinchat), "joinchat", "Gaim"); gtk_window_set_policy(GTK_WINDOW(joinchat), FALSE, TRUE, TRUE); gtk_widget_realize(joinchat); @@ -386,7 +386,7 @@ GtkWidget *frame; if (!invite) { - invite = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(invite); gtk_widget_realize(invite); cancel = picture_button(invite, _("Cancel"), cancel_xpm); @@ -463,7 +463,7 @@ void tab_complete(struct conversation *c) { - int pos = GTK_EDITABLE(c->entry)->current_pos; + int pos = GTK_OLD_EDITABLE(c->entry)->current_pos; int start = pos; int most_matched = -1; char *entered, *partial = NULL; @@ -1093,8 +1093,8 @@ if (!GTK_WIDGET_REALIZED(label)) return; style = gtk_style_new(); - gdk_font_unref(style->font); - style->font = gdk_font_ref(label->style->font); + gdk_font_unref(gtk_style_get_font(style)); + gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); gtk_widget_set_style(label, style); gtk_style_unref(style); b->unseen = 0; diff -r 7f3f4aa114ad -r f3c094e78609 src/conversation.c --- a/src/conversation.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/conversation.c Thu Nov 15 22:47:04 2001 +0000 @@ -711,12 +711,12 @@ break; } if (buf[0]) { - if (GTK_EDITABLE(c->entry)->has_selection) { - int finish = GTK_EDITABLE(c->entry)->selection_end_pos; + if (GTK_OLD_EDITABLE(c->entry)->has_selection) { + int finish = GTK_OLD_EDITABLE(c->entry)->selection_end_pos; gtk_editable_insert_text(GTK_EDITABLE(c->entry), buf, strlen(buf), &finish); } else { - pos = GTK_EDITABLE(c->entry)->current_pos; + pos = GTK_OLD_EDITABLE(c->entry)->current_pos; gtk_editable_insert_text(GTK_EDITABLE(c->entry), buf, strlen(buf), &pos); } @@ -779,6 +779,7 @@ } else if ((event->keyval == GDK_Tab) && c->is_chat && (chat_options & OPT_CHAT_TAB_COMPLETE)) { tab_complete(c); gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + return TRUE; } else if (((!c->is_chat && (im_options & OPT_IM_ONE_WINDOW)) || (c->is_chat && (chat_options & OPT_CHAT_ONE_WINDOW))) && (event->state & GDK_MOD1_MASK) && (event->keyval > '0') && (event->keyval <= '9')) { @@ -787,7 +788,7 @@ gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); } - return TRUE; + return FALSE; } @@ -941,7 +942,7 @@ int entry_key_pressed(GtkWidget *w, GtkWidget *entry) { check_everything(w); - return TRUE; + return FALSE; } /*------------------------------------------------------------------------*/ @@ -954,8 +955,8 @@ int res = 0; char *tmp, *tmpo, h; tmpo = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); - h = tmpo[GTK_EDITABLE(entry)->current_pos]; - tmpo[GTK_EDITABLE(entry)->current_pos] = '\0'; + h = tmpo[GTK_OLD_EDITABLE(entry)->current_pos]; + tmpo[GTK_OLD_EDITABLE(entry)->current_pos] = '\0'; tmp = tmpo; do { p1 = strstr(tmp, s1); @@ -978,7 +979,7 @@ } } } while (p1 || p2); - tmpo[GTK_EDITABLE(entry)->current_pos] = h; + tmpo[GTK_OLD_EDITABLE(entry)->current_pos] = h; g_free(tmpo); return res; } @@ -986,8 +987,8 @@ int invert_tags(GtkWidget *entry, char *s1, char *s2, int really) { - int start = GTK_EDITABLE(entry)->selection_start_pos; - int finish = GTK_EDITABLE(entry)->selection_end_pos; + int start = GTK_OLD_EDITABLE(entry)->selection_start_pos; + int finish = GTK_OLD_EDITABLE(entry)->selection_end_pos; char *s; s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); @@ -1009,8 +1010,8 @@ void remove_tags(GtkWidget *entry, char *tag) { char *s, *t; - int start = GTK_EDITABLE(entry)->selection_start_pos; - int finish = GTK_EDITABLE(entry)->selection_end_pos; + int start = GTK_OLD_EDITABLE(entry)->selection_start_pos; + int finish = GTK_OLD_EDITABLE(entry)->selection_end_pos; int temp; s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); t = s; @@ -1090,7 +1091,7 @@ void surround(GtkWidget *entry, char *pre, char *post) { - int temp, pos = GTK_EDITABLE(entry)->current_pos; + int temp, pos = GTK_OLD_EDITABLE(entry)->current_pos; int dummy; int start, finish; @@ -1098,11 +1099,11 @@ gtkspell_detach(GTK_TEXT(entry)); } - if (GTK_EDITABLE(entry)->has_selection) { + if (GTK_OLD_EDITABLE(entry)->has_selection) { remove_tags(entry, pre); remove_tags(entry, post); - start = GTK_EDITABLE(entry)->selection_start_pos; - finish = GTK_EDITABLE(entry)->selection_end_pos; + start = GTK_OLD_EDITABLE(entry)->selection_start_pos; + finish = GTK_OLD_EDITABLE(entry)->selection_end_pos; if (start > finish) { dummy = finish; finish = start; @@ -1142,7 +1143,7 @@ if (invert_tags(entry, pre, post, 1)) return; s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); - pos = GTK_EDITABLE(entry)->current_pos; + pos = GTK_OLD_EDITABLE(entry)->current_pos; debug_printf(_("Currently at %d, "), pos); s2 = strstr(&s[pos], post); if (s2) { @@ -1606,8 +1607,8 @@ style = gtk_style_new(); if (!GTK_WIDGET_REALIZED(label)) gtk_widget_realize(label); - gdk_font_unref(style->font); - style->font = gdk_font_ref(label->style->font); + gdk_font_unref(gtk_style_get_font(style)); + gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); if (flags & WFLAG_NICK) { style->fg[0].red = 0x0000; style->fg[0].green = 0x0000; @@ -2111,8 +2112,8 @@ if (!GTK_WIDGET_REALIZED(label)) return; style = gtk_style_new(); - gdk_font_unref(style->font); - style->font = gdk_font_ref(label->style->font); + gdk_font_unref(gtk_style_get_font(style)); + gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); gtk_widget_set_style(label, style); gtk_style_unref(style); c->unseen = 0; diff -r 7f3f4aa114ad -r f3c094e78609 src/dialogs.c --- a/src/dialogs.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/dialogs.c Thu Nov 15 22:47:04 2001 +0000 @@ -372,7 +372,7 @@ w->who = who; w->gc = gc; - w->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(w->window); dialogwindows = g_list_prepend(dialogwindows, w->window); gtk_window_set_wmclass(GTK_WINDOW(w->window), "warning", "Gaim"); gtk_window_set_policy(GTK_WINDOW(w->window), FALSE, FALSE, TRUE); @@ -511,7 +511,7 @@ GtkWidget *box; GtkWidget *eedialog; - eedialog = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(eedialog); gtk_widget_realize(eedialog); ok = picture_button(eedialog, _("OK"), ok_xpm); box = gtk_vbox_new(FALSE, 10); @@ -556,7 +556,7 @@ GtkWidget *label; if (!imdialog) { - imdialog = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(imdialog); gtk_window_set_wmclass(GTK_WINDOW(imdialog), "imdialog", "Gaim"); gtk_window_set_policy(GTK_WINDOW(imdialog), FALSE, TRUE, TRUE); gtk_window_set_title(GTK_WINDOW(imdialog), _("Gaim - IM user")); @@ -612,7 +612,7 @@ if (!infodialog) { - infodialog = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(infodialog); gtk_window_set_wmclass(GTK_WINDOW(infodialog), "infodialog", "Gaim"); gtk_window_set_policy(GTK_WINDOW(infodialog), FALSE, TRUE, TRUE); gtk_widget_realize(infodialog); @@ -749,7 +749,7 @@ struct addbuddy *a = g_new0(struct addbuddy, 1); a->gc = gc; - a->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(a->window); gtk_window_set_wmclass(GTK_WINDOW(a->window), "add_group", "Gaim"); gtk_window_set_policy(GTK_WINDOW(a->window), FALSE, FALSE, TRUE); gtk_widget_realize(a->window); @@ -876,7 +876,7 @@ struct addbuddy *a = g_new0(struct addbuddy, 1); a->gc = gc ? gc : connections->data; - a->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(a->window); gtk_window_set_wmclass(GTK_WINDOW(a->window), "add_buddy", "Gaim"); gtk_window_set_policy(GTK_WINDOW(a->window), FALSE, FALSE, TRUE); gtk_window_set_title(GTK_WINDOW(a->window), _("Gaim - Add Buddy")); @@ -1076,7 +1076,7 @@ struct addbp *b = g_new0(struct addbp, 1); b->user = gc ? gc->user : aim_users->data; - b->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(b->window); dialogwindows = g_list_prepend(dialogwindows, b->window); gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, TRUE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(b->window), "new_bp", "Gaim"); @@ -1299,7 +1299,7 @@ struct set_dir_dlg *b = g_new0(struct set_dir_dlg, 1); b->gc = gc; - b->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(b->window); dialogwindows = g_list_prepend(dialogwindows, b->window); gtk_window_set_wmclass(GTK_WINDOW(b->window), "set_dir", "Gaim"); gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, TRUE, TRUE); @@ -1485,7 +1485,7 @@ struct passwddlg *b = g_new0(struct passwddlg, 1); b->gc = gc; - b->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(b->window); gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, TRUE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(b->window), "change_passwd", "Gaim"); gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Password Change")); @@ -1584,7 +1584,7 @@ tmp = gc->user; b->user = tmp; - b->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(b->window); gtk_window_set_wmclass(GTK_WINDOW(b->window), "set_info", "Gaim"); dialogwindows = g_list_prepend(dialogwindows, b->window); gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Set User Info")); @@ -1671,7 +1671,7 @@ va_start(ap, info); - b->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(b->window); gtk_window_set_title(GTK_WINDOW(b->window), "Gaim"); gtk_container_border_width(GTK_CONTAINER(b->window), 5); bbox = gtk_vbox_new(FALSE, 5); @@ -1794,7 +1794,7 @@ p->gc = gc; p->permit = permit; - p->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(p->window); gtk_container_set_border_width(GTK_CONTAINER(p->window), 5); gtk_window_set_policy(GTK_WINDOW(p->window), FALSE, FALSE, TRUE); gtk_widget_realize(p->window); @@ -1986,7 +1986,7 @@ struct findbyinfo *b = g_new0(struct findbyinfo, 1); b->gc = gc; - b->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(b->window); gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, TRUE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(b->window), "find_info", "Gaim"); gtk_widget_show(b->window); @@ -2143,7 +2143,7 @@ struct findbyemail *b = g_new0(struct findbyemail, 1); if (g_slist_find(connections, gc)) b->gc = gc; - b->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(b->window); gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, TRUE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(b->window), "find_email", "Gaim"); gtk_widget_realize(b->window); @@ -2229,7 +2229,7 @@ if (!c->link_dialog) { struct linkdlg *b = g_new0(struct linkdlg, 1); - c->link_dialog = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(c->link_dialog); gtk_window_set_wmclass(GTK_WINDOW(c->link_dialog), "add_link", "Gaim"); dialogwindows = g_list_prepend(dialogwindows, c->link_dialog); @@ -2875,7 +2875,7 @@ struct create_away *ca = g_new0(struct create_away, 1); /* Set up window */ - ca->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(ca->window); gtk_widget_set_usize(ca->window, -1, 250); gtk_container_border_width(GTK_CONTAINER(ca->window), 5); gtk_window_set_wmclass(GTK_WINDOW(ca->window), "away_mess", "Gaim"); @@ -3047,12 +3047,12 @@ /* surround(c->entry, smiley_text, ""); */ - if (GTK_EDITABLE(c->entry)->has_selection) { - int finish = GTK_EDITABLE(c->entry)->selection_end_pos; + if (GTK_OLD_EDITABLE(c->entry)->has_selection) { + int finish = GTK_OLD_EDITABLE(c->entry)->selection_end_pos; gtk_editable_insert_text(GTK_EDITABLE(c->entry), smiley_text, strlen(smiley_text), &finish); } else { - int pos = GTK_EDITABLE(c->entry)->current_pos; + int pos = GTK_OLD_EDITABLE(c->entry)->current_pos; gtk_editable_insert_text(GTK_EDITABLE(c->entry), smiley_text, strlen(smiley_text), &pos); } @@ -3097,7 +3097,7 @@ win = c->window; - dialog = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(dialog); gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, FALSE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(dialog), "smiley_dialog", "Gaim"); gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); @@ -3178,7 +3178,7 @@ if (aliasdlg) gtk_widget_destroy(aliasdlg); - aliasdlg = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(aliasdlg); gtk_window_set_policy(GTK_WINDOW(aliasdlg), FALSE, FALSE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(aliasdlg), "alias_dialog", "Gaim"); gtk_widget_realize(aliasdlg); @@ -3354,7 +3354,7 @@ GtkWidget *label; GtkWidget *hsep; - window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(window); gtk_window_set_wmclass(GTK_WINDOW(window), "dialog", "Gaim"); gtk_container_set_border_width(GTK_CONTAINER(window), 10); gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, TRUE); @@ -3624,7 +3624,7 @@ gtk_container_add(GTK_CONTAINER(frame), sw); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); - gtk_signal_connect(GTK_OBJECT(layout), "url_clicked", open_url_nw, NULL); + gtk_signal_connect(GTK_OBJECT(layout), "url_clicked", GTK_SIGNAL_FUNC(open_url_nw), NULL); gtk_container_add(GTK_CONTAINER(sw), layout); gaim_setup_imhtml(layout); @@ -3710,7 +3710,7 @@ GtkWidget *label; if (!rename_dialog) { - rename_dialog = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(rename_dialog); gtk_window_set_wmclass(GTK_WINDOW(rename_dialog), "rename_dialog", "Gaim"); gtk_window_set_policy(GTK_WINDOW(rename_dialog), FALSE, TRUE, TRUE); gtk_window_set_title(GTK_WINDOW(rename_dialog), _("Gaim - Rename Group")); @@ -3815,7 +3815,7 @@ GtkWidget *label; if (!rename_bud_dialog) { - rename_bud_dialog = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(rename_bud_dialog); gtk_window_set_wmclass(GTK_WINDOW(rename_bud_dialog), "rename_bud_dialog", "Gaim"); gtk_window_set_policy(GTK_WINDOW(rename_bud_dialog), FALSE, TRUE, TRUE); gtk_window_set_title(GTK_WINDOW(rename_bud_dialog), _("Gaim - Rename Buddy")); diff -r 7f3f4aa114ad -r f3c094e78609 src/gaim.h --- a/src/gaim.h Thu Nov 15 22:34:47 2001 +0000 +++ b/src/gaim.h Thu Nov 15 22:47:04 2001 +0000 @@ -82,6 +82,11 @@ #define CUI_CHAT_RECV 6 +#define BROWSER_NETSCAPE 0 +#define BROWSER_KFM 1 +#define BROWSER_MANUAL 2 +/*#define BROWSER_INTERNAL 3*/ +#define BROWSER_GNOME 4 #define IM_FLAG_AWAY 0x01 #define IM_FLAG_CHECKBOX 0x02 diff -r 7f3f4aa114ad -r f3c094e78609 src/gtkspell.c --- a/src/gtkspell.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/gtkspell.c Thu Nov 15 22:47:04 2001 +0000 @@ -431,7 +431,7 @@ if (highlight.pixel == 0) { /* add an entry for the highlight in the color map. */ GdkColormap *gc = gtk_widget_get_colormap(GTK_WIDGET(gtktext)); - gdk_colormap_alloc_color(gc, &highlight, FALSE, TRUE);; + gdk_colormap_alloc_color(gc, &highlight, FALSE, TRUE); } change_color(gtktext, start, end, &highlight); if (buf) diff -r 7f3f4aa114ad -r f3c094e78609 src/gtkticker.c --- a/src/gtkticker.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/gtkticker.c Thu Nov 15 22:47:04 2001 +0000 @@ -22,6 +22,7 @@ */ #include "gtkticker.h" +#include static void gtk_ticker_compute_offsets (GtkTicker *ticker); static void gtk_ticker_class_init (GtkTickerClass *klass); @@ -94,7 +95,9 @@ widget_class->realize = gtk_ticker_realize; widget_class->size_request = gtk_ticker_size_request; widget_class->size_allocate = gtk_ticker_size_allocate; +#if ! GTK_CHECK_VERSION(1,3,0) widget_class->draw = gtk_ticker_draw; +#endif widget_class->expose_event = gtk_ticker_expose; container_class->add = gtk_ticker_add_real; diff -r 7f3f4aa114ad -r f3c094e78609 src/multi.c --- a/src/multi.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/multi.c Thu Nov 15 22:47:04 2001 +0000 @@ -812,7 +812,7 @@ p->u = u; passes = g_slist_append(passes, p); - p->win = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(p->win); gtk_window_set_wmclass(GTK_WINDOW(p->win), "password", "Gaim"); gtk_container_border_width(GTK_CONTAINER(p->win), 5); gtk_signal_connect(GTK_OBJECT(p->win), "destroy", GTK_SIGNAL_FUNC(pass_des), p); @@ -1152,7 +1152,7 @@ meter->gc = gc; meters = g_slist_append(meters, meter); - meter->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(meter->window); gtk_window_set_policy(GTK_WINDOW(meter->window), 0, 0, 1); gtk_window_set_wmclass(GTK_WINDOW(meter->window), "signon", "Gaim"); gtk_container_set_border_width(GTK_CONTAINER(meter->window), 5); diff -r 7f3f4aa114ad -r f3c094e78609 src/plugins.c --- a/src/plugins.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/plugins.c Thu Nov 15 22:47:04 2001 +0000 @@ -171,7 +171,7 @@ if (plugwindow) return; - plugwindow = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(plugwindow); gtk_window_set_wmclass(GTK_WINDOW(plugwindow), "plugins", "Gaim"); gtk_widget_realize(plugwindow); aol_icon(plugwindow->window); diff -r 7f3f4aa114ad -r f3c094e78609 src/prefs.c --- a/src/prefs.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/prefs.c Thu Nov 15 22:47:04 2001 +0000 @@ -2441,7 +2441,7 @@ if (!dw) dw = g_new0(struct debug_window, 1); - dw->window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(dw->window); gtk_window_set_title(GTK_WINDOW(dw->window), _("Gaim debug output window")); gtk_window_set_wmclass(GTK_WINDOW(dw->window), "debug_out", "Gaim"); gtk_signal_connect(GTK_OBJECT(dw->window), "delete_event", GTK_SIGNAL_FUNC(debug_delete), NULL); diff -r 7f3f4aa114ad -r f3c094e78609 src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/protocols/irc/irc.c Thu Nov 15 22:47:04 2001 +0000 @@ -725,7 +725,7 @@ rename_chat_buddy(b, tmp, buf); r = b->in_room; g_free(tmp); - break;; + break; } else r = r->next; } diff -r 7f3f4aa114ad -r f3c094e78609 src/prpl.c --- a/src/prpl.c Thu Nov 15 22:34:47 2001 +0000 +++ b/src/prpl.c Thu Nov 15 22:47:04 2001 +0000 @@ -127,7 +127,7 @@ GtkWidget *hbox; GtkWidget *button; - window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(window); gtk_window_set_wmclass(GTK_WINDOW(window), "accept", "Gaim"); gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, TRUE); gtk_window_set_title(GTK_WINDOW(window), _("Accept?")); @@ -192,7 +192,7 @@ p->doit = doit; p->dont = dont; - window = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(window); p->window = window; gtk_window_set_wmclass(GTK_WINDOW(window), "prompt", "Gaim"); gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, TRUE); @@ -413,7 +413,7 @@ } - mn->email_win = gtk_window_new(GTK_WINDOW_DIALOG); + GAIM_DIALOG(mn->email_win); gtk_window_set_wmclass(GTK_WINDOW(mn->email_win), "mail", "Gaim"); gtk_window_set_policy(GTK_WINDOW(mn->email_win), FALSE, TRUE, TRUE); gtk_window_set_title(GTK_WINDOW(mn->email_win), _("Gaim - New Mail")); diff -r 7f3f4aa114ad -r f3c094e78609 src/ui.h --- a/src/ui.h Thu Nov 15 22:34:47 2001 +0000 +++ b/src/ui.h Thu Nov 15 22:47:04 2001 +0000 @@ -37,6 +37,18 @@ #include #endif +#if GTK_CHECK_VERSION(1,3,0) +#define GAIM_DIALOG(x) x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \ + gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG) +#define GdkWindowPrivate GdkWindowObject +#define gtk_toolbar_new(x,y) gtk_toolbar_new() +#else +#define GAIM_DIALOG(x) x = gtk_window_new(GTK_WINDOW_DIALOG) +#define GTK_OLD_EDITABLE(x) GTK_EDITABLE(x) +#define gtk_style_get_font(style) (style)->font +#define gtk_style_set_font(s, f) (s)->font = f +#endif + #define BROWSER_NETSCAPE 0 #define BROWSER_KFM 1 #define BROWSER_MANUAL 2