aboutsummaryrefslogtreecommitdiff
path: root/src/lib/eventloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eventloop.c')
-rw-r--r--src/lib/eventloop.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/lib/eventloop.c b/src/lib/eventloop.c
index 5dc971c1..7237f8f6 100644
--- a/src/lib/eventloop.c
+++ b/src/lib/eventloop.c
@@ -118,47 +118,6 @@ struct GNUNET_GTK_MainLoop
118 118
119 119
120/** 120/**
121 * If desired, enable plugging of this main window in the meta window.
122 *
123 * @param env_name environment variable to check
124 * @param main_window main window to plug
125 * @return new main window to initialize
126 */
127GtkWidget *
128GNUNET_GTK_plug_me (const char *env_name, GtkWidget *main_window)
129{
130#if HAVE_GTK_GTKX_H
131#ifdef GDK_WINDOWING_X11
132 const char *plugid;
133 GtkWidget *plug;
134 GtkWidget *child;
135 unsigned long long id;
136
137 if (NULL == (plugid = getenv (env_name)))
138 return main_window; /* no plugging */
139 if (1 != sscanf (plugid, "%llu", &id))
140 {
141 fprintf (stderr, _ ("Invalid plug name `%s'\n"), plugid);
142 return main_window;
143 }
144 plug = gtk_plug_new ((Window) id);
145 child = gtk_bin_get_child (GTK_BIN (main_window));
146 g_object_ref (child);
147 gtk_container_remove (GTK_CONTAINER (main_window), child);
148 gtk_container_add (GTK_CONTAINER (plug), child);
149 g_object_unref (child);
150 gtk_widget_destroy (main_window);
151 return plug;
152#else
153 return main_window;
154#endif
155#else
156 return main_window;
157#endif
158}
159
160
161/**
162 * Get the configuration. 121 * Get the configuration.
163 * 122 *
164 * @param ml handle to the main loop 123 * @param ml handle to the main loop