| 1794 static void |
1794 static void |
| 1795 bind_network_page(PidginPrefsWindow *win) |
1795 bind_network_page(PidginPrefsWindow *win) |
| 1796 { |
1796 { |
| 1797 GtkStyleContext *context; |
1797 GtkStyleContext *context; |
| 1798 GtkCssProvider *ip_css; |
1798 GtkCssProvider *ip_css; |
| 1799 const gchar ip_style[] = |
1799 const gchar *res = "/im/pidgin/Pidgin/Prefs/ip.css"; |
| 1800 ".bad-ip {" |
|
| 1801 "color: @error_fg_color;" |
|
| 1802 "text-shadow: 0 1px @error_text_shadow;" |
|
| 1803 "background-image: none;" |
|
| 1804 "background-color: @error_bg_color;" |
|
| 1805 "}" |
|
| 1806 ".good-ip {" |
|
| 1807 "color: @question_fg_color;" |
|
| 1808 "text-shadow: 0 1px @question_text_shadow;" |
|
| 1809 "background-image: none;" |
|
| 1810 "background-color: @success_color;" |
|
| 1811 "}"; |
|
| 1812 |
1800 |
| 1813 gtk_entry_set_text(GTK_ENTRY(win->network.stun_server), |
1801 gtk_entry_set_text(GTK_ENTRY(win->network.stun_server), |
| 1814 purple_prefs_get_string("/purple/network/stun_server")); |
1802 purple_prefs_get_string("/purple/network/stun_server")); |
| 1815 |
1803 |
| 1816 pidgin_prefs_bind_checkbox("/purple/network/auto_ip", |
1804 pidgin_prefs_bind_checkbox("/purple/network/auto_ip", |
| 1819 |
1807 |
| 1820 gtk_entry_set_text(GTK_ENTRY(win->network.public_ip), |
1808 gtk_entry_set_text(GTK_ENTRY(win->network.public_ip), |
| 1821 purple_network_get_public_ip()); |
1809 purple_network_get_public_ip()); |
| 1822 |
1810 |
| 1823 ip_css = gtk_css_provider_new(); |
1811 ip_css = gtk_css_provider_new(); |
| 1824 gtk_css_provider_load_from_data(ip_css, ip_style, -1, NULL); |
1812 gtk_css_provider_load_from_resource(ip_css, res); |
| |
1813 |
| 1825 context = gtk_widget_get_style_context(win->network.public_ip); |
1814 context = gtk_widget_get_style_context(win->network.public_ip); |
| 1826 gtk_style_context_add_provider(context, |
1815 gtk_style_context_add_provider(context, |
| 1827 GTK_STYLE_PROVIDER(ip_css), |
1816 GTK_STYLE_PROVIDER(ip_css), |
| 1828 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); |
1817 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); |
| 1829 |
1818 |