~ubuntu-branches/ubuntu/maverick/gedit/maverick

« back to all changes in this revision

Viewing changes to gedit/gedit-window.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-18 00:37:05 UTC
  • mfrom: (1.1.76 upstream)
  • Revision ID: james.westby@ubuntu.com-20100318003705-typ8fgrsezmc334h
Tags: 2.29.9-0ubuntu1
* New upstream version:
  - Fix a file corruption bug in the new file saving code 
  - Misc bugfixes
* debian/patches/80_not_using_localmodlibs.patch:
  - dropped, the change is in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
3884
3884
#endif
3885
3885
 
3886
3886
static void
 
3887
connect_notebook_signals (GeditWindow *window,
 
3888
                          GtkWidget   *notebook)
 
3889
{
 
3890
        g_signal_connect (notebook,
 
3891
                          "switch-page",
 
3892
                          G_CALLBACK (notebook_switch_page),
 
3893
                          window);
 
3894
        g_signal_connect (notebook,
 
3895
                          "tab-added",
 
3896
                          G_CALLBACK (notebook_tab_added),
 
3897
                          window);
 
3898
        g_signal_connect (notebook,
 
3899
                          "tab-removed",
 
3900
                          G_CALLBACK (notebook_tab_removed),
 
3901
                          window);
 
3902
        g_signal_connect (notebook,
 
3903
                          "tabs-reordered",
 
3904
                          G_CALLBACK (notebook_tabs_reordered),
 
3905
                          window);
 
3906
        g_signal_connect (notebook,
 
3907
                          "tab-detached",
 
3908
                          G_CALLBACK (notebook_tab_detached),
 
3909
                          window);
 
3910
        g_signal_connect (notebook,
 
3911
                          "tab-close-request",
 
3912
                          G_CALLBACK (notebook_tab_close_request),
 
3913
                          window);
 
3914
        g_signal_connect (notebook,
 
3915
                          "button-press-event",
 
3916
                          G_CALLBACK (notebook_button_press_event),
 
3917
                          window);
 
3918
        g_signal_connect (notebook,
 
3919
                          "popup-menu",
 
3920
                          G_CALLBACK (notebook_popup_menu),
 
3921
                          window);
 
3922
}
 
3923
 
 
3924
static void
 
3925
add_notebook (GeditWindow *window,
 
3926
              GtkWidget   *notebook)
 
3927
{
 
3928
        gtk_paned_pack1 (GTK_PANED (window->priv->vpaned),
 
3929
                         notebook,
 
3930
                         TRUE,
 
3931
                         TRUE);
 
3932
 
 
3933
        gtk_widget_show (notebook);
 
3934
 
 
3935
        connect_notebook_signals (window, notebook);
 
3936
}
 
3937
 
 
3938
static void
3887
3939
gedit_window_init (GeditWindow *window)
3888
3940
{
3889
3941
        GtkWidget *main_box;
3932
3984
        
3933
3985
        gedit_debug_message (DEBUG_WINDOW, "Create gedit notebook");
3934
3986
        window->priv->notebook = gedit_notebook_new ();
3935
 
        gtk_paned_pack1 (GTK_PANED (window->priv->vpaned), 
3936
 
                         window->priv->notebook,
3937
 
                         TRUE, 
3938
 
                         TRUE);
3939
 
        gtk_widget_show (window->priv->notebook);                        
 
3987
        add_notebook (window, window->priv->notebook);
3940
3988
 
3941
3989
        /* side and bottom panels */
3942
3990
        create_side_panel (window);
3981
4029
        
3982
4030
        gtk_target_list_add_uri_targets (tl, TARGET_URI_LIST);
3983
4031
 
3984
 
        /* Connect signals */
3985
 
        g_signal_connect (window->priv->notebook,
3986
 
                          "switch_page",
3987
 
                          G_CALLBACK (notebook_switch_page),
3988
 
                          window);
3989
 
        g_signal_connect (window->priv->notebook,
3990
 
                          "tab_added",
3991
 
                          G_CALLBACK (notebook_tab_added),
3992
 
                          window);
3993
 
        g_signal_connect (window->priv->notebook,
3994
 
                          "tab_removed",
3995
 
                          G_CALLBACK (notebook_tab_removed),
3996
 
                          window);
3997
 
        g_signal_connect (window->priv->notebook,
3998
 
                          "tabs_reordered",
3999
 
                          G_CALLBACK (notebook_tabs_reordered),
4000
 
                          window);                        
4001
 
        g_signal_connect (window->priv->notebook,
4002
 
                          "tab_detached",
4003
 
                          G_CALLBACK (notebook_tab_detached),
4004
 
                          window);
4005
 
        g_signal_connect (window->priv->notebook,
4006
 
                          "tab_close_request",
4007
 
                          G_CALLBACK (notebook_tab_close_request),
4008
 
                          window);
4009
 
        g_signal_connect (window->priv->notebook,
4010
 
                          "button-press-event",
4011
 
                          G_CALLBACK (notebook_button_press_event),
4012
 
                          window);
4013
 
        g_signal_connect (window->priv->notebook,
4014
 
                          "popup-menu",
4015
 
                          G_CALLBACK (notebook_popup_menu),
4016
 
                          window);
4017
 
 
4018
4032
        /* connect instead of override, so that we can
4019
4033
         * share the cb code with the view */
4020
4034
        g_signal_connect (window,