Commit Graph

13926 Commits

Author SHA1 Message Date
Matthias Clasen
896a6b2452 Fix the build
G_GNUC_FUNCTION is deprecated.
2011-04-29 16:50:17 -04:00
Colin Walters
9d84e6cda7 Drop the last remaining translated g_warning/g_error calls
http://mail.gnome.org/archives/desktop-devel-list/2011-March/msg00069.html

https://bugzilla.gnome.org/show_bug.cgi?id=648943
2011-04-29 10:33:50 -04:00
Colin Walters
466d688fea updateiconcache: Don't translate g_warning/g_error 2011-04-29 10:24:21 -04:00
Kalev Lember
bcc153e262 Disable gtk-update-icon-cache.exe.manifest with --enable-gtk2-dependency
When gtk-update-icon-cache building is suppressed, its manifest file
should also not be installed.

https://bugzilla.gnome.org/show_bug.cgi?id=648938
2011-04-29 10:11:12 -04:00
Benjamin Otte
5642703b0e notebook: Match horizontal and vertical code paths
I have no idea what this code does, but it looks better now. :o
2011-04-29 11:05:37 +02:00
Benjamin Otte
8e1714d59b notebook: Respect left border when allocating tab widgets
This mirrors the code for the other tab locations.
2011-04-29 11:05:36 +02:00
Benjamin Otte
409143637f notebook: Respect padding when computing tabs for left/right
This mirrors the top/bottom code
2011-04-29 11:05:36 +02:00
Benjamin Otte
9a4aec1446 Don't adjust for values that we have previously adjusted for
The padding had been taken into account by the computation of
priv->allocation, so don't compute it twice.
2011-04-29 11:05:36 +02:00
Benjamin Otte
02b14ffad9 notebook: Use the right padding for inactive tabs 2011-04-29 08:48:36 +02:00
Benjamin Otte
7962a4b716 window: Invert check that was wrong 2011-04-29 03:27:02 +02:00
Benjamin Otte
1c46e04f30 arrow: Make minimum size 5px, as opposed to the 15 it was before
Number chosen by staring out the window and counting visible stars.

This is necessary so that path bars don't underallocate the arrow widget
they use.
2011-04-28 22:21:45 +02:00
Benjamin Otte
5b1ca9dfa8 widget: Allow underallocation for scrollables
Also document this fact.
2011-04-28 22:21:45 +02:00
Benjamin Otte
2eac1ac73b docs: Fix liststore docs
gtk-doc was very unhappy. It's not anymore
2011-04-28 22:21:45 +02:00
Benjamin Otte
7e2eed8c1b widget: Update underallocation warning
Also print the parent widget. As the parent's size_allocate
implementation is usually the culprit for this warning happening, it
makes sense to print it.
2011-04-28 22:21:45 +02:00
Benjamin Otte
6e3b4af3c5 paned: Move showing of the handle from realize() to map()
Also only show the paned if it's actually supposed to be visible.
2011-04-28 22:21:45 +02:00
Benjamin Otte
3e9664ce65 paned: Remove needless check 2011-04-28 22:21:45 +02:00
Benjamin Otte
92f9892cca widget: Warn when allocation for gtk_widget_size_allocate() is too small
Widgets may not be underallocated, it is the responsibility of the
caller to ensure this never happens.
2011-04-28 05:13:30 +02:00
Benjamin Otte
7a322193e8 notebook: Warn if builder file defines multiple tab widgets per page
Glade causes such files when a notebook page has no content. And it's
especially bad because the last tab widget wins, so the label displayed
in Glade will not be what you see when you run the app.
2011-04-28 00:54:34 +02:00
Benjamin Otte
38ea7abaae recentchooser: Fix default size setting
Set the min content size on the scrolled window instead of using
gtk_widget_set_size_request() on a widget where it's not recognized.
2011-04-27 19:59:02 +02:00
Benjamin Otte
1763b3a0b5 window: Make comparison be the right direction
Messed something up there...
2011-04-27 15:27:52 +02:00
Benjamin Otte
187f91eb90 label: Don't crash when a builder file contains unknown attributes 2011-04-27 00:43:16 +02:00
Benjamin Otte
8331b45a5f grid: Fix homogeneuous properties being flipped 2011-04-27 00:42:44 +02:00
Benjamin Otte
0094621e82 cssprovider: #include gio
We reference GFile...
2011-04-27 00:42:44 +02:00
Benjamin Otte
c7e5d0c63d tooltip: Use the actual size of the window we're going to show
It's easy by realizing the window first.

Don't try to guess the alorithm used by gtkwindow.c for sizing the
window, it might not be what we expect.
2011-04-27 00:27:29 +02:00
Benjamin Otte
85aebe74cf window: Be smarter about computing the default size
See the code comments for the reasoning behind this. After we don't
force a "guessed" minimum size for labels anymore, a lot of issues
started to surface that this patch attempts to fix. In particular:

1) Tooltips where wrapped as much as possible.
2) The recentchooser submenu displayed only ellipsize dots.
2011-04-27 00:27:29 +02:00
Benjamin Otte
08b2ac1d90 window: Split out size guessing function
This doesn't do anything special yet, but I'm about to change that.
2011-04-26 23:15:19 +02:00
Benjamin Otte
6e6837a130 window: Use int instead of uint consistently 2011-04-26 22:44:43 +02:00
Chun-wei Fan
527a299fdd Bug 643270: VS2010 Project Files (autotools)
-Update to distribute the VS2010 files.
-Added rules in Makefile.am's of GDK and GTK to fill in the
 project/filter files templates with up-to-date source file
 listings to simplify maintenace.

Any comments on the usage of the VS2010 files are welcome!
2011-04-27 00:48:05 +08:00
Benjamin Otte
9bb145a677 widget: Add hack to make label mnemonics work again
Mnemonics for characters that go beyond the baseline (q, y, g) were not
being shown, because they are drawn outside of the label's allocated
size.
This patch just disables the clip-to-size for labels, so that the label
can draw outsize of its allocation. In most cases, that works around
this bug.

https://bugzilla.gnome.org/show_bug.cgi?id=648570
2011-04-26 14:15:34 +02:00
Matthew Barnes
7ae4a06d1f GtkComboBox: Improve gtk_combo_box_set_active_id
- Passing a NULL ID string should be equivalent to
  gtk_combo_box_set_active (combo_box, -1).
- Use g_strcmp0() instead of strcmp() when comparing
  ID strings to avoid a crash when an ID is NULL.
- Return a boolean indicating if the ID was found or not.

https://bugzilla.gnome.org/show_bug.cgi?id=647806
2011-04-26 07:59:53 -04:00
Matthew Barnes
54c3f05848 Desensitize "Select All" when GtkEntry is empty
This avoids possible confusion in some situations, and
selecting an empty string is not very useful.

https://bugzilla.gnome.org/show_bug.cgi?id=647962
2011-04-26 07:56:09 -04:00
Matthias Clasen
7d3693b82b GtkEntry: Explicitly disconnect keymap signals
Might fix https://bugzilla.gnome.org/show_bug.cgi?id=648419
2011-04-26 07:48:27 -04:00
Benjamin Otte
bf41392861 label: Fix an invariant leading to required > minimum 2011-04-22 02:51:52 +02:00
Alberto Ruiz
953112f91f Adding allow-none introspection annotation for GtkInitFunc parameters 2011-04-20 20:11:11 +01:00
Alberto Ruiz
d78ace6c34 Adding introspection annotation to GtkModuleIinitFunc to specify array and length parameters 2011-04-20 20:06:14 +01:00
Benjamin Otte
da1f618b09 entry: Translate progress region properly when drawing text 2011-04-19 22:18:19 +02:00
Benjamin Otte
76294fcf1d entry: No need to queue a redraw on state changes
GtkWidget already does that.
2011-04-19 22:18:19 +02:00
Benjamin Otte
2d58625e02 entry: Also update cached style values when the state changes 2011-04-19 22:18:19 +02:00
Benjamin Otte
66dc6ea150 entry: Initialize cached values 2011-04-19 22:18:19 +02:00
Benjamin Otte
a9a2a08162 entry: g_object_notify*( when we change the invisible char 2011-04-19 22:18:19 +02:00
Benjamin Otte
0aae66c15e entry: Split out style-updating things into their own function 2011-04-19 22:18:19 +02:00
Benjamin Otte
72ebc788a6 entry: Move cairo_save() call for clarity
We want save, clip, draw1, restore, save, clip, draw2, restore
and not save, save, clip, draw1, restore, clip, draw2, restore

Functionally the same thing, but not as obvious
2011-04-19 22:18:19 +02:00
Benjamin Otte
6fee78341a entry: Omit useless clip
We do the same clip further above, so no need to repeat it
2011-04-19 22:18:19 +02:00
Benjamin Otte
033d204b9e entry: Guard clipping with a save/restore
Just t be sure, so people don't get bugs later when they refactor code.
2011-04-19 22:18:18 +02:00
Benjamin Otte
c70698084c entry: Remove needless check
The only window we're ever called to draw is our own window. D'oh.
2011-04-19 22:18:18 +02:00
Benjamin Otte
10fd53970c docs: Strictify the docs for gtk_cairo_should_draw_window()
We don't actually enforce the docs, but we will in the future. (in fact,
I only added this because widgets were doing stupid things.)
2011-04-19 22:18:18 +02:00
Benjamin Otte
9bd206a65c label: No need to special case single-line mode
It's already taken care of by the layout.
2011-04-19 22:18:18 +02:00
Benjamin Otte
38676ef718 label: Request more natural size for ellipsizing wrapping labels 2011-04-19 22:18:18 +02:00
Benjamin Otte
484e04aed2 label: Pass the desired height to measuring layout
We always pass -1 for now.
2011-04-19 22:18:18 +02:00
Benjamin Otte
403815f96f label: Remove wrap width leftovers
They're not used anymore, so we can just delete all of this code.
2011-04-19 22:18:18 +02:00
Benjamin Otte
2ecab7b90d label: Set the height of the label when ellipsized or wrapped
Obviously, we want to set it to the label's allocated height.

Also simplifies the size allocation code.
2011-04-19 22:18:18 +02:00
Benjamin Otte
5cb260075e label: Don't use a rectangle variable if we don't use a rectangle 2011-04-19 22:18:18 +02:00
Benjamin Otte
26b2f3127a label: Redo size computation
This gets use closer to the label sizing discussed on the mailing lists.
2011-04-19 22:18:18 +02:00
Benjamin Otte
8e34bff045 label: Set wrap on the layout unconditionally 2011-04-19 22:18:18 +02:00
Benjamin Otte
ffb23fb827 label: Remove duplicated comment 2011-04-19 22:18:18 +02:00
Benjamin Otte
c8ce1106c1 label: Don't try to guess a label's size
People should use window default sizes or label
width-chars/max-width-chars to find the idea layout for a label inside
of relying on magic.
2011-04-19 22:18:18 +02:00
Benjamin Otte
b5dc24fd28 widget: Make gtk_widget_get_aux_info() private 2011-04-19 22:18:18 +02:00
Benjamin Otte
c7cae341a1 label: Don't care about aux info
aux info is something that GtkWidget should do, not any of its
subclasses.
2011-04-19 22:18:18 +02:00
Benjamin Otte
4000d65ee3 paned: Use hfw queries during allocation 2011-04-19 22:18:17 +02:00
Benjamin Otte
116a104970 paned: Cleanup size_allocate()
Don't keep the allocation in 2 variables, just keep the first one.
2011-04-19 22:18:17 +02:00
Benjamin Otte
392c0dc145 paned: Implement get_width_for_height() and get_height_for_width() 2011-04-19 22:18:17 +02:00
Benjamin Otte
a45c599543 paned: Generalize code
No semantic changes, just splitting out a common function and passing a
-1 around.
2011-04-19 22:18:17 +02:00
Javier Jardón
5f3e73eae3 Move documentation to inline comments: GtkRc
The last one!
2011-04-19 11:51:06 +01:00
Javier Jardón
edd186e274 Move documentation to inline comments: GtkUIManager 2011-04-18 18:55:34 +01:00
David King
e279210522 widget: add Since tags for margin accessors 2011-04-18 08:22:54 +02:00
Matthias Clasen
dd73be389b Fix commit 5f55c42047
Make gtk_menu_shell_activate static and don't use it
outside gtkmenushell.c
2011-04-17 23:15:06 -04:00
Javier Jardón
d2d42f9bfc Move documentation to inline comments: GtkMenuItem 2011-04-18 02:08:37 +01:00
Javier Jardón
93522ce25f Move documentation to inline comments: GtkFontSelectionDialog 2011-04-18 02:08:37 +01:00
Javier Jardón
9d63d16e3e Move documentation to inline comments: GtkWindowGroup 2011-04-18 02:08:37 +01:00
Javier Jardón
f7b7e8a6b8 Move documentation to inline comments: GtkDnd 2011-04-18 02:08:37 +01:00
Javier Jardón
911ae50956 Move documentation to inline comments: GtkTreeModelSort 2011-04-18 02:08:37 +01:00
Javier Jardón
b83a4f2e1d Move documentation to inline comments: GtkToggleButton 2011-04-18 02:08:37 +01:00
Javier Jardón
5ff0fb6bbd Move documentation to inline comments: GtkSizeGroup 2011-04-18 02:08:37 +01:00
Javier Jardón
0553a5524d Move documentation to inline comments: GtkTextBuffer 2011-04-18 02:08:36 +01:00
Javier Jardón
138409faae Move documentation to inline comments: GtkPrintUnixDialog 2011-04-18 02:08:36 +01:00
Javier Jardón
14f12a4b1b Move documentation to inline comments: GtkPrintSettings 2011-04-18 02:08:36 +01:00
Javier Jardón
25c2569a5d Move documentation to inline comments: GtkPrintContext 2011-04-18 02:08:36 +01:00
Javier Jardón
c029306b4c Move documentation to inline comments: GtkRadioMenuItem 2011-04-18 02:08:36 +01:00
Javier Jardón
c9af14678e Move documentation to inline comments: GtkTextMark 2011-04-18 02:08:36 +01:00
Javier Jardón
7ee963c260 Move documentation to inline comments: GtkRadioToolButton 2011-04-18 02:08:36 +01:00
Paolo Borelli
1ad1c33f52 Small cleanup in label sizing code.
Move ellipsized_chars calculation in the scope where it is used.

https://bugzilla.gnome.org/show_bug.cgi?id=647284
2011-04-17 17:23:26 +02:00
Paolo Borelli
af7650ce1f Factor out a get_char_pixels method for clarity.
https://bugzilla.gnome.org/show_bug.cgi?id=647284
2011-04-17 17:16:47 +02:00
Ignacio Casal Quinteiro
76a571b61e [textview] remove idles when unmapping
This avoids the textview taking the whole cpu when it is hidden.
2011-04-17 16:10:48 +02:00
Benjamin Otte
49c7869582 docs fix typo
Was accidentally introduced in 1351d40cfe

Thanks Paolo for noticing.
2011-04-17 12:49:58 +02:00
Kristian Rietveld
874dfc24b2 treeview: Do not unconditionally set width_changed to TRUE, which redraws
Patches by Benjamin Otte.

The "invalidate last column" hack is removed.  It is now of no use since
the entire widget will be redrawn when a single column changes.
2011-04-17 01:14:51 +02:00
Kristian Rietveld
4d5d915afe treeview: if we are below rows that changed height: redraw
We have to redraw if we are below a couple of rows that changed height
in do_validate_rows().  This will still require a redraw for a large
amount of cases, can we do better?  You would expect that a redraw of
the tree view is not required when the dy changes with the same delta
as the delta of the height accrued when validating the nodes.  This
further optimization will likely require changes to the top_row/dy
synchronization code.
2011-04-17 01:14:51 +02:00
Kristian Rietveld
4594370b46 treeview: Avoid queueing a redraw in do_validate_rows()
If the changed rows are not visible, we likely do not have to redraw
in conjunction to resize.  Spotted by Benjamin Otte.
2011-04-17 01:14:51 +02:00
Benjamin Otte
a5e1337ad7 cssprovider: Move private struct definition to header
consistency, improved debugging, etc
2011-04-16 22:31:25 +02:00
Benjamin Otte
1351d40cfe entry: Fix gtk_entry_get_icon_at_pos()
The passed in coordinates are widget-relative, not window-relative.
2011-04-16 22:31:24 +02:00
Benjamin Otte
f2a20cd9fd entry: Use the new get_frame_size() argument in gtk_entry_draw_frame() 2011-04-16 22:31:24 +02:00
Benjamin Otte
fd9aac8225 entry: Add the ability to query frame size in two ways
TRUE: relative to widget->window
FALSE: relative to widget

For now, no caller has beeen changed.
2011-04-16 22:31:24 +02:00
Benjamin Otte
7ef113ce56 window: Only draw the resize grip if it is actually visible
This issue can only be seen if someone calls gtk_widget_draw() on the
window as otherwise gtk_cairo_should_draw_window() would return FALSE.
2011-04-16 22:31:24 +02:00
Benjamin Otte
71e9606e16 docs: Fix wrong description for query-tooltip
Coordinates are not relative to widget->window
2011-04-16 22:31:24 +02:00
Benjamin Otte
e29cceb391 menushell: Include a function in the private header
Don't copy over the implementation. This avoids a copy of the function.
Reverts 0098344f84.
2011-04-16 22:28:40 +02:00
Benjamin Otte
6b712ac93b window: cast value so gcc shuts up 2011-04-16 22:06:41 +02:00
Kristian Rietveld
84ebafc305 Merge two if-blocks with same condition 2011-04-16 20:16:03 +02:00
Xavier Claessens
00fa4a2fc0 Do not call invalidate_empty_focus() when not realized
Fixes bug 626503
2011-04-16 20:13:51 +02:00
Stéphane Maniaci
e3ce60cc2d Make GtkFileChoser remember the last directory opened
Introduces a 'last-folder-uri' GSettings key, where we remember the last-opened
folder from the previous instance of the file chooser.

The idea is that this works globally, across all applications, so it will be
easy to do things like

  1. Save an attachment from a mail (or some other file)
  2. Open another program
  3. Do File/Open and automatically get sent to the folder where (1) happened.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=644426
2011-04-15 15:34:22 -05:00
Chun-wei Fan
0098344f84 Update gtk/gtkmenuitem.c...
Copy over the implementation of _gtk_menu_shell_activate
so that C4013 warning/error (aka gcc's "implicit
declaration of ...") can be avoided when compiling with MSVC

This is in response of the changes for bug 554057 in commit
5f55c42047
2011-04-16 00:42:08 +08:00
Paolo Borelli
3e6af07f46 Free MenuPopulateData struct in all the cases.
For clarity factor out create/free functions.

https://bugzilla.gnome.org/show_bug.cgi?id=646876
2011-04-15 11:11:17 +02:00