1. 28 Jun, 2010 1 commit
    • Jan D's avatar
      Use non-deprecated Gtk+ functions, add changes for Gtk+3 with GSEAL_ENABLE. · e547b051
      Jan D authored
      * configure.in: Add --with-x-toolkit=gtk3. Remove HAVE_GTK_MULTIDISPLAY,
      check for gtk_file_chooser_dialog_new, and HAVE_GTK_FILE_BOTH (implied
      by minimum required Gtk+ 2.6).  Add checks for functions introduced
      in Gtk+ 2.14 or newer.
      
      * xterm.h (gtk_widget_get_window, gtk_widget_get_mapped)
      (gtk_adjustment_get_page_size, gtk_adjustment_get_upper): New
      defines based on what configure finds.
      
      * xterm.c (XTflash): Use gtk_widget_get_window.
      (xg_scroll_callback): Use gtk_adjustment_get_upper and
      gtk_adjustment_get_page_size.
      (handle_one_xevent): Use gtk_widget_get_mapped.
      (x_term_init): Remove HAVE_GTK_MULTIDISPLAY and associated error
      messages.
      
      * xmenu.c (create_and_show_popup_menu): Call gtk_widget_get_mapped.
      
      * gtkutil.h: Replace HAVE_GTK_FILE_BOTH with
      HAVE_GTK_FILE_SELECTION_NEW.
      
      * gtkutil.c (xg_display_open, xg_display_close): Remove
      HAVE_GTK_MULTIDISPLAY, it is always defined.
      (xg_display_open): Return type is void.
      (gtk_widget_set_has_window)
      (gtk_dialog_get_action_area, gtk_dialog_get_content_area)
      (gtk_widget_get_sensitive, gtk_adjustment_set_page_size)
      (gtk_adjustment_set_page_increment)
      (gtk_adjustment_get_step_increment): #define these if not found
      by configure.
      (remove_submenu): New define based on Gtk+ version.
      (xg_set_cursor, xg_frame_resized, xg_event_is_for_scrollbar): Use
      gtk_widget_get_window.
      (xg_frame_resized, xg_update_frame_menubar): Use gtk_widget_get_mapped.
      (xg_create_frame_widgets): Use gtk_widget_set_has_window.
      (create_dialog): Use gtk_dialog_get_action_area and
      gtk_dialog_get_content_area.
      (xg_uses_old_file_dialog, xg_get_file_name): Remove HAVE_GTK_FILE_BOTH
      and HAVE_GTK_FILE_CHOOSER_DIALOG_NEW.  File chooser is always
      available, so checking for HAVE_GTK_FILE_SELECTION_NEW is enough.
      (xg_update_menubar, xg_update_submenu, xg_show_toolbar_item): Use
      g_object_ref and g_object_unref.
      (xg_update_menu_item, xg_tool_bar_menu_proxy): Use
      gtk_widget_get_sensitive.
      (xg_update_submenu): Use remove_submenu.
      (xg_update_scrollbar_pos): Don't use GtkFixedChild, use child
      properties instead to get old x and y position.
      (xg_set_toolkit_scroll_bar_thumb): Use gtk_adjustment_get_page_size,
      gtk_adjustment_get_step_increment, gtk_adjustment_set_page_size,
      gtk_adjustment_set_step_increment and gtk_adjustment_set_page_increment.
      (xg_get_tool_bar_widgets): New function.
      (xg_tool_bar_menu_proxy, xg_show_toolbar_item)
      (update_frame_tool_bar): Call xg_get_tool_bar_widgets.
      (toolbar_set_orientation): New #define based on if configure
      finds gtk_orientable_set_orientation.
      (xg_create_tool_bar): Call toolbar_set_orientation.
      (xg_make_tool_item, xg_show_toolbar_item): Call gtk_box_pack_start
      instead of gtk_box_pack_start_defaults.
      e547b051
  2. 22 Jun, 2010 1 commit
    • Jan Djärv's avatar
      Hide scroll bar when window is too small to avoid Gtk+ warning. · bc869eca
      Jan Djärv authored
      * gtkutil.c (xg_update_scrollbar_pos): Show/hide scroll bar as needed
      if height is less than scroll bar min size.
      (xg_show_scroll_bar): Remove, show moved to xg_update_scrollbar_pos.
      
      * gtkutil.h (xg_show_scroll_bar): : Remove.
      
      * xterm.c (x_scroll_bar_create): Remove call to xg_show_scroll_bar.
      bc869eca
  3. 13 Jan, 2010 1 commit
  4. 13 Dec, 2009 1 commit
    • Jan Djärv's avatar
      Bug 5177: Scroll bar thumb did not move when scrolling with mouse wheel. · e5f0bc9a
      Jan Djärv authored
      * xterm.c (xg_scroll_callback): Parameter list changed,
      use parameter GtkScrollType to determine scroll/line/page.
      Only allow dragging if a button < 4 is grabbed (bug #5177).
      (xg_end_scroll_callback): New function.
      (x_create_toolkit_scroll_bar): Pass xg_end_scroll_callback to
      xg_create_scroll_bar.
      
      * gtkutil.c (xg_gtk_scroll_destroy): Remove XG_LAST_SB_DATA handling.
      (scroll_end_callback): Remove.
      (xg_create_scroll_bar): Add parameter end_callback, bind it to
      button-release-event.  Replace value-changed event with change-value,
      bug #5177,
      (xg_event_is_for_scrollbar): Only return true if button is less than 4,
      bug #5177.
      
      * gtkutil.h (XG_LAST_SB_DATA): Remove.
      (xg_create_scroll_bar): Add GCallback end_callback.
      e5f0bc9a
  5. 06 Nov, 2009 1 commit
    • Jan Djärv's avatar
      Fix bug #4870, issues 3 and 4. · e511451f
      Jan Djärv authored
      * gtkutil.c (xg_event_is_for_scrollbar): New function (bug#4870).
      
      * gtkutil.h: Declare xg_event_is_for_scrollbar (bug#4870).
      
      * xterm.c (handle_one_xevent): Call xg_event_is_for_scrollbar for
      ButtonPressRelease and MotionNotify (bug#4870).
      e511451f
  6. 08 Jan, 2009 1 commit
  7. 10 Jun, 2008 1 commit
  8. 15 May, 2008 1 commit
  9. 01 Mar, 2008 1 commit
  10. 08 Jan, 2008 1 commit
  11. 25 Jul, 2007 1 commit
  12. 21 Jan, 2007 1 commit
  13. 02 Jan, 2007 1 commit
  14. 06 Feb, 2006 1 commit
  15. 23 Dec, 2005 1 commit
  16. 16 Aug, 2005 1 commit
  17. 13 Aug, 2005 1 commit
  18. 07 Aug, 2005 1 commit
  19. 04 Jul, 2005 1 commit
  20. 04 Nov, 2004 1 commit
  21. 02 Nov, 2004 1 commit
    • Jan Djärv's avatar
      * fileio.c (Fread_file_name): Pass Qt as fifth parameter to · f9d64bb3
      Jan Djärv authored
      Fx_file_dialog if only directories should be read.
      
      * lisp.h: Fx_file_dialog takes 5 parameters.
      
      * xfns.c (Fx_file_dialog): Both Motif and GTK version:  Add
      parameter only_dir_p.
      In Motif version, don't put DEFAULT_FILENAME in filter part of the
      dialog, just text field part.  Do not add DEFAULT_FILENAME
      to list of files if it isn't there.
      In GTK version, pass only_dir_p parameter to xg_get_file_name.
      
      * macfns.c (Fx_file_dialog): Add parameter only_dir_p.  Check
      only_dir_p instead of comparing prompt to "Dired".  When using
      a save dialog, add option kNavDontConfirmReplacement, change title
      to "Enter name", change text for save button to "Ok".
      
      * w32fns.c (Fx_file_dialog): Add parameter only_dir_p.  Check
      only_dir_p instead of comparing prompt to "Dired".
      
      * gtkutil.c (xg_get_file_with_chooser)
      (xg_get_file_with_selection): New functions, only defined ifdef
      HAVE_GTK_FILE_CHOOSER_DIALOG_NEW and HAVE_GTK_FILE_SELECTION_NEW
      respectively.
      (xg_get_file_name): Add parameter only_dir_p.
      Call xg_get_file_with_chooser or xg_get_file_with_selection
      depending on HAVE_GTK_FILE* and the value of use_old_gtk_file_dialog.
      (xg_initialize): New DEFVAR_BOOL use_old_gtk_file_dialog.
      
      * gtkutil.h (xg_get_file_name): Add parameter only_dir_p.
      f9d64bb3
  22. 19 Oct, 2004 1 commit
  23. 30 Aug, 2004 1 commit
  24. 16 Apr, 2004 1 commit
  25. 16 Nov, 2003 1 commit
  26. 02 Nov, 2003 1 commit
  27. 08 Sep, 2003 1 commit
  28. 01 Sep, 2003 1 commit
  29. 23 Mar, 2003 1 commit
  30. 18 Mar, 2003 1 commit
  31. 14 Mar, 2003 1 commit
  32. 09 Mar, 2003 1 commit
  33. 04 Feb, 2003 1 commit
  34. 25 Jan, 2003 1 commit
  35. 19 Jan, 2003 1 commit