Commit Graph

73 Commits

Author SHA1 Message Date
Bastien Nocera
c358383d6c GtkLinkButton: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Timm Bäder
55b1f231fb linkbutton: Replace button-press-event handler with gesture 2016-12-07 18:06:28 +01:00
Emmanuele Bassi
5880d1b990 gtk: Cast static strings assigned to non-const variables
GtkTargetEntry.target is particularly egregious, and it should really be
constified.
2016-10-17 11:44:10 +01:00
William Hua
8701e34f74 port to new gtk_menu_popup_at_* () functions
https://bugzilla.gnome.org/show_bug.cgi?id=756579
2016-07-19 09:38:54 -04:00
Matthias Clasen
793d5291d9 link button: Use gtk_show_uri_on_window
This gives slightly better behavior in the sandboxed case and
makes no difference otherwise.
2016-07-13 11:24:16 -04:00
Matthias Clasen
b5fb9ae3b7 gtk: Port to new monitor api
Use the GdkDisplay monitor api instead of the GdkScreen one.
2016-04-27 23:18:16 -04:00
Matthias Clasen
bbd94b5a9f gtk: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
4cd408e8d0 link button: Add a style class
Add a .link style class to differentiate link buttons from normal
buttons.
2015-10-30 00:50:48 -04:00
Matthias Clasen
3c54fbd3ac Use stupid quotes instead of dumb quotes
Following a similar change in GLib a while ago.

'bla' may by stupid, but it looks less dumb than `bla'.
2015-09-23 07:01:16 -04:00
Matthias Clasen
5c2759af3c Use standard cursor names
This changes GTK+ to use gdk_cursor_new_from_name() with the
'standard' css names, instead of GdkCursorType.

https://bugzilla.gnome.org/show_bug.cgi?id=652085
2015-07-26 01:45:06 -04:00
Paolo Borelli
77658b76ae linkbutton: use the text-decoration-line css
Remove the custom add() implementation and use css to underline the
label.
2015-07-06 00:04:06 +02:00
Matthias Clasen
3f3f26d8a1 GtkLinkButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:05 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
Timm Bäder
2ba33adf96 GtkLinkButton: Use :link and :visited for the label's color
https://bugzilla.gnome.org/show_bug.cgi?id=709629
2013-11-04 16:36:11 +01:00
Matthias Clasen
624ec0fb7d Add a style class for context menus
Attached widgets inherit from the style of the widget they are
attached to. This can sometimes have unintended consequences,
like a context menu in the main view of gedit inheriting the font
that is configured for documents, or the context menu of the preview
in the font chooser coming up with humongous font size.

To fix this problem, we introduce a context menu style class
and use it for all menus that are used like that. The theme
can then set a font for this style class.

https://bugzilla.gnome.org/show_bug.cgi?id=697127
2013-08-18 13:46:48 -04:00
Matthias Clasen
2f1fa7cdc3 Drop some unnecessary includes
Drop includes of deprecated headers where they are
no longer needed.
2013-07-19 22:32:23 -04:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
William Jon McCann
02c793f24a Start migrating internals away from GtkStock 2013-06-24 22:20:49 -04:00
Bastien Nocera
c6a7a0889c gtk: Fix warnings for some uses of GtkLinkButton
Not setting a URI but catching the activate-link signal is a
valid use of GtkLinkButton, but we shouldn't allow showing a
popup menu which offers to copy the URI if there's none.
2012-05-10 15:22:31 +01:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
020c1846b7 Use the workarea when placing popups
This uses the new workarea API to avoid placing popups underneath
panels, docks, etc.
2011-12-18 14:29:16 -05:00
Matthias Clasen
adc731fad9 Remove various internal uses of deprecated api 2011-11-02 08:10:42 -04:00
Michael Natterer
5c4f2ef0c1 gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.h
and remove gtkmainprivate.h completely.
2011-10-23 13:57:07 +02:00
Michael Natterer
2d3db3421f Bug 659406 - Abstract what triggers a context menu
Add gdk_event_triggers_context_menu(), using the new modifier
abstraction API. Remove _gtk_button_event_triggers_context_menu()
and port all callers.
2011-09-27 15:45:18 +02:00
Michael Natterer
b663f3a00b Bug 659406 - Abstract what triggers a context menu
Add _gtk_button_event_triggers_context_menu() and use it instead
of checking for event->button == 3, so context menus are invoked
correctly on the Mac.
2011-09-26 16:01:50 +02:00
Bastien Nocera
3c2eb053d6 link-button: Reset the mouse cursor when destroyed
If clicking on a link destroys the link button, and keeps the
same GdkWindow then the cursor stays as a hand in the rest of
the interface.

https://bugzilla.gnome.org/show_bug.cgi?id=659247
2011-09-16 15:06:28 +01:00
Matthias Clasen
d15319b717 Convert GailLinkButton to GtkLinkButtonAccessible 2011-07-05 16:08:53 -04:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Matthias Clasen
beb8c290d1 Always chain up in ::style-updated
This was not handled consistently, but the default handler
does useful things, so we should always chain up.
2011-02-07 07:30:37 -05:00
Matthias Clasen
b123bc41fd Move docs for gtkmain inline
At the same time, introduce a gtkmainprivate.h header
and various other cleanups.

Based on a patch by Tadej Borovšak.
https://bugzilla.gnome.org/show_bug.cgi?id=617471
2011-01-04 17:32:12 -05:00
Carlos Garnacho
166b709c7f Make GtkLinkButton use ::style-updated 2011-01-04 03:06:23 +01:00
Benjamin Otte
8f1f743903 gtk: Use g_object_unref instead of gdk_cursor_unref 2010-12-21 12:07:05 -05:00
Javier Jardón
8537163e20 gtk/gtklinkbutton.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Emmanuele Bassi
17ffcb0cc6 link-button: Add ::activate-link signal
We cannot use the GtkButton::clicked signal to override the default
behavior of GtkLinkButton (i.e. call gtk_show_uri()), because
GtkButton::clicked is registered as a RUN_FIRST signal, which obviously
prevents any other signal handler connected to it to stop the
propagation before the class handler has a chance to run.

For this reason we can add a GtkLinkButton::activate-link signal, which
will be emitted by the default GtkButton::clicked signal handler; the
::activate-link signal has a boolean return value, which allows simpler
code for stopping the propagation to the next signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=632150
2010-10-15 10:36:01 +01:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Matthias Clasen
cc9ac5b7ea Update docs of GtkAboutDialog and GtkLinkButton
Remove references to global hooks from the docs. Also move remaining
docs inline, and remove the templates.
2010-09-24 13:41:29 -04:00
Matthias Clasen
b0713fb3bb Remove url hooks from GtkAboutDialog and GtkLinkButton
With gtk_show_uri, global configurability of link activation has
moved to GIO/gvfs. For local overrides, GtkLinkButton has the ::clicked
signal, and GtkAboutDialog gets an ::activate-link signal.

Bug 339745
2010-09-22 00:36:13 -04:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Javier Jardón
00152ff835 gtk/gtklinkbutton.c: use accessor functions to access GtkWidget 2010-08-22 22:56:10 +02:00
Javier Jardón
59942f91cb GtkLinkButton: unseal private pointer 2010-07-13 19:40:48 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Javier Jardón
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01:00
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 06:11:01 +01:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Matthias Clasen
2afd463b26 Fix the build
svn path=/trunk/; revision=21854
2008-12-08 02:47:21 +00:00
Matthias Clasen
9ed0abb510 Call gtk_show_uri() if no uri hook has been set. Patch by Emmanuele Bassi
* gtk/gtklinkbutton.c: Call gtk_show_uri() if no uri hook has
        been set. Patch by Emmanuele Bassi


svn path=/trunk/; revision=21853
2008-12-08 02:39:28 +00:00