]> Pileus Git - ~andy/gtk/blobdiff - tests/testsocket_common.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / tests / testsocket_common.c
index ababbf2b782372f3ec3d9f5a2dc945b10ebfe18c..c93f1e27978e268d9a2ee074576150a1b420fabe 100644 (file)
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
 #include <gtk/gtk.h>
 #if defined (GDK_WINDOWING_X11)
-#include "x11/gdkx.h"
+#include <gtk/gtkx.h>
 #elif defined (GDK_WINDOWING_WIN32)
 #include "win32/gdkwin32.h"
 #endif
@@ -132,28 +130,21 @@ add_buttons (GtkWidget *widget, GtkWidget *box)
 static GtkWidget *
 create_combo (void)
 {
-  GtkComboBox *combo;
+  GtkComboBoxText *combo;
   GtkWidget *entry;
-  GtkListStore *store;
-
-  store = gtk_list_store_new (1, G_TYPE_STRING);
-  combo = g_object_new (GTK_TYPE_COMBO_BOX,
-                       "has-entry", TRUE,
-                       "model", store,
-                       "entry-text-column", 0,
-                       NULL);
-  g_object_unref (store);
-
-  gtk_combo_box_append_text (combo, "item0");
-  gtk_combo_box_append_text (combo, "item1 item1");
-  gtk_combo_box_append_text (combo, "item2 item2 item2");
-  gtk_combo_box_append_text (combo, "item3 item3 item3 item3");
-  gtk_combo_box_append_text (combo, "item4 item4 item4 item4 item4");
-  gtk_combo_box_append_text (combo, "item5 item5 item5 item5 item5 item5");
-  gtk_combo_box_append_text (combo, "item6 item6 item6 item6 item6");
-  gtk_combo_box_append_text (combo, "item7 item7 item7 item7");
-  gtk_combo_box_append_text (combo, "item8 item8 item8");
-  gtk_combo_box_append_text (combo, "item9 item9");
+
+  combo = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new_with_entry ());
+
+  gtk_combo_box_text_append_text (combo, "item0");
+  gtk_combo_box_text_append_text (combo, "item1 item1");
+  gtk_combo_box_text_append_text (combo, "item2 item2 item2");
+  gtk_combo_box_text_append_text (combo, "item3 item3 item3 item3");
+  gtk_combo_box_text_append_text (combo, "item4 item4 item4 item4 item4");
+  gtk_combo_box_text_append_text (combo, "item5 item5 item5 item5 item5 item5");
+  gtk_combo_box_text_append_text (combo, "item6 item6 item6 item6 item6");
+  gtk_combo_box_text_append_text (combo, "item7 item7 item7 item7");
+  gtk_combo_box_text_append_text (combo, "item8 item8 item8");
+  gtk_combo_box_text_append_text (combo, "item9 item9");
 
   entry = gtk_bin_get_child (GTK_BIN (combo));
   gtk_entry_set_text (GTK_ENTRY (entry), "hello world");
@@ -224,7 +215,8 @@ create_content (GtkWindow *window, gboolean local)
 
   frame = gtk_frame_new (local? "Local" : "Remote");
   gtk_container_set_border_width (GTK_CONTAINER (frame), 3);
-  vbox = gtk_vbox_new (TRUE, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+  gtk_box_set_homogeneous (GTK_BOX (vbox), TRUE);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
 
   gtk_container_add (GTK_CONTAINER (frame), vbox);
@@ -286,6 +278,8 @@ create_child_plug (guint32  xid,
     return GDK_WINDOW_XID (gtk_widget_get_window (window));
 #elif defined (GDK_WINDOWING_WIN32)
     return (guint32) GDK_WINDOW_HWND (gtk_widget_get_window (window));
+#elif defined (GDK_WINDOWING_BROADWAY)
+    return (guint32) 0; /* Child windows not supported */
 #endif
   else
     return 0;