[Xfce4-commits] <mousepad:master> * mousepad/mousepad-document.c: Make tab close button a bit smaller.
Nick Schermer
noreply at xfce.org
Sat May 5 21:31:01 CEST 2012
- Previous message: [Xfce4-commits] <mousepad:master> * mousepad/mousepad-window.c: Use a box for packing the window elements. A table was not really needed, and boxes are a bit faster in calculating child sizes. * mousepad/mousepad-window.c: Remove unused variable.
- Next message: [Xfce4-commits] <mousepad:master> * mousepad/mousepad-document.c: Fix column number in statusbar. First column is 0 and not 1. * mousepad/mousepad-dialogs.c: Improve the go to dialog. You can now set the column number too. * mousepad/mousepad-window{.c, -ui.xml}: Improve the menu layout big time. Make mnemonics consistent right now. A couple of name, tooltip and keybindings changes. Internal names make more sense now. * mousepad/mousepad-{window, view}.c Add option to paste from history. The history holds the last 9 history cut/copied items from Mousepad. * mousepad/mousepad-window.c: New from template menu. Works the same as the implementation in Thunar. Menu is generated the first time the file menu is shown. Same for the recent menu. * mousepad/mousepad-{window, view}.c: Add option to toggle between column and normal selections. Put it in View -> Change to Column Selection. To make this work properly I've removed multi selection. Code got much easier and a co uple of complex functions were dropped. * mousepad/mousepad-window{.c, -ui.xml}: Put search menu items in the edit menu, since you will most likely access them from keybindings most of the time. * mousepad/mousepad-window.c: Cleanuped up a lot of functions. * mousepad/mousepad-window.c: Check if files exists when generating the recent menu, remove it when it was not found. Also unref the action after adding it to the action group, fixes an ugly memory leak, since the recent info isn't released eighter. * mousepad/mousepad-util.c: Add faster function to escape underscores in the recent menu. Drop the previous function used for this. * mousepad/mousepad-private.h: Add macros around g_object_(get/set) _qdata and use them instead of the existing g_object_(get/set) _data functions. * mousepad/mousepad-view.c: Fix indent with (shift) tab. * mousepad/mousepad-view.c: Improve line number drawing. Only redraw the line numbers in the expose area and some other cha nges to reduce the amount of redraws and iter calls. * mousepad/mousepad-view.c: Use the IM to type in multi selections, the previous way was deprecated and this fixes a couple of weird issues. * mousepad/mousepad-view.c: Show realtime selection size in column selections. * mousepad/mousepad-{document, view, window}.c: Put selection change in a separate signal to avoid multiple update the the action group. * mousepad/mousepad-view.c: Avoid a lot of statusbar updates and column selection redraws during dragging by comparing the old and new cursor position. On the other hand, the 'only draw the visible area during drag' trick has been partly removed to properly display the selection length during a column draw that covers more then the window height. * mousepad/mousepad-{util, view}.c: Add functions to change the case of a selection. * mousepad/mousepad-view.c: Add function to replace tabs with spaces and vice versa. The replacements are inlined, so you don't see visual changes in the document. Actions are not usable during column selections. * mousepad/mousepad-window.c: Make the arrow buttons in the notebook work. * mousepad/mousepad-window.c: Close document on middle click on the tab, this is a stupid feature, but since everyone requests it on apps with tabs: add it to save a bugzilla report. * mousepad/mousepad-{window, view}.c: Add actions to increase or decrease the indentation of line(s) using the menu or keybindings. * mousepad/mousepad-{window, view}.c: Add an action to duplicate a line or selection. Only work for normal selections or no selection. * mousepad/mousepad-{window, view}.c: Add an action to move the selected lines up and down. Not implemented for column selections (yet). Menu actions are insensitive when there is no regual selection. * mousepad/mousepad-{window, view}.c: Add option to strip trailing spaces and tabs. * mousepad/mousepad-window.c: Add a file to the recent history aft er saving it under another name. * mousepad/mousepad-window{.c, -ui.xml}: Add line ending type in the document menu. * mousepad/mousepad-window.c: Avoid one menu update when adding or removing a new document to the window. * mousepad/mousepad-document.c: Change tab label color when the document is modified or readonly. * ChangeLog: Properly break lines.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Updating branch refs/heads/master
to 976c9707d60945030612eaf79db2e577135fe4ef (commit)
from d2cf9f1d53f4818ea92e162cf6b71b9963144ce8 (commit)
commit 976c9707d60945030612eaf79db2e577135fe4ef
Author: Nick Schermer <nick at xfce.org>
Date: Thu Nov 29 19:20:44 2007 +0000
* mousepad/mousepad-document.c: Make tab close button a bit smaller.
(Old svn revision: 26407)
ChangeLog | 4 ++++
mousepad/mousepad-document.c | 23 +++++++++++++++--------
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0d17c79..711aa0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
2007-11-29 Nick Schermer <nick at xfce.org>
+ * mousepad/mousepad-document.c: Make tab close button a bit smaller.
+
+
+2007-11-29 Nick Schermer <nick at xfce.org>
* mousepad/mousepad-window.c: Use a box for packing the window elements.
A table was not really needed, and boxes are a bit faster in calculating
child sizes.
diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c
index 3a318e2..3c388dc 100644
--- a/mousepad/mousepad-document.c
+++ b/mousepad/mousepad-document.c
@@ -499,8 +499,9 @@ mousepad_document_line_numbers (MousepadDocument *document,
GtkWidget *
mousepad_document_get_tab_label (MousepadDocument *document)
{
- GtkWidget *hbox;
- GtkWidget *button, *image;
+ GtkWidget *hbox;
+ GtkWidget *button, *image;
+ GtkRcStyle *style;
/* create the box */
hbox = gtk_hbox_new (FALSE, 0);
@@ -518,12 +519,18 @@ mousepad_document_get_tab_label (MousepadDocument *document)
gtk_widget_show (document->priv->label);
/* create the button */
- button = g_object_new (GTK_TYPE_BUTTON,
- "relief", GTK_RELIEF_NONE,
- "focus-on-click", FALSE,
- "border-width", 0,
- "can-default", FALSE,
- "can-focus", FALSE, NULL);
+ button = gtk_button_new ();
+ gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
+ gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+ GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_DEFAULT | GTK_CAN_FOCUS);
+
+ /* make button a bit smaller */
+ style = gtk_rc_style_new ();
+ style->xthickness = style->ythickness = 0;
+ gtk_widget_modify_style (button, style);
+ gtk_rc_style_unref (style);
+
+ /* pack button, add signal and tooltip */
mousepad_util_set_tooltip (button, _("Close this tab"));
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (mousepad_document_tab_button_clicked), document);
- Previous message: [Xfce4-commits] <mousepad:master> * mousepad/mousepad-window.c: Use a box for packing the window elements. A table was not really needed, and boxes are a bit faster in calculating child sizes. * mousepad/mousepad-window.c: Remove unused variable.
- Next message: [Xfce4-commits] <mousepad:master> * mousepad/mousepad-document.c: Fix column number in statusbar. First column is 0 and not 1. * mousepad/mousepad-dialogs.c: Improve the go to dialog. You can now set the column number too. * mousepad/mousepad-window{.c, -ui.xml}: Improve the menu layout big time. Make mnemonics consistent right now. A couple of name, tooltip and keybindings changes. Internal names make more sense now. * mousepad/mousepad-{window, view}.c Add option to paste from history. The history holds the last 9 history cut/copied items from Mousepad. * mousepad/mousepad-window.c: New from template menu. Works the same as the implementation in Thunar. Menu is generated the first time the file menu is shown. Same for the recent menu. * mousepad/mousepad-{window, view}.c: Add option to toggle between column and normal selections. Put it in View -> Change to Column Selection. To make this work properly I've removed multi selection. Code got much easier and a co uple of complex functions were dropped. * mousepad/mousepad-window{.c, -ui.xml}: Put search menu items in the edit menu, since you will most likely access them from keybindings most of the time. * mousepad/mousepad-window.c: Cleanuped up a lot of functions. * mousepad/mousepad-window.c: Check if files exists when generating the recent menu, remove it when it was not found. Also unref the action after adding it to the action group, fixes an ugly memory leak, since the recent info isn't released eighter. * mousepad/mousepad-util.c: Add faster function to escape underscores in the recent menu. Drop the previous function used for this. * mousepad/mousepad-private.h: Add macros around g_object_(get/set) _qdata and use them instead of the existing g_object_(get/set) _data functions. * mousepad/mousepad-view.c: Fix indent with (shift) tab. * mousepad/mousepad-view.c: Improve line number drawing. Only redraw the line numbers in the expose area and some other cha nges to reduce the amount of redraws and iter calls. * mousepad/mousepad-view.c: Use the IM to type in multi selections, the previous way was deprecated and this fixes a couple of weird issues. * mousepad/mousepad-view.c: Show realtime selection size in column selections. * mousepad/mousepad-{document, view, window}.c: Put selection change in a separate signal to avoid multiple update the the action group. * mousepad/mousepad-view.c: Avoid a lot of statusbar updates and column selection redraws during dragging by comparing the old and new cursor position. On the other hand, the 'only draw the visible area during drag' trick has been partly removed to properly display the selection length during a column draw that covers more then the window height. * mousepad/mousepad-{util, view}.c: Add functions to change the case of a selection. * mousepad/mousepad-view.c: Add function to replace tabs with spaces and vice versa. The replacements are inlined, so you don't see visual changes in the document. Actions are not usable during column selections. * mousepad/mousepad-window.c: Make the arrow buttons in the notebook work. * mousepad/mousepad-window.c: Close document on middle click on the tab, this is a stupid feature, but since everyone requests it on apps with tabs: add it to save a bugzilla report. * mousepad/mousepad-{window, view}.c: Add actions to increase or decrease the indentation of line(s) using the menu or keybindings. * mousepad/mousepad-{window, view}.c: Add an action to duplicate a line or selection. Only work for normal selections or no selection. * mousepad/mousepad-{window, view}.c: Add an action to move the selected lines up and down. Not implemented for column selections (yet). Menu actions are insensitive when there is no regual selection. * mousepad/mousepad-{window, view}.c: Add option to strip trailing spaces and tabs. * mousepad/mousepad-window.c: Add a file to the recent history aft er saving it under another name. * mousepad/mousepad-window{.c, -ui.xml}: Add line ending type in the document menu. * mousepad/mousepad-window.c: Avoid one menu update when adding or removing a new document to the window. * mousepad/mousepad-document.c: Change tab label color when the document is modified or readonly. * ChangeLog: Properly break lines.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Xfce4-commits
mailing list