summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-02-02 20:54:19 +0100
committerGitHub <noreply@github.com>2023-02-02 20:54:19 +0100
commit1aa6c4fed823e74ded911a134065e2619ad53bf1 (patch)
tree239e65b0af1a1a39012b4187894274e860350235 /fluid
parent59d3b2e9fd10bdf14592e82ced422346ecd7204e (diff)
Fix position() methods that shadow Fl_Widget::position()
* `FL_DEPRECATED` macro to mark `position()` method that shadow `Fl_Widget::position()` #69 (#666)
Diffstat (limited to 'fluid')
-rw-r--r--fluid/CMakeLists.txt1
-rw-r--r--fluid/Fl_Type.cxx2
-rw-r--r--fluid/widget_browser.cxx8
3 files changed, 6 insertions, 5 deletions
diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt
index 50983c149..a7a0d08df 100644
--- a/fluid/CMakeLists.txt
+++ b/fluid/CMakeLists.txt
@@ -158,6 +158,7 @@ if (APPLE AND (NOT OPTION_APPLE_X11))
# create bundle
set_target_properties (fluid PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/fluid.plist")
set_target_properties (fluid PROPERTIES MACOSX_BUNDLE_ICON_FILE ${ICON_NAME})
+ set_target_properties (fluid PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.fltk.fluid")
# The line below would wrongly install /Applications/fluid.icns
# ## set_target_properties (fluid PROPERTIES RESOURCE ${ICON_PATH})
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx
index a662dbb93..c3b1cbbf4 100644
--- a/fluid/Fl_Type.cxx
+++ b/fluid/Fl_Type.cxx
@@ -192,7 +192,7 @@ void delete_all(int selected_only) {
shell_prefs_get();
shell_settings_write();
widget_browser->hposition(0);
- widget_browser->position(0);
+ widget_browser->vposition(0);
}
selection_changed(0);
widget_browser->redraw();
diff --git a/fluid/widget_browser.cxx b/fluid/widget_browser.cxx
index ec59d7d25..089184511 100644
--- a/fluid/widget_browser.cxx
+++ b/fluid/widget_browser.cxx
@@ -512,7 +512,7 @@ int Widget_Browser::handle(int e) {
*/
void Widget_Browser::save_scroll_position() {
saved_h_scroll_ = hposition();
- saved_v_scroll_ = position();
+ saved_v_scroll_ = vposition();
}
/**
@@ -520,7 +520,7 @@ void Widget_Browser::save_scroll_position() {
*/
void Widget_Browser::restore_scroll_position() {
hposition(saved_h_scroll_);
- position(saved_v_scroll_);
+ vposition(saved_v_scroll_);
}
/**
@@ -546,7 +546,7 @@ void Widget_Browser::display(Fl_Type *inNode) {
return;
}
// remeber our current scroll position
- int currentV = position(), newV = currentV;
+ int currentV = vposition(), newV = currentV;
int nodeV = 0;
// find the inNode in the tree and check, if it is already visible
Fl_Type *p=Fl_Type::first;
@@ -571,6 +571,6 @@ void Widget_Browser::display(Fl_Type *inNode) {
newV = 0;
}
if (newV!=currentV)
- position(newV);
+ vposition(newV);
}