Init package
This commit is contained in:
parent
e7683829fe
commit
3ba0afbb20
86
enable_scrolling_in_details_pane.patch
Normal file
86
enable_scrolling_in_details_pane.patch
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
From ff0c3ec9f71ad27b635637774d0b065d6e49b8ef Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sean Davis <smd.seandavis@gmail.com>
|
||||||
|
Date: Sun, 1 Mar 2020 07:13:52 -0500
|
||||||
|
Subject: Enable keyboard scrolling in Details pane (bug #15912)
|
||||||
|
|
||||||
|
---
|
||||||
|
panel-plugin/weather-summary.c | 53 ++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 53 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
|
||||||
|
index da12a5b..e66abf0 100644
|
||||||
|
--- a/panel-plugin/weather-summary.c
|
||||||
|
+++ b/panel-plugin/weather-summary.c
|
||||||
|
@@ -282,6 +282,56 @@ weather_summary_get_logo(plugin_data *data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+static gboolean
|
||||||
|
+text_view_key_pressed_cb (GtkWidget *widget,
|
||||||
|
+ GdkEventKey *event,
|
||||||
|
+ gpointer user_data)
|
||||||
|
+{
|
||||||
|
+ GtkScrolledWindow *scrolled = GTK_SCROLLED_WINDOW (user_data);
|
||||||
|
+ GtkAdjustment *adjustment = gtk_scrolled_window_get_vadjustment (scrolled);
|
||||||
|
+ gdouble current = gtk_adjustment_get_value (adjustment);
|
||||||
|
+ gdouble min = gtk_adjustment_get_lower (adjustment);
|
||||||
|
+ gdouble max = gtk_adjustment_get_upper (adjustment);
|
||||||
|
+ gdouble step_size = 0;
|
||||||
|
+
|
||||||
|
+ switch (event->keyval) {
|
||||||
|
+ case GDK_KEY_Up:
|
||||||
|
+ case GDK_KEY_uparrow:
|
||||||
|
+ step_size = -1 * gtk_adjustment_get_step_increment (adjustment);
|
||||||
|
+ break;
|
||||||
|
+ case GDK_KEY_Down:
|
||||||
|
+ case GDK_KEY_downarrow:
|
||||||
|
+ step_size = gtk_adjustment_get_step_increment (adjustment);
|
||||||
|
+ break;
|
||||||
|
+ case GDK_KEY_Page_Up:
|
||||||
|
+ step_size = -1 * gtk_adjustment_get_page_size (adjustment);
|
||||||
|
+ break;
|
||||||
|
+ case GDK_KEY_Page_Down:
|
||||||
|
+ case GDK_KEY_space:
|
||||||
|
+ step_size = gtk_adjustment_get_page_size (adjustment);
|
||||||
|
+ break;
|
||||||
|
+ case GDK_KEY_Home:
|
||||||
|
+ step_size = -1 * current;
|
||||||
|
+ break;
|
||||||
|
+ case GDK_KEY_End:
|
||||||
|
+ step_size = max;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (step_size != 0) {
|
||||||
|
+ current = current + step_size;
|
||||||
|
+ if (current < min) current = min;
|
||||||
|
+ if (current > max) current = max;
|
||||||
|
+
|
||||||
|
+ gtk_adjustment_set_value (adjustment, current);
|
||||||
|
+
|
||||||
|
+ return TRUE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return FALSE;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
static GtkWidget *
|
||||||
|
create_summary_tab(plugin_data *data)
|
||||||
|
{
|
||||||
|
@@ -311,9 +361,12 @@ create_summary_tab(plugin_data *data)
|
||||||
|
gtk_text_view_set_top_margin (GTK_TEXT_VIEW(view), 12);
|
||||||
|
gtk_text_view_set_right_margin (GTK_TEXT_VIEW(view), 12);
|
||||||
|
gtk_text_view_set_bottom_margin (GTK_TEXT_VIEW(view), 12);
|
||||||
|
+
|
||||||
|
frame = gtk_frame_new(NULL);
|
||||||
|
scrolled = gtk_scrolled_window_new(NULL, NULL);
|
||||||
|
|
||||||
|
+ g_signal_connect(GTK_WIDGET(view), "key-press-event", G_CALLBACK(text_view_key_pressed_cb), scrolled);
|
||||||
|
+
|
||||||
|
overlay = gtk_overlay_new ();
|
||||||
|
gtk_container_add (GTK_CONTAINER (overlay), view);
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v1.2.3
|
||||||
|
|
||||||
BIN
xfce4-weather-plugin-0.10.1.tar.bz2
Normal file
BIN
xfce4-weather-plugin-0.10.1.tar.bz2
Normal file
Binary file not shown.
62
xfce4-weather-plugin.spec
Normal file
62
xfce4-weather-plugin.spec
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
%global xfceversion 4.14
|
||||||
|
|
||||||
|
Name: xfce4-weather-plugin
|
||||||
|
Version: 0.10.1
|
||||||
|
Release: 1
|
||||||
|
Summary: Weather information plugin for the Xfce panel
|
||||||
|
License: BSD
|
||||||
|
#Group: Development/Libraries
|
||||||
|
URL: http://goodies.xfce.org/projects/panel-plugins/%{name}
|
||||||
|
Source0: http://archive.xfce.org/src/panel-plugins/%{name}/0.10/%{name}-%{version}.tar.bz2
|
||||||
|
Patch0: enable_scrolling_in_details_pane.patch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
#BuildArch: noarch
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: libxfce4ui-devel >= %{xfceversion}
|
||||||
|
BuildRequires: xfce4-panel-devel >= %{xfceversion}
|
||||||
|
BuildRequires: libsoup-devel >= 2.26.0
|
||||||
|
BuildRequires: upower-devel >= 0.9.0
|
||||||
|
BuildRequires: gettext
|
||||||
|
BuildRequires: intltool
|
||||||
|
BuildRequires: libxml2-devel >= 2.4.0
|
||||||
|
Requires: xfce4-panel >= %{xfceversion}
|
||||||
|
|
||||||
|
%description
|
||||||
|
The weather plugin displays information about the current weather according
|
||||||
|
your timezone and settings. It allows one to search weather location code in
|
||||||
|
the same plugin and displays weather status in little icons.
|
||||||
|
|
||||||
|
Features include:
|
||||||
|
- Temperature, atmospheric pressure and state.
|
||||||
|
- Wind speed, gust, and direction.
|
||||||
|
- Humidity, Visibility, Dew-point, UV Index.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
# remove la file
|
||||||
|
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||||
|
|
||||||
|
# make sure debuginfo is generated properly
|
||||||
|
chmod -c +x %{buildroot}%{_libdir}/xfce4/panel/plugins/*.so
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
|
||||||
|
%files -f %{name}.lang
|
||||||
|
%license COPYING
|
||||||
|
%doc AUTHORS ChangeLog README TODO
|
||||||
|
%{_libdir}/xfce4/panel/plugins/*.so
|
||||||
|
%{_datadir}/xfce4/panel/plugins/*.desktop
|
||||||
|
%{_datadir}/icons/hicolor/*/*/*
|
||||||
|
%{_datadir}/xfce4/weather
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Jul 27 2020 Dillon Chen <dillon.chen@turbolinux.com.cn> - 0.10.1-1
|
||||||
|
- Init package
|
||||||
Loading…
x
Reference in New Issue
Block a user