some formatting cleanup.

2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: some formatting cleanup.

	* app/tools/gimprectangletool.c: add one space.

	* app/actions/text-tool-actions.c: look at GDK_SELECTION_CLIPBOARD,
	not PRIMARY, to set the sensitivity of "Paste".


svn path=/trunk/; revision=27424
This commit is contained in:
Michael Natterer 2008-10-26 20:05:11 +00:00 committed by Michael Natterer
parent 3a51f9b75f
commit ef66f5423f
4 changed files with 22 additions and 17 deletions

View File

@ -1,3 +1,12 @@
2008-10-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c: some formatting cleanup.
* app/tools/gimprectangletool.c: add one space.
* app/actions/text-tool-actions.c: look at GDK_SELECTION_CLIPBOARD,
not PRIMARY, to set the sensitivity of "Paste".
2008-10-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.[ch]: some general formatting cleanup.

View File

@ -152,7 +152,7 @@ text_tool_actions_update (GimpActionGroup *group,
* see whether there is text available for pasting
*/
clipboard = gtk_widget_get_clipboard (GIMP_TOOL (text_tool)->display->shell,
GDK_SELECTION_PRIMARY);
GDK_SELECTION_CLIPBOARD);
clip = gtk_clipboard_wait_is_text_available (clipboard);
#define SET_VISIBLE(action,condition) \

View File

@ -905,7 +905,7 @@ gimp_rectangle_tool_button_press (GimpTool *tool,
gimp_rectangle_tool_update_handle_sizes (rect_tool);
/* Created rectangles should not be started in narrow-mode*/
/* Created rectangles should not be started in narrow-mode */
private->narrow_mode = FALSE;
/* If the rectangle is being modified we want the center on

View File

@ -579,9 +579,9 @@ gimp_text_tool_button_release (GimpTool *tool,
GimpButtonReleaseType release_type,
GimpDisplay *display)
{
GimpRectangleTool *rect_tool = GIMP_RECTANGLE_TOOL (tool);
GimpTextTool *text_tool = GIMP_TEXT_TOOL (tool);
GimpText *text = text_tool->text;
GimpRectangleTool *rect_tool = GIMP_RECTANGLE_TOOL (tool);
GimpTextTool *text_tool = GIMP_TEXT_TOOL (tool);
GimpText *text = text_tool->text;
gint x1, y1, x2, y2;
g_object_get (text_tool,
@ -2310,12 +2310,10 @@ gimp_text_tool_clipboard_copy (GimpTextTool *text_tool,
GimpTool *tool = GIMP_TOOL (text_tool);
GtkClipboard *clipboard;
if (use_clipboard)
clipboard = gtk_widget_get_clipboard (tool->display->shell,
GDK_SELECTION_CLIPBOARD);
else
clipboard = gtk_widget_get_clipboard (tool->display->shell,
GDK_SELECTION_PRIMARY);
clipboard = gtk_widget_get_clipboard (tool->display->shell,
use_clipboard ?
GDK_SELECTION_CLIPBOARD :
GDK_SELECTION_PRIMARY);
gtk_text_buffer_copy_clipboard (text_tool->text_buffer, clipboard);
}
@ -2327,12 +2325,10 @@ gimp_text_tool_clipboard_paste (GimpTextTool *text_tool,
GimpTool *tool = GIMP_TOOL (text_tool);
GtkClipboard *clipboard;
if (use_clipboard)
clipboard = gtk_widget_get_clipboard (tool->display->shell,
GDK_SELECTION_CLIPBOARD);
else
clipboard = gtk_widget_get_clipboard (tool->display->shell,
GDK_SELECTION_PRIMARY);
clipboard = gtk_widget_get_clipboard (tool->display->shell,
use_clipboard ?
GDK_SELECTION_CLIPBOARD :
GDK_SELECTION_PRIMARY);
gtk_text_buffer_paste_clipboard (text_tool->text_buffer, clipboard, NULL, TRUE);
}