summaryrefslogtreecommitdiff
path: root/eel/eel-editable-label.c
AgeCommit message (Collapse)AuthorFilesLines
2022-07-21eel-editable-label: Consecutive break/return statements are unnecessaryrbuj1-1/+0
2022-07-21Replace GtkStateType (GTK2 enum) with GtkStateFlags (GTK3 enum)rbuj1-8/+8
2022-07-20editable-label: Don't hyphenate filenamesraveit651-0/+11
more fixes for https://github.com/mate-desktop/caja/issues/1284 Pango 1.44 got the ability to automatically hyphenate on line breaks, which is on by default, but can be set off by a new attribute. As a result, we now hyphenate filenames, which is confusing, because a filename may already include hyphens. To restore the previous behavior, let's not insert hyphens when breaking filenames in multiple lines. Inspired by https://gitlab.gnome.org/GNOME/nautilus/commit/9738d85
2022-07-20avoid redundant redeclarationsPablo Barciela1-11/+8
2022-07-19eel: reduce the scope of some variablesPablo Barciela1-6/+9
Fixes 'cppcheck' warnings: [eel/eel-background.c:163]: (style) The scope of the variable 'intensity' can be reduced. [eel/eel-background.c:163]: (style) The scope of the variable 'saturation' can be reduced. [eel/eel-background.c:196]: (style) The scope of the variable 'end_color' can be reduced. [eel/eel-canvas-rect-ellipse.c:600]: (style) The scope of the variable 'tmp' can be reduced. [eel/eel-canvas-rect-ellipse.c:705]: (style) The scope of the variable 'width_pixels' can be reduced. [eel/eel-canvas-rect-ellipse.c:706]: (style) The scope of the variable 'width_lt' can be reduced. [eel/eel-canvas-rect-ellipse.c:706]: (style) The scope of the variable 'width_rb' can be reduced. [eel/eel-canvas.c:1420]: (style) The scope of the variable 'child' can be reduced. [eel/eel-canvas.c:1493]: (style) The scope of the variable 'i' can be reduced. [eel/eel-canvas.c:1518]: (style) The scope of the variable 'i' can be reduced. [eel/eel-canvas.c:1545]: (style) The scope of the variable 'i' can be reduced. [eel/eel-canvas.c:1599]: (style) The scope of the variable 'child' can be reduced. [eel/eel-canvas.c:2598]: (style) The scope of the variable 'cx' can be reduced. [eel/eel-canvas.c:2598]: (style) The scope of the variable 'cy' can be reduced. [eel/eel-debug.c:80]: (style) The scope of the variable 'f' can be reduced. [eel/eel-editable-label.c:1493]: (style) The scope of the variable 'clip' can be reduced. [eel/eel-editable-label.c:1571]: (style) The scope of the variable 'text' can be reduced. [eel/eel-editable-label.c:2270]: (style) The scope of the variable 'anchor' can be reduced. [eel/eel-editable-label.c:2270]: (style) The scope of the variable 'end' can be reduced. [eel/eel-editable-label.c:3054]: (style) The scope of the variable 'menuitem' can be reduced. [eel/eel-editable-label.c:3400]: (style) The scope of the variable 'index' can be reduced. [eel/eel-gdk-pixbuf-extensions.c:85]: (style) The scope of the variable 'scale' can be reduced. [eel/eel-gdk-pixbuf-extensions.c:283]: (style) The scope of the variable 's_x1' can be reduced. [eel/eel-gdk-pixbuf-extensions.c:283]: (style) The scope of the variable 's_y2' can be reduced. [eel/eel-gdk-pixbuf-extensions.c:284]: (style) The scope of the variable 's_xfrac' can be reduced. [eel/eel-glib-extensions.c:439]: (style) The scope of the variable 'compare_result' can be reduced. [eel/eel-glib-extensions.c:561]: (style) The scope of the variable 'hash_table_to_free' can be reduced. [eel/eel-graphic-effects.c:74]: (style) The scope of the variable 'pixsrc' can be reduced. [eel/eel-graphic-effects.c:74]: (style) The scope of the variable 'pixdest' can be reduced. [eel/eel-graphic-effects.c:137]: (style) The scope of the variable 'pixsrc' can be reduced. [eel/eel-graphic-effects.c:137]: (style) The scope of the variable 'pixdest' can be reduced. [eel/eel-graphic-effects.c:195]: (style) The scope of the variable 'pixsrc' can be reduced. [eel/eel-graphic-effects.c:196]: (style) The scope of the variable 'pixdest' can be reduced. [eel/eel-graphic-effects.c:245]: (style) The scope of the variable 'slab_width' can be reduced. [eel/eel-graphic-effects.c:262]: (style) The scope of the variable 'slab_height' can be reduced. [eel/eel-graphic-effects.c:282]: (style) The scope of the variable 'y' can be reduced. [eel/eel-gtk-extensions.c:165]: (style) The scope of the variable 'screen' can be reduced. [eel/eel-gtk-extensions.c:167]: (style) The scope of the variable 'screen_width' can be reduced. [eel/eel-gtk-extensions.c:167]: (style) The scope of the variable 'screen_height' can be reduced. [eel/eel-gtk-extensions.c:168]: (style) The scope of the variable 'scale' can be reduced. [eel/eel-labeled-image.c:1051]: (style) The scope of the variable 'x_alignment' can be reduced. [eel/eel-labeled-image.c:1052]: (style) The scope of the variable 'y_alignment' can be reduced. [eel/eel-labeled-image.c:1100]: (style) The scope of the variable 'x_alignment' can be reduced. [eel/eel-labeled-image.c:1101]: (style) The scope of the variable 'y_alignment' can be reduced. [eel/eel-mate-extensions.c:73]: (style) The scope of the variable 'quoted' can be reduced. [eel/eel-stock-dialogs.c:409]: (style) The scope of the variable 'button_title' can be reduced. [eel/eel-string.c:415]: (style) The scope of the variable 'i' can be reduced. [eel/eel-string.c:542]: (style) The scope of the variable 'type' can be reduced. [eel/eel-vfs-extensions.c:65]: (style) The scope of the variable 'valid_bytes' can be reduced. [eel/eel-wrap-table.c:766]: (style) The scope of the variable 'hadj' can be reduced. [eel/eel-wrap-table.c:766]: (style) The scope of the variable 'vadj' can be reduced.
2022-07-19eel-editable-label: Use 'memmove' instead of 'memcpy'Pablo Barciela1-1/+1
Fixes 'flawfinder' warning: (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data.
2019-03-22eel-editable-label: call argument with initialized valuePablo Barciela1-2/+2
Fixes Clang static analyzer warning: eel-editable-label.c:2624:9: warning: 2nd function call argument is an uninitialized value if (pango_layout_line_x_to_index (line, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-05-16editable-label: avoid deprecated 'gtk_im_multicontext_append_menuitems'Pablo Barciela1-15/+1
drop "Input Methods"
2018-05-14eel-editable-label.c: avoid deprecated 'gdk_keymap_get_default'Pablo Barciela1-5/+5
2018-05-13eel-editable-label: avoid deprecated gtk_style_context_set_backgroundPablo Barciela1-15/+0
2018-05-07Replace deprecated gtk_menu_popupraveit651-37/+2
Replace deprecated gtk_menu_popup in eel-editable-label,caja-dnd, emblem-sidebar,caja-side-pane, fm-tree-view, caja-navigation-window-pane, and caja-zoom-control
2018-05-05avoid deprecated 'gtk_style_context_get_background_color'Pablo Barciela1-3/+13
2018-04-04Scale screen dimensionsVictor Kareh1-3/+7
2018-03-27rename 'mate_image_menu_item...' to 'eel_image_menu_item_new_from_icon'Pablo Barciela1-27/+5
2018-03-26eel-editable-label.c: avoid 'append_action_signal' with stock idsPablo Barciela1-3/+3
2018-02-21eel-editable-label.c: avoid gtk_image_menu_item_new_from_stockPablo Barciela1-7/+34
and add icon to "Select All"
2018-02-09avoid deprecated GtkStockPablo Barciela1-3/+3
2018-01-31require GTK+ 3.22 and GLib 2.50monsta1-7/+2
2017-12-16WidthOfScreen and HeightOfScreen implementationPablo Barciela1-11/+4
This commit reverts: https://github.com/mate-desktop/caja/commit/4c130e22b98bbc1a85747adac3b582e45d34514e https://github.com/mate-desktop/caja/commit/ac12e6d16f4a51b3327d013781e72cfec17f3624 https://github.com/mate-desktop/caja/commit/17b3c0ca924ffcd4bd06fded98227eba626d4f0b https://github.com/mate-desktop/caja/commit/42c8d2c3373c25d6e321be6950997c0d7ce44279 And it applies an alternative to fix the deprecated functions: gdk_screen_get_width gdk_screen_get_height gdk_screen_width gdk_screen_height
2017-08-12avoid deprecated gdk_screen_width/heightZenWalker1-3/+11
2016-11-22move to GTK+3 (>= 3.14), drop libunique, GTK+2 code, and --with-gtk build ↵lukefromdc1-435/+12
option *Remove GTK_VERSION_CHECK (3, 0, 0) and libunique selectors *Remove GTK2 and libunique specific code. *Leaves selector for specific GTK3 versions. *Remove #DEFINES for vbox/hbox previously required for GTK2 compatability *Keep vbox in caja-spatial-window.c, it is necessary for the desktop to work *spatial-window vbox issue at https://github.com/mate-desktop/caja/issues/591
2016-10-11Fix accessible object inherritance when used with GTK 3Luke Yelavich1-1/+54
Also disable eel accessibility code that is not needed. Fixes https://github.com/mate-desktop/caja/issues/590
2016-07-08editable-label: reduce ifdefine hellraveit651-17/+19
2016-07-08GTK+-3 eel-editable-label: drop usage of GtkMiscraveit651-0/+41
and use halign and valign with help from Vlad Orlov
2016-06-26GTK+-3 eel-editable-label: do not use deprecated gtk_misc_get_paddingraveit651-2/+23
2016-01-21editable-labels: don't use deprecated gdk_cursor_new ()Wolfgang Ulbrich1-1/+3
2016-01-21GTK3 editable-label: don't use deprecated gtk_draw_insertion_cursor()Wolfgang Ulbrich1-46/+81
+ reduce if define hell a bit taken from: https://git.gnome.org/browse/nautilus/commit/?id=377349b
2016-01-15GTK3 all: don't use deprecated GDK pointer methodsWolfgang Ulbrich1-0/+6
Use the new GdkDevice methods instead. taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-4&id=a816e00 https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-4&id=cdf858f
2016-01-15GTK3 general: don't use gdk_cursor_unref()Wolfgang Ulbrich1-2/+4
taken from: https://git.gnome.org/browse/nautilus/commit/?id=74a8f78
2016-01-15GTK3 eel-editable-label: don't use deprecated gtk_widget_get_requisition ()Wolfgang Ulbrich1-0/+4
gtk_widget_get_requisition () --> gtk_widget_get_preferred_size ()
2016-01-15GTK3: don't use deprecated gtk_widget_size_requestWolfgang Ulbrich1-4/+4
gtk_widget_size_request --> gtk_widget_get_preferred_size
2016-01-13GTK3 editable-Label: render backgroundWolfgang Ulbrich1-4/+9
Without this the rename widget background is always transparent, which makes it very hard to read on e.g. the desktop with a background image. taken from: https://git.gnome.org/browse/nautilus/commit/?id=c3b2b0a
2016-01-13GTK3 editable-label: fix selection color in backdrop stateWolfgang Ulbrich1-3/+2
Don't set the ACTIVE flag if we don't have focus, it just doesn't make sense. taken from: https://git.gnome.org/browse/nautilus/commit/?id=845d3fc
2016-01-13GTK3 editable-label: use GTK_STYLE_CLASS_ENTRYWolfgang Ulbrich1-0/+4
Because that's what it is actually... taken from: https://git.gnome.org/browse/nautilus/commit/?id=e54ace0
2016-01-13GTK3 editable-label: use gtk_render_frame() instead of hardcoding a strokeWolfgang Ulbrich1-10/+8
This allows the stroke to use rounded corners and border images, among other things. taken from: https://git.gnome.org/browse/nautilus/commit/?id=b143b95
2016-01-13GTK3 editable-label: don't hardcode black for the insertion cursorWolfgang Ulbrich1-4/+10
Use the theme foreground/text color instead. taken from: https://git.gnome.org/browse/nautilus/commit/?id=f9383ac
2016-01-13GTK3 editable-label: make sure to size_request the padding set on the labelWolfgang Ulbrich1-0/+9
And not the alignment, which is an offset inside the allocated size. taken from: https://git.gnome.org/browse/nautilus/commit/?id=8b87a3e
2016-01-13GTK3 editable-label: chain up in style_updated()Wolfgang Ulbrich1-0/+4
taken from: https://git.gnome.org/browse/nautilus/commit/?id=fbabd8e
2016-01-13GTK3 editable-label: fix some drawing regressionsWolfgang Ulbrich1-219/+10
taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=6d079cc
2016-01-13GTK3 editable-label: use gtk_style_context_get() to query standard propsWolfgang Ulbrich1-4/+7
Also, fix a leak. taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=ef8544b
2016-01-13GTK3 editable-label: copy-paste code from GTK+ to sync drawing with GtkLabelWolfgang Ulbrich1-3/+220
taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=ca9f8d8 https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=e3feaf8 https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=caa55b7
2016-01-13GTK3 editable-label: port to GtkStyleContextWolfgang Ulbrich1-24/+152
There are still some rendering artifacts, but we will fix them later. (maybe) taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=d6e07c7
2015-06-18editable-label GTk3: only clear the selection if we change to insensitiveraveit651-1/+3
this fixes non selected text if renaming a file taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=d2c3410
2014-03-22fix a wrong guint argumentraveit651-1/+1
2014-01-14Use memmove with latest glib (>= 2.39)Stefano Karapetsas1-0/+5
g_memmove is removed in https://git.gnome.org/browse/glib/commit/?id=6e4a7fca431f53fdfd89afbe956212229cf52200
2012-11-16[editable-label] don't use deprecated size_request vfuncJasmine Hassan1-1/+41
http://git.gnome.org/browse/nautilus/commit/?id=12c7a03bfe3c49078cb5b44ff2651eb9ce1edce4
2012-11-16[editable-label] fix cairo drawing regressionsJasmine Hassan1-14/+21
http://git.gnome.org/browse/nautilus/commit/?id=407666719856127547f5c2f3f03f6a050858239a
2012-11-16[eel] Port EelEditableLabel to rendering-cleanup-nextJasmine Hassan1-13/+69
http://git.gnome.org/browse/nautilus/commit/?id=2b7659ac4fcaa8b93ad8f409e1560aaa60dcdc12
2012-11-16[editable-label] use gtk_widget_get_preferred_size() for GTK3Jasmine Hassan1-1/+5
and gtk_widget_size_request() for GTK2 http://git.gnome.org/browse/nautilus/commit/?id=4963a3c9e5526ffd139b1b0b5bff18b6ea91a717
2012-11-16[eel-editable-label] don't use GtkObjectJasmine Hassan1-11/+10
http://git.gnome.org/browse/nautilus/commit/?id=b5f9acb9029c015558ab678e01fc2c8dcc8c6c82