Click here to Skip to main content
14,574,310 members

Linux Programming

 
QuestionGlade C++ Maximizing the window Pin
Member 1485117218-Jun-20 5:49
MemberMember 1485117218-Jun-20 5:49 
so i have Ubuntu 20.04 and i am using Glade v3.36 so my issue is i want to be able to have my Glade form Maximize when the Form Shows on the screen, can anyone help me get the Form to maximize programmatically . thank you

#include <gtk/gtk.h>

typedef struct {
    GtkWidget *w_dlg_file_choose;       // Pointer to file chooser dialog box
    GtkWidget *w_img_main;              // Pointer to image widget
    GtkWidget      *image;
} app_widgets;

gchar *file_name = "image1.jpg";        // Name of file to open from dialog box
// image = gtk_image_new_from_file ("splash1.jpg");

int main(int argc, char *argv[]) {
    GtkBuilder      *builder;
    GtkWidget       *window;

    app_widgets     *widgets = g_slice_new(app_widgets);
    // gchar *file_name = "file.jpg";        // Name of file to open 
    gtk_init(&argc, &argv);

    // image = gtk_image_new_from_file ("splash1.jpg");
    builder = gtk_builder_new_from_file("glade/window_main.glade");
    window = GTK_WIDGET(gtk_builder_get_object(builder, "window_main"));
    widgets->w_dlg_file_choose = GTK_WIDGET(gtk_builder_get_object(builder, "dlg_file_choose"));
    widgets->w_img_main = GTK_WIDGET(gtk_builder_get_object(builder, "img_main"));
    gtk_builder_connect_signals(builder, widgets);
    //image = gtk_image_new_from_file ("myfile.png");
    // gtk_image_set_from_file(GTK_IMAGE(app_wdgts->w_img_main), file_name);
    g_object_unref(builder);
    gtk_widget_show(window);                
    gtk_main();
    g_slice_free(app_widgets, widgets);
    return 0;
}

Questionglade display an image Pin
Member 148511722-Jun-20 5:15
MemberMember 148511722-Jun-20 5:15 
AnswerRe: glade display an image Pin
Richard MacCutchan2-Jun-20 5:26
mveRichard MacCutchan2-Jun-20 5:26 
QuestionMore advise wanted - how to run TWO loops ? Pin
Vaclav_13-Mar-20 15:23
MemberVaclav_13-Mar-20 15:23 
AnswerRe: More advise wanted - how to run TWO loops ? Pin
Peter_in_278013-Mar-20 18:31
professionalPeter_in_278013-Mar-20 18:31 
AnswerRe: More advise wanted - how to run TWO loops ? Pin
Richard MacCutchan13-Mar-20 23:09
mveRichard MacCutchan13-Mar-20 23:09 
AnswerRe: More advise wanted - how to run TWO loops ? Pin
Member 1477303714-Mar-20 20:42
MemberMember 1477303714-Mar-20 20:42 
AnswerRe: More advise wanted - how to run TWO loops ? Pin
CPallini2-Apr-20 20:47
mveCPallini2-Apr-20 20:47 
GeneralSOLVED Re: More advise wanted - how to run TWO loops ? Pin
Vaclav_3-Apr-20 5:13
MemberVaclav_3-Apr-20 5:13 
GeneralRe: SOLVED Re: More advise wanted - how to run TWO loops ? Pin
CPallini3-Apr-20 5:42
mveCPallini3-Apr-20 5:42 
QuestionSeeking professional advise... Pin
Vaclav_9-Mar-20 19:14
MemberVaclav_9-Mar-20 19:14 
AnswerRe: Seeking professional advise... Pin
k505410-Mar-20 4:29
mvek505410-Mar-20 4:29 
GeneralRe: Seeking professional advise... Pin
Vaclav_10-Mar-20 5:12
MemberVaclav_10-Mar-20 5:12 
GeneralRe: Seeking professional advise... Pin
Richard MacCutchan10-Mar-20 5:48
mveRichard MacCutchan10-Mar-20 5:48 
QuestionUsing bluetooth connection asynchronously - C++ Pin
Vaclav_7-Mar-20 8:49
MemberVaclav_7-Mar-20 8:49 
QuestionReturn indicates failure , errno indicates status? Pin
Vaclav_6-Mar-20 6:06
MemberVaclav_6-Mar-20 6:06 
AnswerRe: Return indicates failure , errno indicates status? Pin
k50546-Mar-20 6:34
mvek50546-Mar-20 6:34 
GeneralRe: Return indicates failure , errno indicates status? Pin
Vaclav_6-Mar-20 8:18
MemberVaclav_6-Mar-20 8:18 
GeneralRe: Return indicates failure , errno indicates status? Pin
Richard MacCutchan6-Mar-20 21:42
mveRichard MacCutchan6-Mar-20 21:42 
GeneralRe: Return indicates failure , errno indicates status? Pin
k50547-Mar-20 4:55
mvek50547-Mar-20 4:55 
GeneralRe: Return indicates failure , errno indicates status? Pin
Vaclav_7-Mar-20 6:01
MemberVaclav_7-Mar-20 6:01 
GeneralRe: Return indicates failure , errno indicates status? Pin
Richard MacCutchan8-Mar-20 1:29
mveRichard MacCutchan8-Mar-20 1:29 
QuestionUsing ba2str fails - why ? Pin
Vaclav_4-Mar-20 4:59
MemberVaclav_4-Mar-20 4:59 
AnswerRe: Using ba2str fails - why ? Pin
ZurdoDev4-Mar-20 5:14
mveZurdoDev4-Mar-20 5:14 
GeneralRe: Using ba2str fails - why ? Pin
Vaclav_4-Mar-20 5:36
MemberVaclav_4-Mar-20 5:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.