comparison src/gui_gtk_x11.c @ 8301:6a4c11fa1aa3 v7.4.1443

commit https://github.com/vim/vim/commit/3f2a5d8dfbe2998b4d3d369c0275e2366c92666b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 27 22:08:16 2016 +0100 patch 7.4.1443 Problem: Can't build GTK3 with small features. Solution: Use gtk_widget_get_window(). Fix typos. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Sat, 27 Feb 2016 22:15:04 +0100
parents 74b15ed0a259
children 1e58a938aafc
comparison
equal deleted inserted replaced
8300:df7b59e594c4 8301:6a4c11fa1aa3
1541 vim_free(string); 1541 vim_free(string);
1542 string = tmpbuf; 1542 string = tmpbuf;
1543 length += 2; 1543 length += 2;
1544 1544
1545 #if !GTK_CHECK_VERSION(3,0,0) 1545 #if !GTK_CHECK_VERSION(3,0,0)
1546 /* Looks redandunt even for GTK2 because these values are 1546 /* Looks redundant even for GTK2 because these values are
1547 * overwritten by gtk_selection_data_set() that follows. */ 1547 * overwritten by gtk_selection_data_set() that follows. */
1548 selection_data->type = selection_data->target; 1548 selection_data->type = selection_data->target;
1549 selection_data->format = 16; /* 16 bits per char */ 1549 selection_data->format = 16; /* 16 bits per char */
1550 #endif 1550 #endif
1551 gtk_selection_data_set(selection_data, html_atom, 16, 1551 gtk_selection_data_set(selection_data, html_atom, 16,
1595 } 1595 }
1596 1596
1597 if (string != NULL) 1597 if (string != NULL)
1598 { 1598 {
1599 #if !GTK_CHECK_VERSION(3,0,0) 1599 #if !GTK_CHECK_VERSION(3,0,0)
1600 /* Looks redandunt even for GTK2 because these values are 1600 /* Looks redundant even for GTK2 because these values are
1601 * overwritten by gtk_selection_data_set() that follows. */ 1601 * overwritten by gtk_selection_data_set() that follows. */
1602 selection_data->type = selection_data->target; 1602 selection_data->type = selection_data->target;
1603 selection_data->format = 8; /* 8 bits per char */ 1603 selection_data->format = 8; /* 8 bits per char */
1604 #endif 1604 #endif
1605 gtk_selection_data_set(selection_data, type, 8, string, length); 1605 gtk_selection_data_set(selection_data, type, 8, string, length);
3919 /* 3919 /*
3920 * Create the toolbar and handle 3920 * Create the toolbar and handle
3921 */ 3921 */
3922 /* some aesthetics on the toolbar */ 3922 /* some aesthetics on the toolbar */
3923 # ifdef USE_GTK3 3923 # ifdef USE_GTK3
3924 /* TODO: Add GTK+ 3 code here using GtkCssProvider if neccessary. */ 3924 /* TODO: Add GTK+ 3 code here using GtkCssProvider if necessary. */
3925 /* N.B. Since the default value of GtkToolbar::button-relief is 3925 /* N.B. Since the default value of GtkToolbar::button-relief is
3926 * GTK_RELIEF_NONE, there's no need to specify that, probably. */ 3926 * GTK_RELIEF_NONE, there's no need to specify that, probably. */
3927 # else 3927 # else
3928 gtk_rc_parse_string( 3928 gtk_rc_parse_string(
3929 "style \"vim-toolbar-style\" {\n" 3929 "style \"vim-toolbar-style\" {\n"
4445 * put the hints back to normal (the actual minimum size) so we may 4445 * put the hints back to normal (the actual minimum size) so we may
4446 * subsequently be resized smaller. GtkSocket (the parent end) uses the 4446 * subsequently be resized smaller. GtkSocket (the parent end) uses the
4447 * plug's window 'min hints to set *it's* minimum size, but that's also the 4447 * plug's window 'min hints to set *it's* minimum size, but that's also the
4448 * only way we have of making ourselves bigger (by set lines/columns). 4448 * only way we have of making ourselves bigger (by set lines/columns).
4449 * Thus set hints at start-up to ensure correct init. size, then a 4449 * Thus set hints at start-up to ensure correct init. size, then a
4450 * second after the final attempt to reset the real minimum hinst (done by 4450 * second after the final attempt to reset the real minimum hints (done by
4451 * scrollbar init.), actually do the standard hinst and stop the timer. 4451 * scrollbar init.), actually do the standard hints and stop the timer.
4452 * We'll not let the default hints be set while this timer's active. 4452 * We'll not let the default hints be set while this timer's active.
4453 */ 4453 */
4454 static gboolean 4454 static gboolean
4455 check_startup_plug_hints(gpointer data UNUSED) 4455 check_startup_plug_hints(gpointer data UNUSED)
4456 { 4456 {
7076 gdk_window_set_cursor(gui.drawarea->window, gui.blank_pointer); 7076 gdk_window_set_cursor(gui.drawarea->window, gui.blank_pointer);
7077 #endif 7077 #endif
7078 else 7078 else
7079 #ifdef FEAT_MOUSESHAPE 7079 #ifdef FEAT_MOUSESHAPE
7080 mch_set_mouse_shape(last_shape); 7080 mch_set_mouse_shape(last_shape);
7081 #elif GTK_CHECK_VERSION(3,0,0)
7082 gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea), NULL);
7081 #else 7083 #else
7082 gdk_window_set_cursor(gui.drawarea->window, NULL); 7084 gdk_window_set_cursor(gui.drawarea->window, NULL);
7083 #endif 7085 #endif
7084 } 7086 }
7085 } 7087 }