| 65 GINT_TO_POINTER(type)); |
65 GINT_TO_POINTER(type)); |
| 66 |
66 |
| 67 return window; |
67 return window; |
| 68 } |
68 } |
| 69 |
69 |
| 70 /** |
70 /* |
| 71 * If the window is closed by the wm (ie, without triggering any of |
71 * If the window is closed by the wm (ie, without triggering any of |
| 72 * the buttons, then do some default callback. |
72 * the buttons, then do some default callback. |
| 73 */ |
73 */ |
| 74 static void |
74 static void |
| 75 setup_default_callback(GntWidget *window, gpointer default_cb, gpointer data) |
75 setup_default_callback(GntWidget *window, gpointer default_cb, gpointer data) |
| 87 0, 0, NULL, |
87 0, 0, NULL, |
| 88 g_object_get_data(data, "default-callback"), |
88 g_object_get_data(data, "default-callback"), |
| 89 NULL); |
89 NULL); |
| 90 } |
90 } |
| 91 |
91 |
| 92 /** |
92 /* |
| 93 * window: this is the window |
93 * setup_button_box: |
| 94 * userdata: the userdata to pass to the primary callbacks |
94 * @win: this is the window |
| 95 * cb: the callback |
95 * @userdata: the userdata to pass to the primary callbacks |
| 96 * data: data for the callback |
96 * @cb: the callback |
| 97 * (text, primary-callback) pairs, ended by a NULL |
97 * @data: data for the callback |
| |
98 * @...: (text, primary-callback) pairs, ended by a NULL |
| 98 * |
99 * |
| 99 * The cancellation callback should be the last callback sent. |
100 * The cancellation callback should be the last callback sent. |
| 100 */ |
101 */ |
| 101 static GntWidget * |
102 static GntWidget * |
| 102 setup_button_box(GntWidget *win, gpointer userdata, gpointer cb, gpointer data, ...) |
103 setup_button_box(GntWidget *win, gpointer userdata, gpointer cb, gpointer data, ...) |