Exemple #1
0
static GtkWidget *create_main_menu()
{
    GtkWidget *menu;
    GtkWidget *preferences_item;
    GtkWidget *pickable_item;
    GtkWidget *quit_item;

    menu = gtk_menu_new();
    preferences_item = create_stock_menu_item("preferences_item",
                       GTK_STOCK_PREFERENCES, NULL, preferences_menu_item_activate_cb);
    gtk_menu_append(GTK_MENU(menu), preferences_item);

    /* pickable menu item */
    pickable_item = gtk_check_menu_item_new_with_label("Pickable");
    gtk_check_menu_item_set_active((GtkCheckMenuItem *)pickable_item, TRUE);
    gtk_check_menu_item_set_show_toggle((GtkCheckMenuItem *)pickable_item, TRUE);
    gtk_signal_connect_object((gpointer)pickable_item, "toggled",
                              GTK_SIGNAL_FUNC(pickable_menu_item_toggled_cb), pickable_item);
    gtk_widget_show(pickable_item);
    gtk_menu_append(GTK_MENU(menu), pickable_item);

    quit_item = create_menu_item("quit_item", "Quit",
                                 NULL, quit_menu_item_activate_cb);
    gtk_menu_append(GTK_MENU(menu), quit_item);
    GLADE_HOOKUP_OBJECT(menu, preferences_item, "preferences_item");
    GLADE_HOOKUP_OBJECT(menu, quit_item, "quit_item");

    return menu;
}
Exemple #2
0
GtkWidget*
create_window3 (void)
{
    GtkWidget *window3;
    GdkPixbuf *window3_icon_pixbuf;
    GtkWidget *fixed3;
    GtkWidget *label5;

    window3 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_set_size_request (window3, 236, 122);
    gtk_window_set_title (GTK_WINDOW (window3), _("\346\263\250\345\206\214\350\277\233\350\241\214\344\270\255"));
    gtk_window_set_resizable (GTK_WINDOW (window3), FALSE);
    window3_icon_pixbuf = gdk_pixbuf_new_from_xpm_data((gchar **)connecting_xpm);
    if (window3_icon_pixbuf)
    {
        gtk_window_set_icon (GTK_WINDOW (window3), window3_icon_pixbuf);
        gdk_pixbuf_unref (window3_icon_pixbuf);
    }

    fixed3 = gtk_fixed_new ();
    gtk_widget_show (fixed3);
    gtk_container_add (GTK_CONTAINER (window3), fixed3);

    label5 = gtk_label_new (_("\346\263\250\345\206\214\350\277\233\350\241\214\344\270\255\357\274\214\350\257\267\347\250\215\345\200\231\343\200\202\343\200\202\343\200\202"));
    gtk_widget_show (label5);
    gtk_fixed_put (GTK_FIXED (fixed3), label5, 24, 40);
    gtk_widget_set_size_request (label5, 200, 32);

    /* Store pointers to all widgets, for use by lookup_widget(). */
    GLADE_HOOKUP_OBJECT_NO_REF (window3, window3, "window3");
    GLADE_HOOKUP_OBJECT (window3, fixed3, "fixed3");
    GLADE_HOOKUP_OBJECT (window3, label5, "label5");

    return window3;
}
/* =================================
            Filter Preview
   ================================= */
uint8_t DIA_filterPreview(const char *captionText, AVDMGenericVideoStream *videoStream, uint32_t frame)
{
	ADM_assert(frame <= videoStream->getInfo()->nb_frames);

	GtkWidget *hbuttonbox1, *buttonOk, *scale;

	dialog = create_dialog1();
	
	scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 110, 1, 10, 0)));
	gtk_widget_show (scale);
	gtk_box_pack_start (GTK_BOX(WID(vbox1)), scale, FALSE, TRUE, 0);

	hbuttonbox1 = gtk_hbutton_box_new ();
	gtk_widget_show (hbuttonbox1);
	gtk_box_pack_start (GTK_BOX(WID(vbox1)), hbuttonbox1, FALSE, TRUE, 0);
	gtk_button_box_set_layout (GTK_BUTTON_BOX(hbuttonbox1), GTK_BUTTONBOX_END);

	buttonOk = gtk_button_new_from_stock ("gtk-ok");
	gtk_widget_show(buttonOk);
	gtk_container_add (GTK_CONTAINER(hbuttonbox1), buttonOk);
	GTK_WIDGET_SET_FLAGS (buttonOk, GTK_CAN_DEFAULT);

	GLADE_HOOKUP_OBJECT (dialog, scale, "scale");
	GLADE_HOOKUP_OBJECT(dialog, hbuttonbox1, "hbuttonbox1");
	GLADE_HOOKUP_OBJECT(dialog, buttonOk, "buttonOk");	
	
	gtk_register_dialog(dialog);

	if (captionText)
		gtk_window_set_title(GTK_WINDOW(dialog), captionText);

	uint32_t width, height;

	width = videoStream->getInfo()->width;
	height = videoStream->getInfo()->height;

	gtk_signal_connect(GTK_OBJECT(WID(scale)), "value_changed", GTK_SIGNAL_FUNC(seekablePreview_frame_changed), NULL);
	gtk_signal_connect(GTK_OBJECT(WID(drawingarea1)), "expose_event", GTK_SIGNAL_FUNC(seekablePreview_draw), NULL);
	gtk_dialog_add_action_widget(GTK_DIALOG(dialog), WID(buttonOk), GTK_RESPONSE_OK);

	gtk_widget_show(dialog);

	seekablePreview = new flySeekablePreview(width, height, videoStream, WID(drawingarea1), WID(scale));
	seekablePreview->process();
	seekablePreview->sliderSet(frame);
	seekablePreview->sliderChanged();

	int response;

	while((response = gtk_dialog_run(GTK_DIALOG(dialog))) == GTK_RESPONSE_APPLY)
	{
		seekablePreview_draw();
	}

	gtk_unregister_dialog(dialog);
	gtk_widget_destroy(dialog);
	delete seekablePreview;

	return (response == GTK_RESPONSE_OK);
}
/* =================================
             Common Dialog
   ================================= */
GtkWidget*
create_dialog1 (void)
{
	GtkWidget *dialog1;
	GtkWidget *dialog_vbox1;
	GtkWidget *vbox1;
	GtkWidget *drawingarea1;

	dialog1 = gtk_dialog_new ();
	gtk_window_set_title (GTK_WINDOW (dialog1), QT_TR_NOOP("Preview"));

	dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
	gtk_widget_show (dialog_vbox1);

	vbox1 = gtk_vbox_new (FALSE, 0);
	gtk_widget_show (vbox1);
	gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);

	drawingarea1 = gtk_drawing_area_new ();
	gtk_widget_show (drawingarea1);
	gtk_box_pack_start (GTK_BOX (vbox1), drawingarea1, FALSE, TRUE, 0);
	gtk_widget_set_size_request (drawingarea1, 100, 100);

	// Store pointers to all widgets, for use by lookup_widget().
	GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
	GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
	GLADE_HOOKUP_OBJECT (dialog1, vbox1, "vbox1");
	GLADE_HOOKUP_OBJECT (dialog1, drawingarea1, "drawingarea1");

	return dialog1;
}
Exemple #5
0
GtkWidget *create_tdb_about(void)
{
	GtkWidget *tdb_about;
	GtkWidget *vbox_about;
	GtkWidget *hbox_about_text;
	GtkWidget *img_about;
	GtkWidget *l_about_about;
	GtkWidget *dialog_action_about;
	GtkWidget *b_about_close;

	// set license text
	gchar license[200];
	sprintf(license, "%s %s", LIZMESS, tagid);

	tdb_about = gtk_dialog_new();
	gtk_window_set_title(GTK_WINDOW(tdb_about), _("About"));

	//vbox_about = GTK_DIALOG(tdb_about)->vbox;
	//gtk_widget_show(vbox_about);

	hbox_about_text = gtk_hbox_new(FALSE, 0);
	gtk_widget_show(hbox_about_text);
	gtk_box_pack_start(GTK_BOX(vbox_about), hbox_about_text, TRUE, TRUE, 0);

	img_about = create_pixmap(tdb_about, NULL);
	gtk_widget_show(img_about);
	gtk_box_pack_start(GTK_BOX(hbox_about_text), img_about, TRUE, TRUE, 0);

	l_about_about = gtk_label_new(_(license));
	gtk_widget_show(l_about_about);
	gtk_box_pack_start(GTK_BOX(hbox_about_text), l_about_about, FALSE, FALSE,
						  0);

	dialog_action_about = GTK_DIALOG(tdb_about)->action_area;
	gtk_widget_show(dialog_action_about);
	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_about),
									GTK_BUTTONBOX_END);

	b_about_close = gtk_button_new_from_stock("gtk-close");
	gtk_widget_show(b_about_close);
	gtk_dialog_add_action_widget(GTK_DIALOG(tdb_about), b_about_close,
										GTK_RESPONSE_CLOSE);
	GTK_WIDGET_SET_FLAGS(b_about_close, GTK_CAN_DEFAULT);

	g_signal_connect((gpointer) b_about_close, "clicked",
						G_CALLBACK(on_b_about_close_clicked), NULL);

	/* Store pointers to all widgets, for use by lookup_widget(). */
	GLADE_HOOKUP_OBJECT_NO_REF(tdb_about, tdb_about, "tdb_about");
	GLADE_HOOKUP_OBJECT_NO_REF(tdb_about, vbox_about, "vbox_about");
	GLADE_HOOKUP_OBJECT(tdb_about, hbox_about_text, "hbox_about_text");
	GLADE_HOOKUP_OBJECT(tdb_about, img_about, "img_about");
	GLADE_HOOKUP_OBJECT(tdb_about, l_about_about, "l_about_about");
	GLADE_HOOKUP_OBJECT_NO_REF(tdb_about, dialog_action_about,
									 "dialog_action_about");
	GLADE_HOOKUP_OBJECT(tdb_about, b_about_close, "b_about_close");

	return tdb_about;
}
GtkWidget*
create_dialog1 (void)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *vbox1;
  GtkWidget *label1;
  GtkWidget *entry1;
  GtkWidget *dialog_action_area1;
  GtkWidget *cancelbutton1;
  GtkWidget *okbutton1;

  dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dialog1), _("Lame command"));

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);

  label1 = gtk_label_new (_("Enter parameters (i.e. -b 192 -m s ...)"));
  gtk_widget_show (label1);
  gtk_box_pack_start (GTK_BOX (vbox1), label1, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_LEFT);

  entry1 = gtk_entry_new ();
  gtk_widget_show (entry1);
  gtk_box_pack_start (GTK_BOX (vbox1), entry1, FALSE, FALSE, 0);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), cancelbutton1, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);

  okbutton1 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, label1, "label1");
  GLADE_HOOKUP_OBJECT (dialog1, entry1, "entry1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dialog1, cancelbutton1, "cancelbutton1");
  GLADE_HOOKUP_OBJECT (dialog1, okbutton1, "okbutton1");

  return dialog1;
}
GtkWidget	*create_dialog1 (void)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *vbox1;
  GtkWidget *hscale1;
  GtkWidget *drawingarea1;
  GtkWidget *dialog_action_area1;
  GtkWidget *cancelbutton1;
  GtkWidget *okbutton1;

  dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dialog1), _("Rotate"));

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);

  adj_angle=gtk_adjustment_new (0.0, 0.0, 360.0, 90.0, 90.0, 90.0);
  hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (adj_angle));
  gtk_widget_show (hscale1);
  gtk_box_pack_start (GTK_BOX (vbox1), hscale1, FALSE, TRUE, 0);
  gtk_scale_set_digits (GTK_SCALE (hscale1), 0);

  drawingarea1 = gtk_drawing_area_new ();
  gtk_widget_show (drawingarea1);
  gtk_box_pack_start (GTK_BOX (vbox1), drawingarea1, TRUE, TRUE, 0);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), cancelbutton1, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);

  okbutton1 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, hscale1, "hscale1");
  GLADE_HOOKUP_OBJECT (dialog1, drawingarea1, "drawingarea1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dialog1, cancelbutton1, "cancelbutton1");
  GLADE_HOOKUP_OBJECT (dialog1, okbutton1, "okbutton1");

  return dialog1;
}
Exemple #8
0
GtkWidget*
create_MainWindow (void)
{
  GtkWidget *MainWindow;
  GtkWidget *SplitPane;
  GtkWidget *RemoteText;
  GtkWidget *LocalText;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request (MainWindow, 400, 300);
  gtk_window_set_title (GTK_WINDOW (MainWindow), "Synchronet Sysop Chat");
  gtk_window_set_icon_name (GTK_WINDOW (MainWindow), "stock_help-chat");
  gtk_window_set_type_hint (GTK_WINDOW (MainWindow), GDK_WINDOW_TYPE_HINT_UTILITY);

  SplitPane = gtk_vpaned_new ();
  gtk_widget_show (SplitPane);
  gtk_container_add (GTK_CONTAINER (MainWindow), SplitPane);
  gtk_paned_set_position (GTK_PANED (SplitPane), 148);

  RemoteText = gtk_text_view_new ();
  gtk_widget_show (RemoteText);
  gtk_paned_pack1 (GTK_PANED (SplitPane), RemoteText, FALSE, TRUE);
  GTK_WIDGET_UNSET_FLAGS (RemoteText, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, RemoteText, "Remote Text Window", NULL);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (RemoteText), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (RemoteText), GTK_WRAP_WORD);

  LocalText = gtk_text_view_new ();
  gtk_widget_show (LocalText);
  gtk_paned_pack2 (GTK_PANED (SplitPane), LocalText, TRUE, TRUE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (LocalText), GTK_WRAP_WORD);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (LocalText), FALSE);

  g_signal_connect ((gpointer) MainWindow, "destroy",
                    G_CALLBACK (on_MainWindow_destroy),
                    NULL);
  g_signal_connect ((gpointer) LocalText, "key_press_event",
                    G_CALLBACK (on_LocalText_key_press_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (MainWindow, MainWindow, "MainWindow");
  GLADE_HOOKUP_OBJECT (MainWindow, SplitPane, "SplitPane");
  GLADE_HOOKUP_OBJECT (MainWindow, RemoteText, "RemoteText");
  GLADE_HOOKUP_OBJECT (MainWindow, LocalText, "LocalText");
  GLADE_HOOKUP_OBJECT_NO_REF (MainWindow, tooltips, "tooltips");

  gtk_widget_grab_focus (LocalText);

  gtk_timeout_add(50, get_from_remote, RemoteText);

  return MainWindow;
}
GtkWidget *create_dialog1 (void)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *hbox1;
  GtkWidget *combobox1;
  GtkWidget *buttonConf;
  GtkWidget *dialog_action_area1;
  GtkWidget *cancelbutton1;
  GtkWidget *okbutton1;

  dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dialog1), QT_TR_NOOP("Video encoder"));
  gtk_window_set_type_hint (GTK_WINDOW (dialog1), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0);

  combobox1 = gtk_combo_box_new_text ();
  gtk_widget_show (combobox1);
  gtk_box_pack_start (GTK_BOX (hbox1), combobox1, TRUE, TRUE, 0);

  buttonConf = gtk_button_new_with_mnemonic (QT_TR_NOOP("Configure"));
  gtk_widget_show (buttonConf);
  gtk_box_pack_start (GTK_BOX (hbox1), buttonConf, FALSE, FALSE, 0);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), cancelbutton1, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);

  okbutton1 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (dialog1, combobox1, "combobox1");
  GLADE_HOOKUP_OBJECT (dialog1, buttonConf, "buttonConf");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dialog1, cancelbutton1, "cancelbutton1");
  GLADE_HOOKUP_OBJECT (dialog1, okbutton1, "okbutton1");

  return dialog1;
}
GtkWidget *create_alerts_page(GtkWidget * window) {
    GtkWidget *main_widget = NULL,
        *scrolled_window = NULL,
        *user_alerts_list_view = NULL,
        *alerts_list_view = NULL,
        *buttons_box = NULL, *add_button = NULL, *remove_button = NULL;
#ifdef DEBUGFUNCTIONCALL
    START_FUNCTION;
#endif
    main_widget = gtk_hbox_new(FALSE, 0);
    /* User alerts list */
    scrolled_window = gtk_scrolled_window_new(NULL, NULL);
    gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW
                                        (scrolled_window),
                                        GTK_SHADOW_ETCHED_IN);
    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
                                   GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
    gtk_widget_set_size_request(GTK_WIDGET(scrolled_window), 250, 280);
    gtk_box_pack_start(GTK_BOX(main_widget), scrolled_window, FALSE,
                       FALSE, 0);

    user_alerts_list_view = create_tree_view(app->user_alerts_list);
    GLADE_HOOKUP_OBJECT(window, user_alerts_list_view,
                        "user_alerts_list_view");
    gtk_container_add(GTK_CONTAINER(scrolled_window),
                      GTK_WIDGET(user_alerts_list_view));
    /* buttons */
    buttons_box = gtk_vbox_new(FALSE, 0);
    add_button = create_button_with_image(NULL, "qgn_list_hw_button_left",
                                          26, TRUE, FALSE);
    remove_button =
        create_button_with_image(NULL, "qgn_list_hw_button_right", 26,
                                 TRUE, FALSE);
    gtk_box_pack_start(GTK_BOX(buttons_box), add_button, FALSE, FALSE, 80);
    gtk_box_pack_start(GTK_BOX(buttons_box), remove_button, FALSE,
                       FALSE, 80);
    gtk_box_pack_start(GTK_BOX(main_widget), buttons_box, FALSE, FALSE,
                       10);
    /* Alerts list */
    scrolled_window = gtk_scrolled_window_new(NULL, NULL);
    gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW
                                        (scrolled_window),
                                        GTK_SHADOW_ETCHED_IN);
    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
                                   GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
    gtk_widget_set_size_request(GTK_WIDGET(scrolled_window), 250, 280);
    gtk_box_pack_start(GTK_BOX(main_widget), scrolled_window, FALSE,
                       FALSE, 0);

    alerts_list_view = create_tree_view(create_alerts_list());
    GLADE_HOOKUP_OBJECT(window, user_alerts_list_view, "alerts_list_view");
    gtk_container_add(GTK_CONTAINER(scrolled_window),
                      GTK_WIDGET(alerts_list_view));
    gtk_widget_show_all(main_widget);
    return main_widget;
}
GtkWidget*
create_dialog1 (void)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *vbox1;
  GtkWidget *checkbuttonSwap;
  GtkWidget *checkbutton2;
  GtkWidget *dialog_action_area1;
  GtkWidget *cancelbutton1;
  GtkWidget *okbutton1;

  dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dialog1), _("Libavcodec Decoder Option"));

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);

  checkbuttonSwap = gtk_check_button_new_with_mnemonic (_("Swap UV"));
  gtk_widget_show (checkbuttonSwap);
  gtk_box_pack_start (GTK_BOX (vbox1), checkbuttonSwap, FALSE, FALSE, 0);

  checkbutton2 = gtk_check_button_new_with_mnemonic (_("Show motion Vectors"));
  gtk_widget_show (checkbutton2);
  gtk_box_pack_start (GTK_BOX (vbox1), checkbutton2, FALSE, FALSE, 0);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), cancelbutton1, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);

  okbutton1 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, checkbuttonSwap, "checkbuttonSwap");
  GLADE_HOOKUP_OBJECT (dialog1, checkbutton2, "checkbutton2");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dialog1, cancelbutton1, "cancelbutton1");
  GLADE_HOOKUP_OBJECT (dialog1, okbutton1, "okbutton1");

  return dialog1;
}
Exemple #12
0
GtkWidget*
create_bsv_driver_info_dlg (void)
{
  GtkWidget *bsv_driver_info_dlg;
  GtkWidget *dialog_vbox2;
  GtkWidget *hbox26;
  GtkWidget *label_desc;
  GtkWidget *label_val;
  GtkWidget *dialog_action_area2;
  GtkWidget *okbutton2;

  bsv_driver_info_dlg = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (bsv_driver_info_dlg), _("Driver Information"));

  dialog_vbox2 = GTK_DIALOG (bsv_driver_info_dlg)->vbox;
  gtk_widget_show (dialog_vbox2);

  hbox26 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox26);
  gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox26, TRUE, TRUE, 0);

  label_desc = gtk_label_new (_("label14"));
  gtk_widget_show (label_desc);
  gtk_box_pack_start (GTK_BOX (hbox26), label_desc, TRUE, TRUE, 0);

  label_val = gtk_label_new (_("label15"));
  gtk_widget_show (label_val);
  gtk_box_pack_start (GTK_BOX (hbox26), label_val, TRUE, TRUE, 0);

  dialog_action_area2 = GTK_DIALOG (bsv_driver_info_dlg)->action_area;
  gtk_widget_show (dialog_action_area2);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);

  okbutton2 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton2);
  gtk_dialog_add_action_widget (GTK_DIALOG (bsv_driver_info_dlg), okbutton2, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (okbutton2, GTK_CAN_DEFAULT);

  g_signal_connect_swapped ((gpointer) bsv_driver_info_dlg, "delete_event",
                            G_CALLBACK (gtk_widget_hide),
                            GTK_OBJECT (bsv_driver_info_dlg));
  g_signal_connect_swapped ((gpointer) okbutton2, "clicked",
                            G_CALLBACK (gtk_widget_hide),
                            GTK_OBJECT (bsv_driver_info_dlg));

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (bsv_driver_info_dlg, bsv_driver_info_dlg, "bsv_driver_info_dlg");
  GLADE_HOOKUP_OBJECT_NO_REF (bsv_driver_info_dlg, dialog_vbox2, "dialog_vbox2");
  GLADE_HOOKUP_OBJECT (bsv_driver_info_dlg, hbox26, "hbox26");
  GLADE_HOOKUP_OBJECT (bsv_driver_info_dlg, label_desc, "label_desc");
  GLADE_HOOKUP_OBJECT (bsv_driver_info_dlg, label_val, "label_val");
  GLADE_HOOKUP_OBJECT_NO_REF (bsv_driver_info_dlg, dialog_action_area2, "dialog_action_area2");
  GLADE_HOOKUP_OBJECT (bsv_driver_info_dlg, okbutton2, "okbutton2");

  return bsv_driver_info_dlg;
}
GtkWidget*
create_window1 (void)
{
  GtkWidget *window1;
  AtkObject *atko;
  GtkWidget *taula_principal;
  GtkWidget *llista;
  GtkWidget *reprodueix;
  GtkWidget *surt;

  window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window1), _("Miniphono"));

  taula_principal = gtk_table_new (3, 3, TRUE);
  gtk_widget_show (taula_principal);
  gtk_container_add (GTK_CONTAINER (window1), taula_principal);

  llista = gtk_button_new_with_mnemonic (_("Selecciona una llista"));
  gtk_widget_show (llista);
  gtk_table_attach (GTK_TABLE (taula_principal), llista, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
  gtk_widget_set_size_request (llista, 200, 50);

  reprodueix = gtk_button_new_with_mnemonic (_("reprodueix"));
  gtk_widget_show (reprodueix);
  gtk_table_attach (GTK_TABLE (taula_principal), reprodueix, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
  gtk_widget_set_size_request (reprodueix, 100, 50);

  surt = gtk_button_new_with_mnemonic (_("surt"));
  gtk_widget_show (surt);
  gtk_table_attach (GTK_TABLE (taula_principal), surt, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
  gtk_widget_set_size_request (surt, 100, 50);

  g_signal_connect ((gpointer) surt, "clicked",
                    G_CALLBACK (gtk_main_quit),
                    NULL);

  atko = gtk_widget_get_accessible (window1);
  atk_object_set_name (atko, _("Miniphono"));


  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window1, window1, "window1");
  GLADE_HOOKUP_OBJECT (window1, taula_principal, "taula_principal");
  GLADE_HOOKUP_OBJECT (window1, llista, "llista");
  GLADE_HOOKUP_OBJECT (window1, reprodueix, "reprodueix");
  GLADE_HOOKUP_OBJECT (window1, surt, "surt");

  return window1;
}
Exemple #14
0
GtkWidget *create_tdb_exit(void)
{
	GtkWidget *tdb_exit;
	GtkWidget *vbox_exit;
	GtkWidget *l_exit_q;
	GtkWidget *dialog_action_exit;
	GtkWidget *b_exit_cancel;
	GtkWidget *b_exit_ok;

	tdb_exit = gtk_dialog_new();
	gtk_window_set_title(GTK_WINDOW(tdb_exit), _("Exit"));

	vbox_exit = GTK_DIALOG(tdb_exit)->vbox;
	gtk_widget_show(vbox_exit);

	l_exit_q =
	  gtk_label_new(_
						 ("Do you really want to exit and close any open work ?"));
	gtk_widget_show(l_exit_q);
	gtk_box_pack_start(GTK_BOX(vbox_exit), l_exit_q, TRUE, FALSE, 0);
	gtk_misc_set_padding(GTK_MISC(l_exit_q), 0, 15);

	dialog_action_exit = GTK_DIALOG(tdb_exit)->action_area;
	gtk_widget_show(dialog_action_exit);
	gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_exit),
									GTK_BUTTONBOX_END);

	b_exit_cancel = gtk_button_new_from_stock("gtk-cancel");
	gtk_widget_show(b_exit_cancel);
	gtk_dialog_add_action_widget(GTK_DIALOG(tdb_exit), b_exit_cancel,
										GTK_RESPONSE_CANCEL);
	GTK_WIDGET_SET_FLAGS(b_exit_cancel, GTK_CAN_DEFAULT);

	b_exit_ok = gtk_button_new_from_stock("gtk-ok");
	gtk_widget_show(b_exit_ok);
	gtk_dialog_add_action_widget(GTK_DIALOG(tdb_exit), b_exit_ok,
										GTK_RESPONSE_OK);
	GTK_WIDGET_SET_FLAGS(b_exit_ok, GTK_CAN_DEFAULT);

	g_signal_connect((gpointer) b_exit_cancel, "clicked",
						G_CALLBACK(on_b_exit_cancel_clicked), NULL);
	g_signal_connect((gpointer) b_exit_ok, "clicked",
						G_CALLBACK(on_b_exit_ok_clicked), NULL);

	/* Store pointers to all widgets, for use by lookup_widget(). */
	GLADE_HOOKUP_OBJECT_NO_REF(tdb_exit, tdb_exit, "tdb_exit");
	GLADE_HOOKUP_OBJECT_NO_REF(tdb_exit, vbox_exit, "vbox_exit");
	GLADE_HOOKUP_OBJECT(tdb_exit, l_exit_q, "l_exit_q");
	GLADE_HOOKUP_OBJECT_NO_REF(tdb_exit, dialog_action_exit,
									 "dialog_action_exit");
	GLADE_HOOKUP_OBJECT(tdb_exit, b_exit_cancel, "b_exit_cancel");
	GLADE_HOOKUP_OBJECT(tdb_exit, b_exit_ok, "b_exit_ok");

	return tdb_exit;
}
Exemple #15
0
GtkWidget*
create_window2 (void)
{
  GtkWidget *window2;
  GtkWidget *fixed2;
  GtkWidget *button4;
  GtkWidget *label4;
  GtkWidget *label3;

  window2 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request (window2, 250, 170);
  gtk_window_set_title (GTK_WINDOW (window2), _("About"));
  gtk_window_set_position (GTK_WINDOW (window2), GTK_WIN_POS_CENTER);
  gtk_window_set_modal (GTK_WINDOW (window2), TRUE);
  gtk_window_set_resizable (GTK_WINDOW (window2), FALSE);

  fixed2 = gtk_fixed_new ();
  gtk_widget_show (fixed2);
  gtk_container_add (GTK_CONTAINER (window2), fixed2);

  button4 = gtk_button_new_from_stock ("gtk-close");
  gtk_widget_show (button4);
  gtk_fixed_put (GTK_FIXED (fixed2), button4, 80, 128);
  gtk_widget_set_size_request (button4, 88, 24);

  label4 = gtk_label_new_with_mnemonic (_("Qvwm Background Changer"));
  gtk_widget_show (label4);
  gtk_fixed_put (GTK_FIXED (fixed2), label4, 40, 8);
  gtk_widget_set_size_request (label4, 176, 16);
  gtk_label_set_use_markup (GTK_LABEL (label4), TRUE);

  label3 = gtk_label_new (_("2003-2007 (c) M.Ali VARDAR\nThis program under GPL licence"));
  gtk_widget_show (label3);
  gtk_fixed_put (GTK_FIXED (fixed2), label3, 24, 32);
  gtk_widget_set_size_request (label3, 208, 72);

  g_signal_connect ((gpointer) window2, "delete_event",
                    G_CALLBACK (on_window2_delete_event),
                    NULL);
  g_signal_connect ((gpointer) window2, "destroy_event",
                    G_CALLBACK (on_window2_destroy_event),
                    NULL);
  g_signal_connect ((gpointer) button4, "clicked",
                    G_CALLBACK (on_button4_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window2, window2, "window2");
  GLADE_HOOKUP_OBJECT (window2, fixed2, "fixed2");
  GLADE_HOOKUP_OBJECT (window2, button4, "button4");
  GLADE_HOOKUP_OBJECT (window2, label4, "label4");
  GLADE_HOOKUP_OBJECT (window2, label3, "label3");

  return window2;
}
Exemple #16
0
GtkWidget* create_Offline (void)
{
        GtkWidget *Offline;
        GtkWidget *dialog_vbox4;
        GtkWidget *dialog_action_area4;
        GtkWidget *butOfflineDelete;
        GtkWidget *butOfflineClose;

        Offline = gnome_dialog_new (_("gchat - Offline Messages"), NULL);
        gtk_widget_set_usize (Offline, 500, 250);
        gtk_window_set_default_size (GTK_WINDOW (Offline), 350, 200);
        gtk_window_set_resizable (GTK_WINDOW (Offline), FALSE);

        dialog_vbox4 = GNOME_DIALOG (Offline)->vbox;
        gtk_widget_show (dialog_vbox4);

        scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
        gtk_widget_show (scrolledwindow4);
        gtk_box_pack_start (GTK_BOX (dialog_vbox4), scrolledwindow4, TRUE, TRUE, 0);

        dialog_action_area4 = GNOME_DIALOG (Offline)->action_area;
        gtk_widget_show (dialog_action_area4);
        gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_EDGE);

        gnome_dialog_append_button (GNOME_DIALOG (Offline), "gtk-delete");
        butOfflineDelete = GTK_WIDGET (g_list_last (GNOME_DIALOG (Offline)->buttons)->data);
        gtk_widget_show (butOfflineDelete);
        gtk_widget_set_sensitive (butOfflineDelete, FALSE);
        GTK_WIDGET_SET_FLAGS (butOfflineDelete, GTK_CAN_DEFAULT);

        gnome_dialog_append_button (GNOME_DIALOG (Offline), "gtk-close");
        butOfflineClose = GTK_WIDGET (g_list_last (GNOME_DIALOG (Offline)->buttons)->data);
        gtk_widget_show (butOfflineClose);
        GTK_WIDGET_SET_FLAGS (butOfflineClose, GTK_CAN_DEFAULT);

        gtk_signal_connect (GTK_OBJECT (butOfflineDelete), "clicked",
                            G_CALLBACK (on_butOfflineDelete_clicked),
                            NULL);
        gtk_signal_connect (GTK_OBJECT (butOfflineClose), "clicked",
                            G_CALLBACK (on_butOfflineClose_clicked),
                            NULL);

        /* Store pointers to all widgets, for use by lookup_widget(). */
        GLADE_HOOKUP_OBJECT_NO_REF (Offline, Offline, "Offline");
        GLADE_HOOKUP_OBJECT_NO_REF (Offline, dialog_vbox4, "dialog_vbox4");
        GLADE_HOOKUP_OBJECT (Offline, scrolledwindow4, "scrolledwindow4");
        GLADE_HOOKUP_OBJECT_NO_REF (Offline, dialog_action_area4, "dialog_action_area4");
        GLADE_HOOKUP_OBJECT (Offline, butOfflineDelete, "butOfflineDelete");
        GLADE_HOOKUP_OBJECT (Offline, butOfflineClose, "butOfflineClose");

        return Offline;
}
Exemple #17
0
GtkWidget*
create_dialog1 (void)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *fixed3;
  GtkWidget *label5;
  GtkWidget *dialog_action_area1;
  GtkWidget *okbutton1;

  dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dialog1), _("Warning"));
  gtk_window_set_position (GTK_WINDOW (dialog1), GTK_WIN_POS_CENTER);
  gtk_window_set_modal (GTK_WINDOW (dialog1), TRUE);
  gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog1), TRUE);
  gtk_window_set_type_hint (GTK_WINDOW (dialog1), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  fixed3 = gtk_fixed_new ();
  gtk_widget_show (fixed3);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), fixed3, TRUE, TRUE, 0);

  label5 = gtk_label_new (_("Background Setting successfully saved. "));
  gtk_widget_show (label5);
  gtk_fixed_put (GTK_FIXED (fixed3), label5, 32, 8);
  gtk_widget_set_size_request (label5, 288, 56);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  okbutton1 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) okbutton1, "clicked",
                    G_CALLBACK (on_okbutton1_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, fixed3, "fixed3");
  GLADE_HOOKUP_OBJECT (dialog1, label5, "label5");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dialog1, okbutton1, "okbutton1");

  return dialog1;
}
Exemple #18
0
GtkWidget*
create_windowc (char *BoxName, char *CallShow,int i)
{
    GtkWidget *windowc;
    GdkPixbuf *windowc_icon_pixbuf;
    GtkWidget *fixed2;
    GtkWidget *label4;
    GtkWidget *button1;

    windowc = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_set_size_request (windowc, 260, 90);
    gtk_window_set_title (GTK_WINDOW (windowc), _(BoxName));
    gtk_window_set_resizable (GTK_WINDOW (windowc), FALSE);
    windowc_icon_pixbuf =gdk_pixbuf_new_from_xpm_data((gchar **)connecting_xpm);
    if (windowc_icon_pixbuf)
    {
        gtk_window_set_icon (GTK_WINDOW (windowc), windowc_icon_pixbuf);
        gdk_pixbuf_unref (windowc_icon_pixbuf);
    }

    fixed2 = gtk_fixed_new ();
    gtk_widget_show (fixed2);
    gtk_container_add (GTK_CONTAINER (windowc), fixed2);

    label4 = gtk_label_new (_(CallShow));
    gtk_widget_show (label4);
    gtk_fixed_put (GTK_FIXED (fixed2), label4, 24, 0);
    gtk_widget_set_size_request (label4, 197, 57);

    button1 = gtk_button_new_with_mnemonic (_("\347\241\256\345\256\232\n"));
    gtk_widget_show (button1);
    gtk_fixed_put (GTK_FIXED (fixed2), button1, 96, 56);
    gtk_widget_set_size_request (button1, 55, 29);

    if(i==1) {
        g_signal_connect ((gpointer) button1, "clicked",
                          G_CALLBACK (delete_getAtrBox),
                          NULL);
    } else if(i==0) {
        g_signal_connect ((gpointer) button1, "clicked",
                          G_CALLBACK (gtk_main_quit),
                          NULL);
    }

    /* Store pointers to all widgets, for use by lookup_widget(). */
    GLADE_HOOKUP_OBJECT_NO_REF (windowc, windowc, "window2");
    GLADE_HOOKUP_OBJECT (windowc, fixed2, "fixed2");
    GLADE_HOOKUP_OBJECT (windowc, label4, "label4");
    GLADE_HOOKUP_OBJECT (windowc, button1, "button1");

    return windowc;
}
GtkWidget*
create_dialog1 (void)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *image1;
  GtkWidget *dialog_action_area1;

  dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dialog1), _("Busy"));

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  image1 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), image1, TRUE, TRUE, 0);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, image1, "image1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");

  return dialog1;
}
//分辨率窗口初始化
void create_gtkdemo_resolution (GtkWidget *window,int hCamera,tSdkCameraCapbility * pCameraInfo)
{
    GtkWidget               *combobox = NULL;
    GtkListStore            *store = NULL;
    GtkTreeIter             iter;
    GtkCellRenderer         *renderer = NULL;
    int                     i=0;
    tSdkImageResolution     *pImageSizeDesc=pCameraInfo->pImageSizeDesc;// 预设分辨率选择
    int                     iImageSizeDesc=pCameraInfo->iImageSizeDesc; // 预设分辨率的个数,即pImageSizeDesc数组的大小

    combobox = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "res_combobox"));


    GLADE_HOOKUP_OBJECT (window, combobox, "res_combobox");

    store = gtk_list_store_new(1, G_TYPE_STRING);

//与SDK相关到操作需要获取参数
    for(i=0;i<iImageSizeDesc;i++){
        gtk_list_store_append((GtkListStore *)store, &iter);
        gtk_list_store_set((GtkListStore *)store, &iter, 0, pImageSizeDesc[i].acDescription, -1);
    }

    // 设置GtkTreeModel中的每一项数据如何在列表框中显示
    gtk_combo_box_set_model((GtkComboBox *)combobox,(GtkTreeModel *)store );

    renderer = gtk_cell_renderer_text_new();
    gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combobox), renderer, TRUE);
    gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combobox), renderer, "text", 0, NULL);
    gtk_signal_connect(GTK_OBJECT(combobox), "changed",G_CALLBACK (on_res_combobox_changed), NULL);


    return ;
}
void create_gtkdemo_speed (GtkWidget *window,int hCamera,tSdkCameraCapbility * pCameraInfo)
{
    int         i,size=pCameraInfo->iFrameSpeedDesc;
    GtkWidget   *layout_speed;
    GtkWidget   *radio_speed[size];
    GtkWidget   * box;
    GSList      *group=NULL;

    layout_speed = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "layout_speed"));

    box = gtk_hbox_new(FALSE,10);
    gtk_container_set_border_width(GTK_CONTAINER(box),10);
    gtk_container_add(GTK_CONTAINER(layout_speed),box);

    //创建多选按钮组
    for(i=0;i<size;i++){

        radio_speed[i] = gtk_radio_button_new_with_label(group,pCameraInfo->pFrameSpeedDesc[i].acDescription);
        group=gtk_radio_button_group(GTK_RADIO_BUTTON(radio_speed[i]));/*将按钮加入组装框*/
        g_signal_connect(G_OBJECT(radio_speed[i]),"released",G_CALLBACK(on_radio_speed_clicked),(gpointer)i);
        gtk_box_pack_start(GTK_BOX(box),radio_speed[i],FALSE,FALSE,5);

        GLADE_HOOKUP_OBJECT (window, radio_speed[i], pCameraInfo->pFrameSpeedDesc[i].acDescription);
    }


    gtk_widget_show_all(box);

    return ;
}
Exemple #22
0
static GtkWidget *
create_group_menu(GtkWidget *window) {
  GtkWidget *menu;
  GtkWidget *new_item;
  GList *groups,*node;


  menu=gtk_menu_new(); 

  groups=get_group_list();

  for(node=g_list_first(groups);node;node=g_list_next (node)) {

    if (node->data){
      dbg_out("Group:%s(%x)\n",node->data,node->data);
      new_item=create_menu_item(node->data,node->data,NULL,on_usermenu_group_item);

      gtk_menu_append( GTK_MENU(menu), new_item);
      GLADE_HOOKUP_OBJECT(new_item,window,"messageWindow");
      g_free(node->data);
    }
  }

  g_list_free(groups);

  return menu;
}
void create_gtkdemo_mapp (GtkWidget *window)
{

    GtkWidget *hscale_mapp_contrast;
    GtkWidget *hscale_mapp_gamma;

    hscale_mapp_contrast = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "hscale_mapp_contrast"));
    hscale_mapp_gamma = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "hscale_mapp_gamma"));

    g_signal_connect(G_OBJECT(hscale_mapp_contrast),"value_changed",G_CALLBACK(on_mapp_contrast_value_changed),NULL);
    g_signal_connect(G_OBJECT(hscale_mapp_gamma),"value_changed",G_CALLBACK(on_mapp_gamma_value_changed),NULL);

    GLADE_HOOKUP_OBJECT (window, hscale_mapp_contrast, "hscale_mapp_contrast");
    GLADE_HOOKUP_OBJECT (window, hscale_mapp_gamma, "hscale_mapp_gamma");

    return ;
}
Exemple #24
0
void contact_draw(GtkWidget *w, LinphoneProxyConfig *cfg){
	GtkWidget *table=lookup_widget(w,"table10");
	GtkWidget *combo;
	combo=proxy_combo_box_new(cfg);
	gtk_widget_show(combo);
	gtk_table_attach(GTK_TABLE(table),combo,1,2,2,3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
	GLADE_HOOKUP_OBJECT(w,combo,"proxy");
	combo=gtk_combo_box_new_text();
	gtk_combo_box_append_text(GTK_COMBO_BOX(combo),_("Wait"));
	gtk_combo_box_append_text(GTK_COMBO_BOX(combo),_("Deny"));
	gtk_combo_box_append_text(GTK_COMBO_BOX(combo),_("Accept"));
	gtk_widget_show(combo);
	gtk_table_attach(GTK_TABLE(table),combo,1,2,3,4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
	GLADE_HOOKUP_OBJECT(w,combo,"pol");
}
GtkWidget* create_gtkdemo_statusbar (GtkWidget *window)
{

    GtkWidget *statusbar;

    statusbar = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "statusbar"));

    GLADE_HOOKUP_OBJECT (window, statusbar, "statusbar");

    return statusbar;
}
void create_gtkdemo_image_processing (GtkWidget *window)
{
    GtkWidget *check_isp_h;
    GtkWidget *check_isp_v;
    GtkWidget *hscale_isp_acutance;

    check_isp_h = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "check_isp_h"));
    check_isp_v = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "check_isp_v"));
    hscale_isp_acutance = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "hscale_isp_acutance"));

    g_signal_connect(G_OBJECT(check_isp_h),"clicked",G_CALLBACK(on_isp_h_check),NULL);
    g_signal_connect(G_OBJECT(check_isp_v),"clicked",G_CALLBACK(on_isp_v_check),NULL);
    g_signal_connect(G_OBJECT(hscale_isp_acutance),"value_changed",G_CALLBACK(on_isp_acutance_value_changed),NULL);


    GLADE_HOOKUP_OBJECT (window, check_isp_h, "check_isp_h");
    GLADE_HOOKUP_OBJECT (window, check_isp_v, "check_isp_v");
    GLADE_HOOKUP_OBJECT (window, hscale_isp_acutance, "hscale_isp_acutance");

    return ;

}
Exemple #27
0
GtkWidget*
create_About (void)
{
  GtkWidget *About;
  GtkWidget *vbox2;
  GtkWidget *label2;
  GtkWidget *label3;
  GtkWidget *label4;
  GtkWidget *hbuttonbox2;
  GtkWidget *button3;

  About = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (About), 5);
  gtk_window_set_title (GTK_WINDOW (About), _("ZeroGS KOSMOS About"));

  vbox2 = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (vbox2);
  gtk_container_add (GTK_CONTAINER (About), vbox2);
  gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);

  label2 = gtk_label_new (_("OpenGL version"));
  gtk_widget_show (label2);
  gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_CENTER);

  label3 = gtk_label_new (_("Author: zerofrog(@gmail.com)"));
  gtk_widget_show (label3);
  gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);

  label4 = gtk_label_new (_("Many thanks to the Pcsx2 testing team"));
  gtk_widget_show (label4);
  gtk_box_pack_start (GTK_BOX (vbox2), label4, FALSE, FALSE, 0);

  hbuttonbox2 = gtk_hbutton_box_new ();
  gtk_widget_show (hbuttonbox2);
  gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox2, TRUE, TRUE, 0);
  gtk_box_set_spacing (GTK_BOX (hbuttonbox2), 30);

  button3 = gtk_button_new_with_mnemonic (_("Ok"));
  gtk_widget_show (button3);
  gtk_container_add (GTK_CONTAINER (hbuttonbox2), button3);
  GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) button3, "clicked",
                    G_CALLBACK (OnAbout_Ok),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (About, About, "About");
  GLADE_HOOKUP_OBJECT (About, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (About, label2, "label2");
  GLADE_HOOKUP_OBJECT (About, label3, "label3");
  GLADE_HOOKUP_OBJECT (About, label4, "label4");
  GLADE_HOOKUP_OBJECT (About, hbuttonbox2, "hbuttonbox2");
  GLADE_HOOKUP_OBJECT (About, button3, "button3");

  return About;
}
Exemple #28
0
/**
 * Initialize the buttons for the help window
 */
void initialize_buttons (GtkWidget *main_vbox, GtkWidget *content_hpane) {
        GtkWidget *buttons_hbuttonbox;
        GtkWidget *back_button;
        GtkWidget *forward_button;
        GtkWidget *home_button;
        GtkWidget *contents_button;

        // define and attach signals to buttons
        back_button = gtk_button_new_with_label(_("Back"));
        g_signal_connect(back_button, "clicked", G_CALLBACK(back_button_clicked), G_OBJECT(main_view));

        forward_button = gtk_button_new_with_label(_("Forward"));
        g_signal_connect(forward_button, "clicked", G_CALLBACK(forward_button_clicked), G_OBJECT(main_view));

        home_button = gtk_button_new_with_label(_("Home"));
        g_signal_connect(home_button, "clicked", G_CALLBACK(home_button_clicked), G_OBJECT(main_view));

        contents_button = gtk_button_new_with_label(_("Contents"));
        g_signal_connect(contents_button, "clicked", G_CALLBACK(contents_button_clicked), G_OBJECT(content_hpane));

        // button layout
        buttons_hbuttonbox = gtk_hbutton_box_new();
        gtk_container_add(GTK_CONTAINER(buttons_hbuttonbox), back_button);
        gtk_container_add(GTK_CONTAINER(buttons_hbuttonbox), forward_button);
        gtk_container_add(GTK_CONTAINER(buttons_hbuttonbox), home_button);
        gtk_container_add(GTK_CONTAINER(buttons_hbuttonbox), contents_button);
        gtk_box_pack_start(GTK_BOX(main_vbox), buttons_hbuttonbox, FALSE, TRUE, 0);
        gtk_box_set_spacing(GTK_BOX(buttons_hbuttonbox), 6);
        gtk_button_box_set_layout(GTK_BUTTON_BOX(buttons_hbuttonbox), GTK_BUTTONBOX_START);

	/* Store pointers to all widgets, for use by lookup_widget().  */
	GLADE_HOOKUP_OBJECT (main_view, back_button, BACKBUTTON);
	GLADE_HOOKUP_OBJECT (main_view, forward_button, FORWARDBUTTON);
	GLADE_HOOKUP_OBJECT (main_view, home_button, HOMEBUTTON);
	GLADE_HOOKUP_OBJECT (main_view, contents_button, CONTENTBUTTON);
}
void create_gtkdemo_parameter (GtkWidget *window)
{
    GtkWidget *para_save_button;
    GtkWidget *para_acquiesce_button;
    GtkWidget *para_load_button;

    GtkWidget *radio_para_A;
    GtkWidget *radio_para_B;
    GtkWidget *radio_para_C;
    GtkWidget *radio_para_D;

    para_save_button = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "para_save_button"));
    para_acquiesce_button = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "para_acquiesce_button"));
    para_load_button = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "para_load_button"));


    radio_para_A = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "radio_para_A"));
    radio_para_B = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "radio_para_B"));
    radio_para_C = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "radio_para_C"));
    radio_para_D = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "radio_para_D"));

    g_signal_connect ((gpointer) para_save_button, "pressed",G_CALLBACK (on_para_save_button_pressed),NULL);
    g_signal_connect ((gpointer) para_acquiesce_button, "pressed",G_CALLBACK (on_para_acquiesce_button_pressed),NULL);
    g_signal_connect ((gpointer) para_load_button, "pressed",G_CALLBACK (on_para_load_button_pressed),NULL);

    g_signal_connect(G_OBJECT(radio_para_A),"released",G_CALLBACK(on_radio_para_ABCD),(gpointer)0);
    g_signal_connect(G_OBJECT(radio_para_B),"released",G_CALLBACK(on_radio_para_ABCD),(gpointer)1);
    g_signal_connect(G_OBJECT(radio_para_C),"released",G_CALLBACK(on_radio_para_ABCD),(gpointer)2);
    g_signal_connect(G_OBJECT(radio_para_D),"released",G_CALLBACK(on_radio_para_ABCD),(gpointer)3);

    GLADE_HOOKUP_OBJECT (window, para_save_button, "para_save_button");
    GLADE_HOOKUP_OBJECT (window, para_acquiesce_button, "para_acquiesce_button");
    GLADE_HOOKUP_OBJECT (window, para_load_button, "para_load_button");

    GLADE_HOOKUP_OBJECT (window, radio_para_A, "radio_para_A");
    GLADE_HOOKUP_OBJECT (window, radio_para_B, "radio_para_B");
    GLADE_HOOKUP_OBJECT (window, radio_para_C, "radio_para_C");
    GLADE_HOOKUP_OBJECT (window, radio_para_D, "radio_para_D");

//设置选中内容  设置A组参数
    gtk_toggle_button_set_active ((GtkToggleButton *)radio_para_A,TRUE);


    return ;

}
GtkWidget* create_gtkdemo_display_drawingarea (GtkWidget *window)
{
    GtkWidget * drawingarea;

    GtkWidget *Display_box;
    GtkWidget *scrolledwindow;
    GtkWidget *viewport;

    Display_box = GTK_WIDGET(gtk_builder_get_object(Demo_builder, "Display_box"));


    scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
    gtk_widget_show (scrolledwindow);
    gtk_box_pack_start (GTK_BOX (Display_box), scrolledwindow, TRUE, TRUE, 0);

    viewport = gtk_viewport_new (NULL, NULL);
    gtk_widget_show (viewport);
    gtk_container_add (GTK_CONTAINER (scrolledwindow), viewport);
    gtk_container_set_border_width (GTK_CONTAINER (viewport), 2);


    drawingarea = gtk_drawing_area_new ();
    gtk_widget_show (drawingarea);
    gtk_container_add (GTK_CONTAINER (viewport), drawingarea);
    gtk_widget_set_size_request (drawingarea,DISPLAY_WIDTH,DISPLAY_HEIGHT);


	gtk_widget_show(drawingarea);

	g_signal_connect( G_OBJECT( drawingarea ), "expose_event",G_CALLBACK( preview_display ), NULL );


    GLADE_HOOKUP_OBJECT (window, drawingarea, "display_drawingarea");


//显示画板大小
    g_W_H_INFO.display_width=DISPLAY_WIDTH;
    g_W_H_INFO.display_height=DISPLAY_HEIGHT;

    return drawingarea;
}