Skip to content

Commit

Permalink
Merge pull request #68 from anaselli/master
Browse files Browse the repository at this point in the history
Copy from Qt implementation of missing abstract methods
  • Loading branch information
anaselli authored May 28, 2020
2 parents 3832391 + ce61f3a commit 5536cb6
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Use the libyui/devel image as the base
FROM libyui/devel
FROM registry.opensuse.org/devel/libraries/libyui/containers/libyui-devel:latest

RUN zypper install -y gtk3-devel

COPY . /usr/src/app
2 changes: 1 addition & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SET( VERSION_MAJOR "2" )
SET( VERSION_MINOR "47" )
SET( VERSION_MINOR "48" )
SET( VERSION_PATCH "0" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SHA1}" )

Expand Down
2 changes: 1 addition & 1 deletion package/libyui-gtk-doc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
%define so_version 11

Name: %{parent}-doc
Version: 2.47.0
Version: 2.48.0
Release: 0
Source: %{parent}-%{version}.tar.bz2

Expand Down
8 changes: 7 additions & 1 deletion package/libyui-gtk.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu May 28 20:19:07 CEST 2020 - [email protected]

- Added missing abstract methods (copy of Qt behavior)
- Fixed trevis building
- 2.48.0

-------------------------------------------------------------------
Thu May 28 18:09:47 CEST 2020 - [email protected]

Expand Down Expand Up @@ -33,7 +40,6 @@ Thu May 28 18:09:47 CEST 2020 - [email protected]
- 2.47.0

-------------------------------------------------------------------

Wed Dec 11 09:54:55 UTC 2019 - Rodion Iafarov <[email protected]>

- Increase SO version to 11 (bsc#1132247)
Expand Down
2 changes: 1 addition & 1 deletion package/libyui-gtk.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: libyui-gtk
Version: 2.47.0
Version: 2.48.0
Release: 0
Source: %{name}-%{version}.tar.bz2

Expand Down
9 changes: 9 additions & 0 deletions src/YGDumbTab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ class YGDumbTab : public YDumbTab, public YGWidget
pThis->syncTabPage();
}

// NOTE copy of Qt one
void activate()
{
// send an activation event for this widget
if ( notify() )
YGUI::ui()->sendEvent( new YWidgetEvent( this,YEvent::Activated ) );
}


YGWIDGET_IMPL_CONTAINER (YDumbTab)
};

Expand Down
8 changes: 8 additions & 0 deletions src/YGMenuButton.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ class YGMenuButton : public YMenuButton, public YGWidget
ygtk_menu_button_set_popup (YGTK_MENU_BUTTON (getWidget()), menu);
}

// NOTE copy of Qt one
void activateItem( YMenuItem * item )
{
if ( item )
YGUI::ui()->sendEvent( new YMenuEvent( item ) );
}


YGWIDGET_IMPL_COMMON (YMenuButton)
};

Expand Down
7 changes: 7 additions & 0 deletions src/YGText.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@ class YGRichText : public YRichText, YGScrolledWidget
virtual unsigned int getMinSize (YUIDimension dim)
{ return shrinkable() ? 10 : 100; }

// NOTE copy of Qt one
void activateLink( const std::string & url )
{
YGUI::ui()->sendEvent( new YMenuEvent( url ) );
}


YGWIDGET_IMPL_COMMON (YRichText)
};

Expand Down
10 changes: 10 additions & 0 deletions src/YGTreeView.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ class YGTreeView : public YGScrolledWidget, public YGSelectionStore
gtk_widget_queue_draw (pThis->getWidget());
}


static void right_click_cb (YGtkTreeView *view, gboolean outreach, YGTreeView *pThis)
{ pThis->emitEvent (YEvent::ContextMenuActivated); }
};
Expand Down Expand Up @@ -833,6 +834,15 @@ class YGTree : public YTree, public YGTreeView
}
#endif

// NOTE copy of Qt one
void activate()
{
// send an activation event for this widget
if ( notify() )
YGUI::ui()->sendEvent( new YWidgetEvent( this,YEvent::Activated ) );
}


YGLABEL_WIDGET_IMPL (YTree)
YGSELECTION_WIDGET_IMPL (YTree)
};
Expand Down

0 comments on commit 5536cb6

Please sign in to comment.