aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rwxr-xr-xbuild.sh2
-rw-r--r--project.conf2
-rw-r--r--src/main.cpp18
4 files changed, 12 insertions, 12 deletions
diff --git a/README.md b/README.md
index 33163b3..82a89db 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ Bind a key to `killall -SIGINT gpu-screen-recorder` to stop recording (also save
## Installation
This program depends on [gpu-screen-recorder](https://git.dec05eba.com/gpu-screen-recorder/) which needs to be installed first.\
Run `sudo ./install.sh` or if you are running Arch Linux, then you can find gpu screen recorder gtk on aur under the name gpu-screen-recorder-gtk-git (`yay -S gpu-screen-recorder-gtk-git`).\
-Dependencies needed when building using `build.sh` or `install.sh`: `gtk3 libx11 libxrandr libpulse libdrm wayland-client libappindicator`.\
+Dependencies needed when building using `build.sh` or `install.sh`: `gtk3 libx11 libxrandr libpulse libdrm wayland-client ayatana-appindicator3-0.1`.\
You can also install gpu screen recorder (the gtk gui version) from [flathub](https://flathub.org/apps/details/com.dec05eba.gpu_screen_recorder). This flatpak includes gpu-screen-recorder so no need to install that first.
## Screenshots
diff --git a/build.sh b/build.sh
index b1cb183..c2edd5e 100755
--- a/build.sh
+++ b/build.sh
@@ -10,7 +10,7 @@ opts="-O2 -g0 -DNDEBUG -Wall -Wextra -Werror"
[ -n "$DEBUG" ] && opts="-O0 -g3 -Wall -Wextra -Werror";
build_gsr_gtk() {
- dependencies="gtk+-3.0 x11 xrandr libpulse libdrm wayland-egl wayland-client appindicator3-0.1"
+ dependencies="gtk+-3.0 x11 xrandr libpulse libdrm wayland-egl wayland-client ayatana-appindicator3-0.1"
includes="$(pkg-config --cflags $dependencies)"
libs="$(pkg-config --libs $dependencies) -ldl"
$CC -c src/egl.c $opts $includes
diff --git a/project.conf b/project.conf
index 0af44cd..71e7d98 100644
--- a/project.conf
+++ b/project.conf
@@ -15,4 +15,4 @@ libpulse = ">=13"
libdrm = ">=2"
wayland-egl = ">=15"
wayland-client = ">=1"
-appindicator3-0.1 = ">=10" \ No newline at end of file
+ayatana-appindicator3-0.1 = ">=0" \ No newline at end of file
diff --git a/src/main.cpp b/src/main.cpp
index 87b0dae..6f1679b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -21,7 +21,7 @@ extern "C" {
}
#include <xf86drmMode.h>
#include <xf86drm.h>
-#include <libappindicator/app-indicator.h>
+#include <libayatana-appindicator/app-indicator.h>
typedef struct {
Display *display;
@@ -1715,7 +1715,7 @@ static gboolean on_start_replay_button_click(GtkButton *button, gpointer userdat
gtk_menu_item_set_label(GTK_MENU_ITEM(start_stop_replay_menu_item), "Start replay");
gtk_widget_set_sensitive(save_replay_menu_item, false);
- app_indicator_set_icon(app_indicator, tray_idle_icon_name);
+ app_indicator_set_icon_full(app_indicator, tray_idle_icon_name, "Idle");
if(exit_status == 10) {
show_notification(app, "GPU Screen Recorder",
@@ -1822,7 +1822,7 @@ static gboolean on_start_replay_button_click(GtkButton *button, gpointer userdat
gtk_menu_item_set_label(GTK_MENU_ITEM(start_stop_replay_menu_item), "Stop replay");
gtk_widget_set_sensitive(save_replay_menu_item, true);
- app_indicator_set_icon(app_indicator, tray_recording_icon_name);
+ app_indicator_set_icon_full(app_indicator, tray_recording_icon_name, "Recording");
record_start_time_sec = clock_get_monotonic_seconds();
return true;
@@ -1849,13 +1849,13 @@ static gboolean on_pause_unpause_button_click(GtkButton*, gpointer) {
gtk_button_set_label(pause_recording_button, "Unpause recording");
gtk_image_set_from_icon_name(GTK_IMAGE(recording_record_icon), "media-playback-pause", GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_menu_item_set_label(GTK_MENU_ITEM(pause_recording_menu_item), "Unpause recording");
- app_indicator_set_icon(app_indicator, tray_paused_icon_name);
+ app_indicator_set_icon_full(app_indicator, tray_paused_icon_name, "Paused");
pause_start_sec = clock_get_monotonic_seconds();
} else {
gtk_button_set_label(pause_recording_button, "Pause recording");
gtk_image_set_from_icon_name(GTK_IMAGE(recording_record_icon), "media-record", GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_menu_item_set_label(GTK_MENU_ITEM(pause_recording_menu_item), "Pause recording");
- app_indicator_set_icon(app_indicator, tray_recording_icon_name);
+ app_indicator_set_icon_full(app_indicator, tray_recording_icon_name, "Recording");
paused_time_offset_sec += (clock_get_monotonic_seconds() - pause_start_sec);
}
return true;
@@ -1885,7 +1885,7 @@ static gboolean on_start_recording_button_click(GtkButton *button, gpointer user
gtk_menu_item_set_label(GTK_MENU_ITEM(start_stop_recording_menu_item), "Start recording");
gtk_menu_item_set_label(GTK_MENU_ITEM(pause_recording_menu_item), "Pause recording");
gtk_widget_set_sensitive(pause_recording_menu_item, false);
- app_indicator_set_icon(app_indicator, tray_idle_icon_name);
+ app_indicator_set_icon_full(app_indicator, tray_idle_icon_name, "Idle");
if(exit_status == 10) {
show_notification(app, "GPU Screen Recorder",
@@ -1995,7 +1995,7 @@ static gboolean on_start_recording_button_click(GtkButton *button, gpointer user
gtk_menu_item_set_label(GTK_MENU_ITEM(start_stop_recording_menu_item), "Stop recording");
gtk_widget_set_sensitive(pause_recording_menu_item, true);
- app_indicator_set_icon(app_indicator, tray_recording_icon_name);
+ app_indicator_set_icon_full(app_indicator, tray_recording_icon_name, "recording");
record_start_time_sec = clock_get_monotonic_seconds();
paused_time_offset_sec = 0.0;
@@ -2018,7 +2018,7 @@ static gboolean on_start_streaming_button_click(GtkButton *button, gpointer user
gtk_label_set_text(GTK_LABEL(streaming_record_time_label), "00:00:00");
gtk_menu_item_set_label(GTK_MENU_ITEM(start_stop_streaming_menu_item), "Start streaming");
- app_indicator_set_icon(app_indicator, tray_idle_icon_name);
+ app_indicator_set_icon_full(app_indicator, tray_idle_icon_name, "Idle");
if(exit_status == 10) {
show_notification(app, "GPU Screen Recorder",
@@ -2139,7 +2139,7 @@ static gboolean on_start_streaming_button_click(GtkButton *button, gpointer user
gtk_widget_set_opacity(GTK_WIDGET(streaming_bottom_panel_grid), 1.0);
gtk_menu_item_set_label(GTK_MENU_ITEM(start_stop_streaming_menu_item), "Stop streaming");
- app_indicator_set_icon(app_indicator, tray_recording_icon_name);
+ app_indicator_set_icon_full(app_indicator, tray_recording_icon_name, "Recording");
record_start_time_sec = clock_get_monotonic_seconds();
return true;