~ubuntu-branches/ubuntu/dapper/ekiga/dapper-updates

« back to all changes in this revision

Viewing changes to src/gui/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-03-15 09:05:37 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060315090537-nzavs0ciqb3476s1
Tags: 2.0.1-0ubuntu1
* New upstream release:
  - Added back StaticPicture in the druid and use the default Ekiga logo
    when no picture is specified.
  - Use only 1 FPS when transmitting the StaticPicture to spare bandwidth.
* debian/control.in:
  - bumped Dependencies on opal and pwlib.
* debian/patches/01_lpi.dpatch,
  debian/patches/02_autoconf.dpatch:
  - added LPI patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
 
/* GnomeMeeting -- A Video-Conferencing application
 
2
/* Ekiga -- A VoIP and Video-Conferencing application
3
3
 * Copyright (C) 2000-2006 Damien Sandras
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
13
13
 * GNU General Public License for more details.
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
 
 *
19
 
 *
20
 
 * GnomeMeeting is licensed under the GPL license and as a special exception,
 
16
 * along with this program; if not, write to the Free Software Foundation,
 
17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
18
 *
 
19
 *
 
20
 * Ekiga is licensed under the GPL license and as a special exception,
21
21
 * you have permission to link or otherwise combine this program with the
22
 
 * programs OpenH323 and Pwlib, and distribute the combination, without
23
 
 * applying the requirements of the GNU GPL to the OpenH323 program, as long
24
 
 * as you do follow the requirements of the GNU GPL for all the rest of the
25
 
 * software thus combined.
 
22
 * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
 
23
 * without applying the requirements of the GNU GPL to the OPAL, OpenH323
 
24
 * and PWLIB programs, as long as you do follow the requirements of the
 
25
 * GNU GPL for all the rest of the software thus combined.
26
26
 */
27
27
 
28
28
 
1159
1159
 
1160
1160
  glist = 
1161
1161
    gnomemeeting_addressbook_get_contacts (NULL, nbr, 
1162
 
                                           FALSE, NULL, NULL, NULL, "*"); 
 
1162
                                           FALSE, NULL, NULL, NULL, NULL, "*"); 
1163
1163
  gm_main_window_speed_dials_menu_update (main_window, glist);
1164
1164
  g_slist_foreach (glist, (GFunc) gmcontact_delete, NULL);
1165
1165
  g_slist_free (glist);
1462
1462
                      FALSE, FALSE, 0);
1463
1463
  
1464
1464
  small_vbox = gtk_vbox_new (0, FALSE);
1465
 
  mw->adj_output_volume = gtk_adjustment_new (0, 0.0, 100.0, 1.0, 5.0, 1.0);
 
1465
  mw->adj_output_volume = gtk_adjustment_new (0, 0.0, 101.0, 1.0, 5.0, 1.0);
1466
1466
  hscale_play = gtk_hscale_new (GTK_ADJUSTMENT (mw->adj_output_volume));
1467
1467
  gtk_range_set_update_policy (GTK_RANGE (hscale_play),
1468
1468
                               GTK_UPDATE_DELAYED);
1483
1483
                      FALSE, FALSE, 0);
1484
1484
 
1485
1485
  small_vbox = gtk_vbox_new (0, FALSE);
1486
 
  mw->adj_input_volume = gtk_adjustment_new (0, 0.0, 100.0, 1.0, 5.0, 1.0);
 
1486
  mw->adj_input_volume = gtk_adjustment_new (0, 0.0, 101.0, 1.0, 5.0, 1.0);
1487
1487
  hscale_rec = gtk_hscale_new (GTK_ADJUSTMENT (mw->adj_input_volume));
1488
1488
  gtk_range_set_update_policy (GTK_RANGE (hscale_rec),
1489
1489
                               GTK_UPDATE_DELAYED);
2410
2410
                                              NULL,
2411
2411
                                              NULL,
2412
2412
                                              NULL,
 
2413
                                              NULL,
2413
2414
                                              NULL);
2414
2415
 
2415
2416
 
2515
2516
 
2516
2517
  mw = gm_mw_get_mw (main_window);
2517
2518
 
2518
 
  /* to store the actual size of the video frame */
 
2519
  /* to store the actual size of the video image */
2519
2520
  int video_frame_width = 0;
2520
2521
  int video_frame_height = 0;
2521
2522
  /* to store the actual size of the video frame, excluding some pixels, 
2523
2524
  int video_frame_rwidth = 0;
2524
2525
  int video_frame_rheight = 0;
2525
2526
 
2526
 
  /* some things for the BOTH_INCRUSTED mode: */
 
2527
  /* BOTH_INCRUSTED config */
2527
2528
  /* the small pic's ratio (to the main video frame */
2528
 
  const float incrusted_small_pic_ratio = 0.33;
 
2529
  const float incr_lratio = 0.33;
2529
2530
  /* position of the small pic in % of width and height of the main
2530
 
   * video frame */
2531
 
  const float incrusted_small_pic_relative_posx = 0.66;
2532
 
  const float incrusted_small_pic_relative_posy = 0.66;
 
2531
   * video frame (incrusted-relative-localpic-posx/y) */
 
2532
  const float incr_rel_lposx = 0.66;
 
2533
  const float incr_rel_lposy = 0.66;
2533
2534
  /* forced minimum distances of the small pic to the main frame border right
2534
 
   * and down */
2535
 
  const int incrusted_small_pic_forced_border_right = 3;
2536
 
  const int incrusted_small_pic_forced_border_down = 5;
 
2535
   * and down (incrusted-border-localpic-right/down) */
 
2536
  const int incr_brd_lright = 3;
 
2537
  const int incr_brd_ldown = 5;
2537
2538
  /* assumed thickness of the small frame for the local video (used to
2538
 
   * calculate scale of the local video image) */
2539
 
  const int incrusted_small_pic_assumed_frame_thickness = 4;
 
2539
   * calculate scale of the local video image)
 
2540
   * (incrusted-localpic-frame-thickness */
 
2541
  
 
2542
  const int incr_lfrm_thick = 2;
2540
2543
 
2541
2544
  /* some preinits */
2542
 
  int incrusted_frame_width = 0;
2543
 
  int incrusted_frame_height = 0;
 
2545
  int incr_frame_width = 0;
 
2546
  int incr_frame_height = 0;
2544
2547
 
2545
2548
  int small_frame_absposx = 0;
2546
2549
  int small_frame_absposy = 0;
2547
2550
 
2548
 
  int incrusted_resulting_width = 0;
2549
 
  int incrusted_resulting_height = 0;
2550
 
  int incrusted_max_resulting_width = 0;
2551
 
  int incrusted_max_resulting_height = 0;
 
2551
  int incr_resulting_width = 0;
 
2552
  int incr_resulting_height = 0;
 
2553
  int incr_max_resulting_width = 0;
 
2554
  int incr_max_resulting_height = 0;
2552
2555
 
2553
2556
#ifdef HAS_SDL
2554
2557
  /* FULLSCREEN config */
2564
2567
  gboolean display_both_side = FALSE;
2565
2568
  gboolean display_both_incrusted = FALSE;
2566
2569
  gboolean fs_active = FALSE;
2567
 
  /* when the GtkFrame was just created, it has a zero size, but we are
2568
 
   * requested to already render...
2569
 
   * used to prevent drawing when the frame isn't ready built (width,height==0,0) */
2570
 
  gboolean video_frame_ready = TRUE;
2571
2570
 
2572
2571
  /* resize the video frame to the requested size, depending on what we want
2573
2572
   * to show */
2574
2573
  switch (display_type) {
2575
2574
  case LOCAL_VIDEO:
2576
 
    gtk_widget_set_size_request (GTK_WIDGET (mw->video_frame),
 
2575
    gtk_widget_set_size_request (GTK_WIDGET (mw->main_video_image),
2577
2576
                                 (int) (lf_width * lzoom),
2578
2577
                                 (int) (lf_height * lzoom)); break;
2579
2578
  case REMOTE_VIDEO:
2580
 
    gtk_widget_set_size_request (GTK_WIDGET (mw->video_frame),
 
2579
    gtk_widget_set_size_request (GTK_WIDGET (mw->main_video_image),
2581
2580
                                 (int) (rf_width * rzoom),
2582
2581
                                 (int) (rf_height * rzoom)); break;
2583
2582
  case BOTH_INCRUSTED:
2584
 
    gtk_widget_set_size_request (GTK_WIDGET (mw->video_frame),
 
2583
    gtk_widget_set_size_request (GTK_WIDGET (mw->main_video_image),
2585
2584
                                 (int) (rf_width * rzoom),
2586
2585
                                 (int) (rf_height * rzoom)); break;
2587
2586
  case BOTH_SIDE:
2588
 
    gtk_widget_set_size_request (GTK_WIDGET (mw->video_frame),
 
2587
    gtk_widget_set_size_request (GTK_WIDGET (mw->main_video_image),
2589
2588
                                 (int) (rf_width * rzoom * 2),
2590
2589
                                 (int) (rf_height * rzoom)); break;
2591
2590
  }
2595
2594
  if (display_type == FULLSCREEN) fs_active = TRUE;
2596
2595
 
2597
2596
  /* get the actual size of the video frame */
2598
 
  video_frame_width = GTK_WIDGET (mw->main_video_image)->allocation.width;
2599
 
  video_frame_height = GTK_WIDGET (mw->main_video_image)->allocation.height;
 
2597
  video_frame_width = PMAX (GM_QCIF_WIDTH, GTK_WIDGET (mw->main_video_image)->allocation.width);
 
2598
  video_frame_height = PMAX (GM_QCIF_HEIGHT, GTK_WIDGET (mw->main_video_image)->allocation.height);
2600
2599
  /* compute reduced values, reductions are fixed,
2601
2600
   * we will use THESE values as base to scale the images */
2602
2601
  video_frame_rwidth = video_frame_width;
2603
2602
  video_frame_rheight = video_frame_height;
2604
2603
 
2605
 
  if (video_frame_rwidth < 0)
2606
 
    { video_frame_ready = FALSE; video_frame_rwidth = video_frame_width; };
2607
 
  if (video_frame_rheight < 0)
2608
 
    { video_frame_ready = FALSE; video_frame_rheight = video_frame_height; };
2609
 
 
2610
2604
  /* Update the display selection in the main and in the video popup menus */
2611
2605
  gtk_radio_menu_select_with_id (mw->main_menu, "local_video", display_type);
2612
2606
 
2613
 
 
2614
2607
#ifdef HAS_SDL
2615
2608
  if (!fs_active)
2616
2609
    gm_mw_destroy_fullscreen_video_window (main_window);
2627
2620
    if (!GTK_WIDGET_VISIBLE (mw->remote_video_window))
2628
2621
      gnomemeeting_window_show (GTK_WIDGET (mw->remote_video_window));
2629
2622
  }
 
2623
 
2630
2624
#ifdef HAS_SDL
2631
2625
  else if (display_type == FULLSCREEN) {
2632
 
 
2633
2626
    gm_mw_init_fullscreen_video_window (main_window);
 
2627
 
2634
2628
    if (gm_mw_poll_fullscreen_video_window (main_window)) 
2635
2629
      gm_mw_toggle_fullscreen (main_window);
2636
2630
  }
2648
2642
 
2649
2643
 
2650
2644
  /* The real size picture, if required */
2651
 
  if (display_type != REMOTE_VIDEO && lbuffer && video_frame_ready && !fs_active) {
 
2645
  if (display_type != REMOTE_VIDEO && lbuffer && !fs_active) {
2652
2646
 
2653
2647
    if (lf_width > 0 && lf_height > 0) 
2654
2648
      lsrc_pic =  
2671
2665
       * for BOTH_INCRUSTED */
2672
2666
      zlsrc_pic =
2673
2667
        gdk_pixbuf_scale_simple (lsrc_pic,
2674
 
                                 (int) (video_frame_rwidth * incrusted_small_pic_ratio),
2675
 
                                 (int) (video_frame_rheight * incrusted_small_pic_ratio),
 
2668
                                 (int) (video_frame_rwidth * incr_lratio),
 
2669
                                 (int) (video_frame_rheight * incr_lratio),
2676
2670
                                 bilinear_filtering?GDK_INTERP_BILINEAR:GDK_INTERP_NEAREST);
2677
2671
 
2678
2672
    g_object_unref (lsrc_pic);
2740
2734
  switch (display_type) {
2741
2735
 
2742
2736
  case LOCAL_VIDEO:
2743
 
    if (zlsrc_pic && video_frame_ready) {
 
2737
    if (zlsrc_pic) {
2744
2738
 
2745
2739
      gtk_image_set_from_pixbuf (GTK_IMAGE (mw->main_video_image), 
2746
2740
                                 GDK_PIXBUF (zlsrc_pic));
2749
2743
    break;
2750
2744
 
2751
2745
  case REMOTE_VIDEO:
2752
 
    if (zrsrc_pic && video_frame_ready) {
 
2746
    if (zrsrc_pic) {
2753
2747
 
2754
2748
      gtk_image_set_from_pixbuf (GTK_IMAGE (mw->main_video_image), 
2755
2749
                                 GDK_PIXBUF (zrsrc_pic));
2759
2753
 
2760
2754
  case BOTH_INCRUSTED:
2761
2755
 
2762
 
    if (zlsrc_pic && zrsrc_pic && video_frame_ready) {
 
2756
    if (zlsrc_pic && zrsrc_pic) {
2763
2757
 
2764
2758
      /* get the frame out of XPM data */
2765
 
      framepixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) gm_both_incrusted_frame_xpm);
 
2759
      framepixbuf =
 
2760
        gdk_pixbuf_new_from_xpm_data ((const char **) gm_both_incrusted_frame_xpm);
2766
2761
 
2767
 
      incrusted_frame_width = gdk_pixbuf_get_width (framepixbuf);
2768
 
      incrusted_frame_height = gdk_pixbuf_get_height (framepixbuf);
 
2762
      incr_frame_width = gdk_pixbuf_get_width (framepixbuf);
 
2763
      incr_frame_height = gdk_pixbuf_get_height (framepixbuf);
2769
2764
 
2770
2765
      /* compute the position of the small frame */
2771
2766
      small_frame_absposx =
2772
 
        (int) (video_frame_rwidth * incrusted_small_pic_relative_posx);
 
2767
        (int) (video_frame_rwidth * incr_rel_lposx);
2773
2768
      small_frame_absposy =
2774
 
        (int) (video_frame_rheight * incrusted_small_pic_relative_posy);
 
2769
        (int) (video_frame_rheight * incr_rel_lposy);
2775
2770
 
2776
2771
      /* scale the local pic down to fit inside the frame */
2777
2772
      nzlsrc_pic =
2778
2773
        gdk_pixbuf_scale_simple (zlsrc_pic,
2779
 
                                 incrusted_frame_width - (2 * incrusted_small_pic_assumed_frame_thickness),
2780
 
                                 incrusted_frame_height - (2 * incrusted_small_pic_assumed_frame_thickness),
 
2774
                                 incr_frame_width - (2 * incr_lfrm_thick),
 
2775
                                 incr_frame_height - (2 * incr_lfrm_thick),
2781
2776
                                 bilinear_filtering?GDK_INTERP_BILINEAR:GDK_INTERP_NEAREST);
2782
2777
 
2783
2778
      /* copy the local pic inside the frame */
2784
2779
      gdk_pixbuf_copy_area (nzlsrc_pic,
2785
2780
                            0, 0,
2786
 
                            gdk_pixbuf_get_width (nzlsrc_pic) - incrusted_small_pic_assumed_frame_thickness,
2787
 
                            gdk_pixbuf_get_height (nzlsrc_pic) - incrusted_small_pic_assumed_frame_thickness,
 
2781
                            gdk_pixbuf_get_width (nzlsrc_pic) - incr_lfrm_thick,
 
2782
                            gdk_pixbuf_get_height (nzlsrc_pic) - incr_lfrm_thick,
2788
2783
                            framepixbuf,
2789
 
                            incrusted_small_pic_assumed_frame_thickness, incrusted_small_pic_assumed_frame_thickness);
 
2784
                            incr_lfrm_thick, incr_lfrm_thick);
2790
2785
 
2791
2786
      /* scale the frame plus the picture to the requested size */
2792
2787
      tmpframe = gdk_pixbuf_scale_simple (framepixbuf,
2793
 
                                          (int) (video_frame_rwidth * incrusted_small_pic_ratio),
2794
 
                                          (int) (video_frame_rheight * incrusted_small_pic_ratio),
 
2788
                                          (int) (video_frame_rwidth * incr_lratio),
 
2789
                                          (int) (video_frame_rheight * incr_lratio),
2795
2790
                                          GDK_INTERP_BILINEAR);
2796
2791
 
2797
2792
      /* make sure we're respecting the forced border */
2798
 
      incrusted_resulting_width = small_frame_absposx + gdk_pixbuf_get_width (tmpframe);
2799
 
      incrusted_resulting_height = small_frame_absposy + gdk_pixbuf_get_height (tmpframe);
2800
 
 
2801
 
      incrusted_max_resulting_width = video_frame_rwidth - incrusted_small_pic_forced_border_right;
2802
 
      incrusted_max_resulting_height = video_frame_rheight - incrusted_small_pic_forced_border_down;
2803
 
 
2804
 
      if ( incrusted_resulting_width > incrusted_max_resulting_width )
 
2793
      incr_resulting_width = small_frame_absposx + gdk_pixbuf_get_width (tmpframe);
 
2794
      incr_resulting_height = small_frame_absposy + gdk_pixbuf_get_height (tmpframe);
 
2795
 
 
2796
      incr_max_resulting_width = video_frame_rwidth - incr_brd_lright;
 
2797
      incr_max_resulting_height = video_frame_rheight - incr_brd_ldown;
 
2798
 
 
2799
      if ( incr_resulting_width > incr_max_resulting_width )
2805
2800
        small_frame_absposx =
2806
 
          video_frame_rwidth - gdk_pixbuf_get_width (tmpframe) - incrusted_small_pic_forced_border_right;
 
2801
          video_frame_rwidth - gdk_pixbuf_get_width (tmpframe) - incr_brd_lright;
2807
2802
 
2808
 
      if ( incrusted_resulting_height > incrusted_max_resulting_height )
 
2803
      if ( incr_resulting_height > incr_max_resulting_height )
2809
2804
        small_frame_absposy =
2810
 
          video_frame_rheight - gdk_pixbuf_get_height (tmpframe) - incrusted_small_pic_forced_border_down;
 
2805
          video_frame_rheight - gdk_pixbuf_get_height (tmpframe) - incr_brd_ldown;
2811
2806
 
2812
2807
      /* copy the small picture into the big one, freshly scaled, positioned
2813
2808
       * and polished :-) */ 
2832
2827
 
2833
2828
  case BOTH_SIDE:
2834
2829
 
2835
 
    if (zlsrc_pic && zrsrc_pic && video_frame_ready) {
 
2830
    if (zlsrc_pic && zrsrc_pic) {
2836
2831
 
2837
2832
      GdkPixbuf *tmp_pixbuf = 
2838
2833
        gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 
2880
2875
  case FULLSCREEN:
2881
2876
 
2882
2877
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
2883
 
    rmask = 0xff000000;
2884
 
    gmask = 0x00ff0000;
2885
 
    bmask = 0x0000ff00;
2886
 
    amask = 0x000000ff;
 
2878
    rmask = 0x00ff0000;
 
2879
    gmask = 0x0000ff00;
 
2880
    bmask = 0x000000ff;
 
2881
    amask = 0x00000000;
2887
2882
#else
2888
2883
    rmask = 0x000000ff;
2889
2884
    gmask = 0x0000ff00;
2962
2957
  GmWindow *mw = NULL;
2963
2958
 
2964
2959
  GdkPixbuf *tmp = NULL;
2965
 
  GdkPixbuf *scaledlogo = NULL;
2966
2960
  GdkPixbuf *text_logo_pix = NULL;
2967
2961
 
2968
2962
  int width = 0;
2975
2969
  mw = gm_mw_get_mw (main_window);
2976
2970
 
2977
2971
 
2978
 
  gtk_widget_size_request (GTK_WIDGET (mw->video_frame), &size_request);
 
2972
  gtk_widget_size_request (GTK_WIDGET (mw->main_video_image), &size_request);
2979
2973
 
2980
2974
  if ((size_request.width != GM_QCIF_WIDTH) || 
2981
2975
      (size_request.height != GM_QCIF_HEIGHT)) {
2982
2976
 
2983
 
    gtk_widget_set_size_request (GTK_WIDGET (mw->video_frame),
2984
 
                                 176 , 144);
 
2977
    gtk_widget_set_size_request (GTK_WIDGET (mw->main_video_image),
 
2978
                                 GM_QCIF_WIDTH, GM_QCIF_HEIGHT);
2985
2979
  }
2986
2980
 
2987
2981
  text_logo_pix = gdk_pixbuf_new_from_xpm_data ((const char **) text_logo_xpm);
2988
2982
  width = gdk_pixbuf_get_width (text_logo_pix);
2989
2983
  height = gdk_pixbuf_get_height (text_logo_pix);
2990
2984
 
2991
 
  tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 176, 144);
2992
 
  gdk_pixbuf_fill (tmp, 0x000000FF);  /* Opaque black */
 
2985
  tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
 
2986
                        GM_QCIF_WIDTH, GM_QCIF_HEIGHT);
 
2987
  gdk_pixbuf_fill (tmp, 0xFFFFFFFF);  
2993
2988
 
2994
2989
  gdk_pixbuf_copy_area (text_logo_pix, 0, 0, 
2995
2990
                        width, height,
2997
2992
                        ((GM_QCIF_WIDTH - width) / 2),
2998
2993
                        (GM_QCIF_HEIGHT - height) / 2);
2999
2994
 
3000
 
  scaledlogo = gdk_pixbuf_scale_simple (tmp,
3001
 
                                        GM_QCIF_WIDTH - 3,
3002
 
                                        GM_QCIF_HEIGHT,
3003
 
                                        GDK_INTERP_BILINEAR);
3004
 
 
3005
2995
  gtk_image_set_from_pixbuf (GTK_IMAGE (mw->main_video_image),
3006
 
                             GDK_PIXBUF (scaledlogo));
 
2996
                             tmp);
3007
2997
 
3008
2998
  g_object_unref (text_logo_pix);
3009
2999
  g_object_unref (tmp);
3010
 
  g_object_unref (scaledlogo);
3011
3000
}
3012
3001
 
3013
3002
 
3921
3910
  GdkPixbuf *pixbuf = NULL;
3922
3911
  GtkWidget *event_box = NULL;
3923
3912
  GtkWidget *vbox = NULL;
3924
 
  gchar     *filename = NULL;
3925
3913
 
3926
3914
  ControlPanelSection section = DIALPAD;
3927
3915
  ViewMode view_mode = SOFTPHONE;
4062
4050
  gtk_container_set_border_width (GTK_CONTAINER (mw->video_frame), 0);
4063
4051
  gtk_container_add (GTK_CONTAINER (mw->video_frame), mw->main_video_image);
4064
4052
 
4065
 
  gtk_widget_set_size_request (GTK_WIDGET (mw->video_frame), 
4066
 
                               GM_QCIF_WIDTH + GM_FRAME_SIZE, 
4067
 
                               GM_QCIF_HEIGHT + GM_FRAME_SIZE); 
 
4053
  gtk_widget_set_size_request (GTK_WIDGET (mw->main_video_image), 
 
4054
                               GM_QCIF_WIDTH, 
 
4055
                               GM_QCIF_HEIGHT); 
4068
4056
 
4069
4057
  gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (event_box), 
4070
4058
                    0, 2, 0, 1,
4091
4079
  g_signal_connect (G_OBJECT (mw->statusbar_ebox), "button-press-event",
4092
4080
                    GTK_SIGNAL_FUNC (statusbar_clicked_cb), window);
4093
4081
 
4094
 
  filename = g_build_filename (DATA_DIR, "pixmaps", PACKAGE_NAME ".png", NULL);
4095
 
  pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
4096
 
  g_free (filename);
4097
 
  if (pixbuf) 
4098
 
    gtk_window_set_default_icon (pixbuf); 
 
4082
  pixbuf = gtk_widget_render_icon (GTK_WIDGET (window),
 
4083
                                   GM_STOCK_16,
 
4084
                                   GTK_ICON_SIZE_MENU, NULL);
 
4085
  gtk_window_set_default_icon (pixbuf); 
 
4086
  g_object_unref (pixbuf);
4099
4087
 
4100
4088
  /* The 2 video window popups */
4101
4089
  mw->local_video_window =
4466
4454
    };
4467
4455
  
4468
4456
  /* GnomeMeeting Initialisation */
4469
 
  gnome_program_init ("ekiga", VERSION,
 
4457
  gnome_program_init (PACKAGE_NAME, VERSION,
4470
4458
                      LIBGNOMEUI_MODULE, argc, argv,
4471
4459
                      GNOME_PARAM_POPT_TABLE, arguments,
4472
 
                      GNOME_PARAM_HUMAN_READABLE_NAME,
4473
 
                      "ekiga",
 
4460
                      GNOME_PARAM_HUMAN_READABLE_NAME, "ekiga",
4474
4461
                      GNOME_PARAM_APP_DATADIR, DATA_DIR,
4475
4462
                      (void *) NULL);
4476
4463
#else