| 136 { |
136 { |
| 137 #ifdef HAVE_X11 |
137 #ifdef HAVE_X11 |
| 138 if (!XOpenDisplay(NULL)) { |
138 if (!XOpenDisplay(NULL)) { |
| 139 purple_debug_warning("gntclipboard", "Couldn't find X display\n"); |
139 purple_debug_warning("gntclipboard", "Couldn't find X display\n"); |
| 140 purple_notify_error(NULL, _("Error"), _("Error loading the plugin."), |
140 purple_notify_error(NULL, _("Error"), _("Error loading the plugin."), |
| 141 _("Couldn't find X display")); |
141 _("Couldn't find X display"), NULL); |
| 142 return FALSE; |
142 return FALSE; |
| 143 } |
143 } |
| 144 if (!getenv("WINDOWID")) { |
144 if (!getenv("WINDOWID")) { |
| 145 purple_debug_warning("gntclipboard", "Couldn't find window\n"); |
145 purple_debug_warning("gntclipboard", "Couldn't find window\n"); |
| 146 purple_notify_error(NULL, _("Error"), _("Error loading the plugin."), |
146 purple_notify_error(NULL, _("Error"), _("Error loading the plugin."), |
| 147 _("Couldn't find window")); |
147 _("Couldn't find window"), NULL); |
| 148 return FALSE; |
148 return FALSE; |
| 149 } |
149 } |
| 150 sig_handle = g_signal_connect(G_OBJECT(gnt_get_clipboard()), "clipboard_changed", G_CALLBACK(clipboard_changed), NULL); |
150 sig_handle = g_signal_connect(G_OBJECT(gnt_get_clipboard()), "clipboard_changed", G_CALLBACK(clipboard_changed), NULL); |
| 151 return TRUE; |
151 return TRUE; |
| 152 #else |
152 #else |