Mercurial > vim
comparison src/gui_gtk_x11.c @ 7821:81794242a275 v7.4.1207
commit https://github.com/vim/vim/commit/66f948e928d5e0cd3123af902aa8ac1613534c94
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 30 16:39:25 2016 +0100
patch 7.4.1207
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 30 Jan 2016 16:45:04 +0100 |
parents | c80284cfe1b8 |
children | fb5ba6fbc843 |
comparison
equal
deleted
inserted
replaced
7820:38d22ab3d9a0 | 7821:81794242a275 |
---|---|
569 gui_argv[gui_argc] = NULL; | 569 gui_argv[gui_argc] = NULL; |
570 } | 570 } |
571 | 571 |
572 #if defined(EXITFREE) || defined(PROTO) | 572 #if defined(EXITFREE) || defined(PROTO) |
573 void | 573 void |
574 gui_mch_free_all() | 574 gui_mch_free_all(void) |
575 { | 575 { |
576 vim_free(gui_argv); | 576 vim_free(gui_argv); |
577 #if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION) | 577 #if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION) |
578 vim_free(abs_restart_command); | 578 vim_free(abs_restart_command); |
579 #endif | 579 #endif |
2222 # ifdef USE_XSMP | 2222 # ifdef USE_XSMP |
2223 /* | 2223 /* |
2224 * GTK tells us that XSMP needs attention | 2224 * GTK tells us that XSMP needs attention |
2225 */ | 2225 */ |
2226 static gboolean | 2226 static gboolean |
2227 local_xsmp_handle_requests(source, condition, data) | 2227 local_xsmp_handle_requests( |
2228 GIOChannel *source UNUSED; | 2228 GIOChannel *source UNUSED, |
2229 GIOCondition condition; | 2229 GIOCondition condition, |
2230 gpointer data; | 2230 gpointer data) |
2231 { | 2231 { |
2232 if (condition == G_IO_IN) | 2232 if (condition == G_IO_IN) |
2233 { | 2233 { |
2234 /* Do stuff; maybe close connection */ | 2234 /* Do stuff; maybe close connection */ |
2235 if (xsmp_handle_requests() == FAIL) | 2235 if (xsmp_handle_requests() == FAIL) |
3068 | 3068 |
3069 /* | 3069 /* |
3070 * Set the current tab to "nr". First tab is 1. | 3070 * Set the current tab to "nr". First tab is 1. |
3071 */ | 3071 */ |
3072 void | 3072 void |
3073 gui_mch_set_curtab(nr) | 3073 gui_mch_set_curtab(int nr) |
3074 int nr; | |
3075 { | 3074 { |
3076 if (gui.tabline == NULL) | 3075 if (gui.tabline == NULL) |
3077 return; | 3076 return; |
3078 | 3077 |
3079 ignore_tabline_evt = TRUE; | 3078 ignore_tabline_evt = TRUE; |
3942 | 3941 |
3943 /* | 3942 /* |
3944 * Return TRUE if the main window is maximized. | 3943 * Return TRUE if the main window is maximized. |
3945 */ | 3944 */ |
3946 int | 3945 int |
3947 gui_mch_maximized() | 3946 gui_mch_maximized(void) |
3948 { | 3947 { |
3949 return (gui.mainwin != NULL && gui.mainwin->window != NULL | 3948 return (gui.mainwin != NULL && gui.mainwin->window != NULL |
3950 && (gdk_window_get_state(gui.mainwin->window) | 3949 && (gdk_window_get_state(gui.mainwin->window) |
3951 & GDK_WINDOW_STATE_MAXIMIZED)); | 3950 & GDK_WINDOW_STATE_MAXIMIZED)); |
3952 } | 3951 } |
3953 | 3952 |
3954 /* | 3953 /* |
3955 * Unmaximize the main window | 3954 * Unmaximize the main window |
3956 */ | 3955 */ |
3957 void | 3956 void |
3958 gui_mch_unmaximize() | 3957 gui_mch_unmaximize(void) |
3959 { | 3958 { |
3960 if (gui.mainwin != NULL) | 3959 if (gui.mainwin != NULL) |
3961 gtk_window_unmaximize(GTK_WINDOW(gui.mainwin)); | 3960 gtk_window_unmaximize(GTK_WINDOW(gui.mainwin)); |
3962 } | 3961 } |
3963 | 3962 |
3964 /* | 3963 /* |
3965 * Called when the font changed while the window is maximized. Compute the | 3964 * Called when the font changed while the window is maximized. Compute the |
3966 * new Rows and Columns. This is like resizing the window. | 3965 * new Rows and Columns. This is like resizing the window. |
3967 */ | 3966 */ |
3968 void | 3967 void |
3969 gui_mch_newfont() | 3968 gui_mch_newfont(void) |
3970 { | 3969 { |
3971 int w, h; | 3970 int w, h; |
3972 | 3971 |
3973 gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); | 3972 gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); |
3974 w -= get_menu_tool_width(); | 3973 w -= get_menu_tool_width(); |