Merge pull request #586 from bviktor/authcleanup

Login and network list cleanup
This commit is contained in:
TingPing
2013-05-16 09:07:38 -07:00
20 changed files with 1222 additions and 1085 deletions

View File

@@ -685,14 +685,14 @@ dcc_detail_label (char *text, GtkWidget *box, int num)
static void
dcc_exp_cb (GtkWidget *exp, GtkWidget *box)
{
#if GTK_CHECK_VERSION(2,20,0)
if (gtk_widget_get_visible (box))
#else
if (GTK_WIDGET_VISIBLE (box))
#endif
{
gtk_widget_hide (box);
}
else
{
gtk_widget_show (box);
}
}
static void

View File

@@ -897,15 +897,15 @@ fe_gui_info (session *sess, int info_type)
switch (info_type)
{
case 0: /* window status */
#if GTK_CHECK_VERSION(2,20,0)
if (!gtk_widget_get_visible (GTK_WIDGET (sess->gui->window)))
#else
if (!GTK_WIDGET_VISIBLE (GTK_WIDGET (sess->gui->window)))
#endif
{
return 2; /* hidden (iconified or systray) */
}
if (gtk_window_is_active (GTK_WINDOW (sess->gui->window)))
{
return 1; /* active/focused */
}
return 0; /* normal (no keyboard focus or behind a window) */
}
@@ -920,11 +920,7 @@ fe_gui_info_ptr (session *sess, int info_type)
{
case 0: /* native window pointer (for plugins) */
#ifdef WIN32
#if GTK_CHECK_VERSION(2,24,8)
return gdk_win32_window_get_impl_hwnd (sess->gui->window->window);
#else
return GDK_WINDOW_HWND (sess->gui->window->window);
#endif
#else
return sess->gui->window;
#endif

View File

@@ -1637,10 +1637,6 @@ key_action_tab_comp (GtkWidget *t, GdkEventKey *entry, char *d1, char *d2,
strncat (buf, result, COMP_BUF - prefix_len);
cursor_pos = strlen (buf);
g_free(result);
#if !GLIB_CHECK_VERSION(2,4,0)
g_utf8_validate (buf, -1, (const gchar **)&result);
(*result) = 0;
#endif
if (postfix)
{
strcat (buf, " ");

View File

@@ -1048,9 +1048,13 @@ menu_addfavoritemenu (server *serv, GtkWidget *menu, char *channel)
}
if (joinlist_is_in_list (serv, channel))
{
mg_create_icon_item (_("_Remove from Favorites"), GTK_STOCK_REMOVE, menu, menu_delfav_cb, serv);
}
else
{
mg_create_icon_item (_("_Add to Favorites"), GTK_STOCK_ADD, menu, menu_addfav_cb, serv);
}
}
static void
@@ -1729,11 +1733,7 @@ static gboolean
menu_canacaccel (GtkWidget *widget, guint signal_id, gpointer user_data)
{
/* GTK2.2 behaviour */
#if GTK_CHECK_VERSION(2,20,0)
return gtk_widget_is_sensitive (widget);
#else
return GTK_WIDGET_IS_SENSITIVE (widget);
#endif
}
/* === STUFF FOR /MENU === */

View File

@@ -414,11 +414,7 @@ tray_toggle_visibility (gboolean force_hide)
if (!win)
return FALSE;
#if GTK_CHECK_VERSION(2,20,0)
if (force_hide || gtk_widget_get_visible (GTK_WIDGET (win)))
#else
if (force_hide || GTK_WIDGET_VISIBLE (win))
#endif
{
if (prefs.hex_gui_tray_away)
hexchat_command (ph, "ALLSERV AWAY");

File diff suppressed because it is too large Load Diff

View File

@@ -954,7 +954,6 @@ enchant_has_lang(const gchar *lang, GSList *langs) {
void
sexy_spell_entry_activate_default_languages(SexySpellEntry *entry)
{
#if GLIB_CHECK_VERSION (2, 6, 0)
/*const gchar* const *langs;
int i;
gchar *lastprefix = NULL;*/
@@ -1003,26 +1002,6 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry)
/* If we don't have any languages activated, use "en" */
if (entry->priv->dict_list == NULL)
sexy_spell_entry_activate_language_internal(entry, "en", NULL);
#else
gchar *lang;
if (!have_enchant)
return;
lang = (gchar *) g_getenv("LANG");
if (lang != NULL) {
if (g_ascii_strncasecmp(lang, "C", 1) == 0)
lang = NULL;
else if (lang[0] == '\0')
lang = NULL;
}
if (lang == NULL)
lang = "en";
sexy_spell_entry_activate_language_internal(entry, lang, NULL);
#endif
}
static void

View File

@@ -1034,11 +1034,7 @@ gtk_xtext_realize (GtkWidget * widget)
gdk_window_set_user_data (widget->window, widget);
#if GTK_CHECK_VERSION(2,24,0)
xtext->depth = gdk_window_get_visual (widget->window)->depth;
#else
xtext->depth = gdk_drawable_get_visual (widget->window)->depth;
#endif
val.subwindow_mode = GDK_INCLUDE_INFERIORS;
val.graphics_exposures = 0;