Yes, very good start, but make a complete sample code, like shown in
test1.c. You may continue from it.
I like to use "gedit" editor and a terminal window.
Look for the audio-recorder/debian/control file to see what -dev packages
you might need. For example:
sudo apt install autotools-dev gettext intltool pkg-config libgtk-3-dev
libglib2.0-dev libdbus-1-dev libappindicator3-dev
On Sat, Aug 6, 2016 at 10:11 AM, Robert Orzanna <email address hidden> wrote:
> Thank you Osmo!
>
> You're referring to something like this?
>
> GtkRecentManager *manager;
> GtkRecentInfo *info;
> GError *error = NULL;
>
> manager = gtk_recent_manager_get_default ();
> info = gtk_recent_manager_lookup_item (manager, file_uri, &error);
> if (error)
> {
> g_warning ("Could not find the file: %s", error->message);
> g_error_free (error);
> }
> else
> {
> // Use the info object
> gtk_recent_info_unref (info);
> }
>
> --
> You received this bug notification because you are subscribed to Audio
> Recorder.
> https://bugs.launchpad.net/bugs/1610508
>
> Title:
> Feature request: Always ask where to save file?
>
> Status in Audio Recorder:
> New
>
> Bug description:
> Dear all,
>
> My request origins from a discussion on AskUbuntu [1]. Currently,
> Audio Recorder doesn't write to the xbel file upon creation of a new
> file.
>
> This problem could be solved, I think, by a new optional setting to
> ask the user each time where to save the file. It would then write to
> xbel by prompting the GTK File Dialog window.
>
> What do you think of this request?
>
> Would you consider it useful?
>
> Thankfully,
>
> ~Robert
>
>
> [1] https://askubuntu.com/questions/803869/is-there-an-
> indicator-to-quickly-access-recently-used-files/804533?
> noredirect=1#comment1221806_804533
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/audio-recorder/+bug/1610508/+subscriptions
>
--
Sent from my PC, laptop or phone with Ubuntu-Linux.
Yes, very good start, but make a complete sample code, like shown in
test1.c. You may continue from it.
I like to use "gedit" editor and a terminal window.
Look for the audio-recorder/ debian/ control file to see what -dev packages 3-dev
you might need. For example:
sudo apt install autotools-dev gettext intltool pkg-config libgtk-3-dev
libglib2.0-dev libdbus-1-dev libappindicator
// test1.c
#include <glib.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
// Ref: https:/ /developer. gnome.org/ gtk3/stable/ gtk-getting- started. html /developer. gnome.org/ gtk3/stable/ GtkRecentManage r.html
// https:/
// Compile:
// gcc $(pkg-config --cflags gtk+-3.0) -o test1 test1.c $(pkg-config
--libs gtk+-3.0)
//
// Run:
// ./test1
static void saveToXBel( GtkWidget *widget, gpointer data) {
g_print ("Save to xbel.\n");
//...
const gchar *file_uri = "test1.c";
GtkRecentManager *manager = gtk_recent_ manager_ get_default( ); manager_ add_item( manager, file_uri);
gtk_recent_
// Notice: It is better to call gtk_recent_ manager_ add_full with correct /developer. gnome.org/ gtk3/stable/ GtkRecentManage r.html# GtkRecentData
GtkRecentData; mime type, exec app name, etc..
//
// Ref:
https:/
// gboolean gtk_recent_ manager_ add_full (GtkRecentManager *manager,
// const gchar *uri,
// const GtkRecentData *recent_data);
}
static void activateApp( GtkApplication* app, gpointer user_data) {
GtkWidget *window;
GtkWidget *button;
GtkWidget *button_box;
window = gtk_application _window_ new (app); set_title (GTK_WINDOW (window), "Window"); set_default_ size (GTK_WINDOW (window), 200, 200);
gtk_window_
gtk_window_
button_box = gtk_button_box_new (GTK_ORIENTATIO N_HORIZONTAL) ;
gtk_container_add (GTK_CONTAINER (window), button_box);
button = gtk_button_ new_with_ label ("Save to recent files..."); connect_ swapped (button, "clicked", G_CALLBACK destroy) , window);
g_signal_connect (button, "clicked", G_CALLBACK (saveToXBel), NULL);
g_signal_
(gtk_widget_
gtk_container_add (GTK_CONTAINER (button_box), button);
gtk_widget_ show_all (window);
}
int main(int argc, char **argv) {
GtkApplication *app;
int status;
app = gtk_application_new ("org.gtk.example", G_APPLICATION_ FLAGS_NONE) ;
g_signal_connect (app, "activate", G_CALLBACK (activateApp), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
return status;
}
On Sat, Aug 6, 2016 at 10:11 AM, Robert Orzanna <email address hidden> wrote:
> Thank you Osmo! manager_ get_default (); manager_ lookup_ item (manager, file_uri, &error); info_unref (info); /bugs.launchpad .net/bugs/ 1610508 /askubuntu. com/questions/ 803869/ is-there- an- to-quickly- access- recently- used-files/ 804533? 1#comment122180 6_804533 /bugs.launchpad .net/audio- recorder/ +bug/1610508/ +subscriptions
>
> You're referring to something like this?
>
> GtkRecentManager *manager;
> GtkRecentInfo *info;
> GError *error = NULL;
>
> manager = gtk_recent_
> info = gtk_recent_
> if (error)
> {
> g_warning ("Could not find the file: %s", error->message);
> g_error_free (error);
> }
> else
> {
> // Use the info object
> gtk_recent_
> }
>
> --
> You received this bug notification because you are subscribed to Audio
> Recorder.
> https:/
>
> Title:
> Feature request: Always ask where to save file?
>
> Status in Audio Recorder:
> New
>
> Bug description:
> Dear all,
>
> My request origins from a discussion on AskUbuntu [1]. Currently,
> Audio Recorder doesn't write to the xbel file upon creation of a new
> file.
>
> This problem could be solved, I think, by a new optional setting to
> ask the user each time where to save the file. It would then write to
> xbel by prompting the GTK File Dialog window.
>
> What do you think of this request?
>
> Would you consider it useful?
>
> Thankfully,
>
> ~Robert
>
>
> [1] https:/
> indicator-
> noredirect=
>
> To manage notifications about this bug go to:
> https:/
>
--
Sent from my PC, laptop or phone with Ubuntu-Linux.