Sponsored Content
Top Forums Programming Combining Qt with GTK only one problem! Post 302663857 by hakermania on Thursday 28th of June 2012 02:40:39 PM
Old 06-28-2012
Ok, here it is:

Code:
void MainWindow::show_app(){
    //crash here:
    this->show();
    //this works fine:
    app_indicator_set_status(appindicator, APP_INDICATOR_STATUS_PASSIVE);

}

void MainWindow::make_indicator()
{
    if(appindicator){
        //appindicator has already been created
        return;
    }
    appindicator = app_indicator_new("Format Junkie Indicator", "formatjunkie", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
    GtkWidget* showapp_option;
    GtkWidget* add_audio_option;
    //GtkWidget* subitem3;
    GtkWidget* indicatormenu = gtk_menu_new();
    GtkWidget* item = gtk_menu_item_new_with_label("Format Junkie main menu");
    gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), indicatormenu);

    showapp_option = gtk_menu_item_new_with_label("Show App!");
    g_signal_connect(showapp_option, "activate", G_CALLBACK(&MainWindow::show_app), appindicator);
    gtk_menu_shell_append(GTK_MENU_SHELL(indicatormenu), showapp_option);

    add_audio_option = gtk_menu_item_new_with_label("Add audio files");
    g_signal_connect(add_audio_option, "activate", G_CALLBACK(&MainWindow::add_audio_files), appindicator);
    gtk_menu_shell_append(GTK_MENU_SHELL(indicatormenu), add_audio_option);
/*
    subitem3 = gtk_menu_item_new_with_label("Quit");
    g_signal_connect(subitem3, "activate", G_CALLBACK(quit_from_indicator), appindicator);
    gtk_menu_shell_append(GTK_MENU_SHELL(menu), subitem3);*/
    gtk_widget_show_all(indicatormenu);
    app_indicator_set_status(appindicator, APP_INDICATOR_STATUS_ACTIVE);
    app_indicator_set_attention_icon(appindicator, "dialog-warning");

    app_indicator_set_menu(appindicator, GTK_MENU (indicatormenu));
}

This User Gave Thanks to hakermania For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to start my gtk+

hi, i am a total dummy of unix. i am not used to the unix convention and practice. currently i am trying to install and use the solaris GUI based ftp program called gtk+ (gtk+-1.2.10-sol8-sparc-local.gz). i downloaded it and installed it successfully on my Sun Solaris sparc version 8. ... (4 Replies)
Discussion started by: champion
4 Replies

2. Linux

GTK+ hates me

I am very new to the linux environment. I have been interested in it for years but have just recently had the courage to pop that install disk into my PC. Because of it's ease of installation, I installed Mandrake 9.1 and I'm running KDE3.1 for my GUI. Right now I'm trying to conquer the world... (5 Replies)
Discussion started by: n0data
5 Replies

3. Post Here to Contact Site Administrators and Moderators

GTK+ project

Hai, I am santhosh,I am fresher to this Forum,I want details about GTK+ Project(All Widgets--- I mean how they are programming in callback.c file). if it possible please send information regarding this Glade tool.I want to interface glade with Modbus protocol, Thankyou with best regards,... (0 Replies)
Discussion started by: santhosh.linux
0 Replies

4. Programming

GUI without GTK - Is it possible?

Is GUI programming without GTK possible? If so, how? Or what libraries should I #include? Google seems to tell me that GUI programming in C++ is much more popular then in C. I'm assuming because of the Object Orientedness (if that is even a word)? Before you say things like "Search the forums",... (5 Replies)
Discussion started by: Octal
5 Replies

5. Shell Programming and Scripting

Problem combining two variables into one

Hello, I have a problem combining two variables into one. I did the following: in my env variables i had set PATH_DESTINATION_1=/root/path_one PATH_DESTINATION_2=/root/path_two #!/usr/bin/ksh count=1 count_path=2 while do (3 Replies)
Discussion started by: Eraser
3 Replies

6. Programming

curses.h not found , gtk/gtk.h not found

i have downloaded <libncurses5-dev_5.7+20101128-1_i386.deb> and <ndk++-0.0.1alpha4.tar.bz2> which contains the header files curses.h and gtk/gtk.h .. i have also included them using .. #include "/home/ball/Desktop/Sudoku/project/libncurses5-dev_5.7+20101128-1_i386/usr/include/curses.h" ... (2 Replies)
Discussion started by: upvan111
2 Replies

7. UNIX for Dummies Questions & Answers

Gtk-WARNING **:

Hi all, I want to run a 32 bit program on a 64 bit linux machine. Installing the program was no issue but when I try to run it I get Warnings that look like this: Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk" Gtk-WARNING **: Unable to locate theme engine in... (3 Replies)
Discussion started by: friend
3 Replies

8. Shell Programming and Scripting

awk problem - combining awk statements

i have a datafile that has several lines that look like this: 2,dataflow,Sun Mar 17 16:50:01 2013,1363539001,2990,excelsheet,660,mortar,660,4 using the following command: awk -F, '{$3=strftime("%a %b %d %T %Y,%s",$3)}1' OFS=, $DATAFILE | egrep -v "\-OLDISSUES," | ${AWK} "/${MONTH} ${DAY}... (7 Replies)
Discussion started by: SkySmart
7 Replies

9. Fedora

GTK Themes

Hi, So, I have a GTK based GUI app. I used GTKdevel-2.24 to develop and compile it on two different distros of linux: Fedora 14 and Linaro (tablet). All of my code was the same for each but compiled on each platform separately (32bit and ARM). Both distros run the application. On Fedora 14... (0 Replies)
Discussion started by: fedora18
0 Replies
XmMainWindowSetAreas(library call)										XmMainWindowSetAreas(library call)

NAME
XmMainWindowSetAreas -- A MainWindow function that identifies manageable children for each area SYNOPSIS
#include <Xm/MainW.h> void XmMainWindowSetAreas( Widget widget, Widget menu_bar, Widget command_window, Widget horizontal_scrollbar, Widget vertical_scrollbar, Widget work_region); DESCRIPTION
XmMainWindowSetAreas identifies which of the valid children for each area (such as the MenuBar and work region) are to be actively managed by MainWindow. This function also sets up or adds the MenuBar, work window, command window, and ScrollBar widgets to the application's main window widget. Each area is optional; therefore, the user can pass NULL to one or more of the following arguments. The window manager provides the title bar. NOTE: XmMainWindowSetAreas is obsolete and exists for compatibility with previous releases. The information previously returned by this function can now be obtained through a call to XtGetValues on the XmNscrolledWindowChildType resource. widget Specifies the MainWindow widget ID. menu_bar Specifies the widget ID for the MenuBar to be associated with the MainWindow widget. Set this ID only after creating an instance of the MainWindow widget. The attribute name associated with this argument is XmNmenuBar. command_window Specifies the widget ID for the command window to be associated with the MainWindow widget. Set this ID only after creating an instance of the MainWindow widget. The attribute name associated with this argument is XmNcommandWindow. horizontal_scrollbar Specifies the ScrollBar widget ID for the horizontal ScrollBar to be associated with the MainWindow widget. Set this ID only after creating an instance of the MainWindow widget. The attribute name associated with this argument is XmNhorizontalScrollBar. vertical_scrollbar Specifies the ScrollBar widget ID for the vertical ScrollBar to be associated with the MainWindow widget. Set this ID only after creating an instance of the MainWindow widget. The attribute name associated with this argument is XmNverticalScrollBar. work_region Specifies the widget ID for the work window to be associated with the MainWindow widget. Set this ID only after creating an instance of the MainWindow widget. The attribute name associated with this argument is XmNworkWindow. For a complete definition of MainWindow and its associated resources, see XmMainWindow(3). RELATED
XmMainWindow(3). XmMainWindowSetAreas(library call)
All times are GMT -4. The time now is 09:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy