updated glade version, and fixed gtk bugs

This commit is contained in:
karthikmv 2022-08-11 00:36:01 +05:30
parent 71dd68289f
commit 1e7a4f0441
2 changed files with 577 additions and 30 deletions

546
iPDC/iPDC.ui Normal file
View File

@ -0,0 +1,546 @@
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-properties</property>
</object>
<object class="GtkImage" id="image10">
<property name="visible">True</property>
<property name="stock">gtk-go-up</property>
<property name="pixel_size">10</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image11">
<property name="visible">True</property>
<property name="stock">gtk-go-down</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image12">
<property name="visible">True</property>
<property name="stock">gtk-select-color</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image13">
<property name="visible">True</property>
<property name="stock">gtk-close</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image14">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image15">
<property name="visible">True</property>
<property name="stock">gtk-about</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-missing-image</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="pixel_size">10</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="stock">gtk-properties</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image7">
<property name="visible">True</property>
<property name="stock">gtk-sort-ascending</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="stock">gtk-media-stop</property>
<property name="icon-size">1</property>
</object>
<object class="GtkWindow" id="ipdc">
<property name="tooltip_text" translatable="yes">iPDC - A Free Phasor Data Concentrator.
Supportive IEEE C37.118 Synchrophasor std.</property>
<property name="title" translatable="yes">iPDC - v1.3</property>
<property name="window_position">center-on-parent</property>
<property name="default_width">710</property>
<property name="default_height">590</property>
<property name="icon_name">gnome-obex-server</property>
<property name="focus_on_map">False</property>
<property name="gravity">center</property>
<child>
<object class="GtkLayout" id="layout1">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="add_pmu_button">
<property name="label" translatable="yes">Add a Source Device</property>
<property name="width_request">240</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">PMU/PDC device from which configuration
and data frames would be received.</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">180</property>
</packing>
</child>
<child>
<object class="GtkButton" id="remove_pmu_button">
<property name="label" translatable="yes">Remove a Source Device</property>
<property name="width_request">240</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Remove PMU/PDC device from which
data frames are being received.</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">225</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cmd_data_off_button">
<property name="label" translatable="yes">Turn OFF Data Transmission</property>
<property name="width_request">240</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Turn OFF data transmission of PMU/PDC device from
which data frames are being received.</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">270</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cmd_data_on_button">
<property name="label" translatable="yes">Turn ON Data Transmission</property>
<property name="width_request">240</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Turn ON data transmission of PMU/PDC device whose
data transmission is put OFF.</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">315</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cmd_cfg_button">
<property name="label" translatable="yes">Request Configuration Frame</property>
<property name="width_request">240</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Send Command frame to PMU/PDC device
to get configuration frame.</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">360</property>
</packing>
</child>
<child>
<object class="GtkButton" id="add_pdc_button">
<property name="label" translatable="yes">Add a Destination Device</property>
<property name="width_request">240</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">PDC device to whom iPDC sends
configuration and data frames.</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">405</property>
</packing>
</child>
<child>
<object class="GtkButton" id="remove_pdc_button">
<property name="label" translatable="yes">Remove a Destination Device</property>
<property name="width_request">240</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Remove PDC device to whom iPDC
sends data frames.</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">449</property>
</packing>
</child>
<child>
<object class="GtkButton" id="display_conn_table_button">
<property name="label" translatable="yes">iPDC Connection Table</property>
<property name="width_request">240</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Display source and destination devices connection tables.</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">495</property>
</packing>
</child>
<child>
<object class="GtkButton" id="exit_button">
<property name="label" translatable="yes">EXIT</property>
<property name="width_request">100</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Click to exit the iPDC Software.</property>
</object>
<packing>
<property name="x">603</property>
<property name="y">555</property>
</packing>
</child>
<child>
<object class="GtkMenuBar" id="menubar">
<property name="width_request">710</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="has_tooltip">True</property>
<property name="resize_mode">immediate</property>
<child>
<object class="GtkMenuItem" id="menuitem1">
<property name="visible">True</property>
<property name="label" translatable="yes">_File</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<child>
<object class="GtkImageMenuItem" id="enter_pdc_detail_menuitem">
<property name="label">New iPDC Setup</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Click to create a new iPDC setup file.</property>
<property name="image">image6</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="open_ipdc_setup">
<property name="label">Open iPDC Setup</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Click to open the saved iPDC setup file.</property>
<property name="image">image4</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="pdc_details_menuitem">
<property name="label" translatable="yes">iPDC Properties</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Click to view the iPDC setup informations.</property>
<property name="image">image5</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu_conn_table">
<property name="label" translatable="yes">Connection Table</property>
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">Display source and destination devices connection tables.</property>
<property name="image">image12</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="exit_menuitem">
<property name="label" translatable="yes">Quit</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Click to exit the iPDC Software.</property>
<property name="image">image3</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkMenuItem" id="menuitem2">
<property name="visible">True</property>
<property name="label" translatable="yes">Edit</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu2">
<property name="visible">True</property>
<child>
<object class="GtkImageMenuItem" id="menu_add_source">
<property name="label">Add Source</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">PMU/PDC device from which configuration
and data frames would be received.</property>
<property name="image">image7</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu_remove_source">
<property name="label">Remove Source</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Remove PMU/PDC device from which
data frames are being received.</property>
<property name="image">image8</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu_data_off">
<property name="label" translatable="yes">Data OFF</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Turn OFF data transmission of PMU/PDC device from
which data frames are being received.</property>
<property name="image">image9</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu_data_on">
<property name="label" translatable="yes">Data ON</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Turn ON data transmission of PMU/PDC device whose
data transmission is put OFF.</property>
<property name="image">image10</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu_request_cfg">
<property name="label" translatable="yes">Request CFG</property>
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">Send Command frame to PMU/PDC device
to get configuration frame.</property>
<property name="image">image11</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu_add_destination">
<property name="label" translatable="yes">Add Destination</property>
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">PDC device to whom iPDC sends
configuration and data frames.</property>
<property name="image">image14</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu_remove_destination">
<property name="label" translatable="yes">Remove Destination</property>
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">Remove PDC device to whom iPDC
sends data frames.</property>
<property name="image">image13</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkMenuItem" id="menuitem4">
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu3">
<property name="visible">True</property>
<child>
<object class="GtkImageMenuItem" id="about_menuitem">
<property name="label">About</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Click to see the publisher, licensing, and version details.</property>
<property name="image">image15</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLinkButton" id="linkbutton1">
<property name="label" translatable="yes">Go online</property>
<property name="width_request">100</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">For more information visit the iPDC official web
'ipdc.codeplex.com/'.</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="uri">http://ipdc.codeplex.com/</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">555</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="admin_label">
<property name="width_request">235</property>
<property name="height_request">40</property>
<property name="visible">True</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">143</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="rights_label">
<property name="width_request">180</property>
<property name="height_request">28</property>
<property name="visible">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="x">260</property>
<property name="y">560</property>
</packing>
</child>
<child>
<object class="GtkTextView" id="text_view">
<property name="width_request">421</property>
<property name="height_request">350</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="tooltip_text" translatable="yes">iPDC - A Free Phasor Data Concentrator.
Supportive IEEE C37.118 Synchrophasor std.</property>
<property name="editable">False</property>
<property name="justification">fill</property>
</object>
<packing>
<property name="x">285</property>
<property name="y">181</property>
</packing>
</child>
<child>
<object class="GtkTextView" id="text_view1">
<property name="width_request">720</property>
<property name="height_request">70</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="editable">False</property>
<property name="justification">fill</property>
<property name="cursor_visible">False</property>
</object>
<packing>
<property name="y">36</property>
</packing>
</child>
<child>
<object class="GtkHSeparator" id="hseparator1">
<property name="width_request">800</property>
<property name="height_request">20</property>
<property name="visible">True</property>
</object>
<packing>
<property name="x">-20</property>
<property name="y">536</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="time_lable">
<property name="width_request">162</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="tooltip_text" translatable="yes">Local Time of System</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="justify">right</property>
<property name="track_visited_links">False</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="heavy"/>
<attribute name="gravity" value="west"/>
<attribute name="foreground" value="#712204430000"/>
</attributes>
</object>
<packing>
<property name="x">545</property>
<property name="y">107</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@ -274,7 +274,7 @@ void display_pdc_detail (GtkButton *widget, gpointer udata)
/* This makes it so the ok_button is the default. */
gtk_widget_set_can_default (ok_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, ok_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), ok_button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting the "Enter" key will cause this button to activate. */
gtk_widget_grab_default (ok_button);
@ -361,7 +361,7 @@ void validation_result (char *msg)
val_dialog = gtk_about_dialog_new ();
/* Define the diffrent properties of val_dialog. */
gtk_about_dialog_set_program_name ((GtkAboutDialog *)val_dialog, " ");
// gtk_about_dialog_set_program_name ((GtkAboutDialog *)val_dialog, " ");
gtk_about_dialog_set_comments ((GtkAboutDialog *)val_dialog, msg);
/* Ensure that the dialog box is destroyed when the user responds */
@ -541,8 +541,8 @@ int validation_pdc_detail (GtkButton *button, gpointer udata)
/* This makes it so the button is the default. */
gtk_widget_set_can_default (yes, TRUE);
gtk_widget_set_can_default (no, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, yes, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, no, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), yes, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), no, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting the "Enter" key will cause this button to activate. */
gtk_widget_grab_default (yes);
@ -641,11 +641,12 @@ void final_pdc_setup_call()
gtk_widget_set_sensitive(GTK_WIDGET(data->remove_pdc_button), TRUE);
gtk_widget_set_sensitive(GTK_WIDGET(data->display_conn_table_button), TRUE);
gtk_widget_set_visible(GTK_WIDGET(data->menuitem2), TRUE);
gtk_widget_set_visible(GTK_WIDGET(data->menu_conn_table), TRUE);
// gtk_menu_attach_to_widget (GTK_MENU (data->menuitem2), GTK_WIDGET (data->ipdc), NULL);
// gtk_widget_show (data->ipdc);
gtk_widget_set_visible(GTK_WIDGET(data->menu_conn_table), TRUE);
gtk_widget_set_visible(GTK_WIDGET(data->pdc_details_menuitem), TRUE);
/* Disable the menuitem for iPDC details entries */
// /* Disable the menuitem for iPDC details entries */
gtk_widget_set_visible(GTK_WIDGET(data->enter_pdc_detail_menuitem), FALSE);
gtk_widget_set_visible(GTK_WIDGET(data->open_ipdc_setup), FALSE);
@ -1132,7 +1133,7 @@ void fill_pdc_details (char *filePath)
gtk_table_set_col_spacings (GTK_TABLE (table), 16);
/* Pack the table into the window */
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(pdc_detail_window)), table, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(pdc_detail_window)), table, TRUE, TRUE, 0);
gtk_widget_show (table);
/* Add few button to the bottom of the dialog */
@ -1211,9 +1212,9 @@ void fill_pdc_details (char *filePath)
gtk_widget_set_can_default (valdbutton, TRUE);
gtk_widget_set_can_default (cancle_button, TRUE);
gtk_widget_set_can_default (help_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, cancle_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, help_button, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_action_area(pdc_detail_window)), valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_action_area(pdc_detail_window)), cancle_button, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_action_area(pdc_detail_window)), help_button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting the "Enter" key will cause this button to activate. */
gtk_widget_grab_default (valdbutton);
@ -1257,7 +1258,7 @@ void add_pmu (GtkButton *but, gpointer udata)
gtk_table_set_col_spacings (GTK_TABLE (table), 16);
/* Pack the table into the window */
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(add_pmu_window)), table, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(add_pmu_window)), table, FALSE, FALSE, 0);
gtk_widget_show (table);
/* Add few button to the bottom of the dialog */
@ -1327,9 +1328,9 @@ void add_pmu (GtkButton *but, gpointer udata)
gtk_widget_set_can_default (close_button, TRUE);
gtk_widget_set_can_default (valdbutton, TRUE);
gtk_widget_set_can_default (help_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, help_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, close_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(add_pmu_window), valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(add_pmu_window), help_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(add_pmu_window), close_button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting the "Enter" key will cause this button to activate. */
gtk_widget_grab_default (valdbutton);
@ -1397,11 +1398,11 @@ void cmd_or_remove_pmu (GtkButton *but, gpointer udata)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
/* The dialog window is created with a vbox packed into it */
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(new_window)), scrolled_window, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(new_window)), scrolled_window, FALSE, TRUE, 0);
gtk_widget_show (scrolled_window);
hbox1 = gtk_hbox_new (FALSE, 16);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(new_window)), hbox1, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(new_window)), hbox1, FALSE, TRUE, 0);
gtk_widget_show (hbox1);
window2 = gtk_alignment_new (0,0,0,0);
@ -1590,8 +1591,8 @@ void cmd_or_remove_pmu (GtkButton *but, gpointer udata)
/* This makes it so the button is the default. */
gtk_widget_set_can_default (valdbutton, TRUE);
gtk_widget_set_can_default (help_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, help_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), help_button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting the "Enter" key will cause this button to activate. */
gtk_widget_grab_default (valdbutton);
@ -1604,7 +1605,7 @@ void cmd_or_remove_pmu (GtkButton *but, gpointer udata)
close_button = gtk_button_new_with_label ("Close");
g_signal_connect_swapped (close_button, "clicked", G_CALLBACK (gtk_widget_destroy), new_window);
gtk_widget_set_can_default (close_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, close_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), close_button, TRUE, TRUE, 0);
gtk_widget_grab_default (close_button);
gtk_widget_show (close_button);
on_flag = 0, off_flag = 0;
@ -1664,7 +1665,7 @@ void add_new_pdc (GtkButton *but, gpointer udata)
gtk_table_set_col_spacings (GTK_TABLE (table), 16);
/* The dialog window is created with a vbox packed into it */
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(new_window)), table, FALSE, FALSE, 0);
gtk_box_pack_start (gtk_dialog_get_content_area(new_window), table, FALSE, FALSE, 0);
gtk_widget_show (table);
/* Add few buttons to the bottom of the dialog */
@ -1713,9 +1714,9 @@ void add_new_pdc (GtkButton *but, gpointer udata)
gtk_widget_set_can_default (close_button, TRUE);
gtk_widget_set_can_default (valdbutton, TRUE);
gtk_widget_set_can_default (help_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, help_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, close_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), help_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), close_button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting the "Enter" key will cause this button to activate. */
gtk_widget_grab_default (valdbutton);
@ -1762,7 +1763,7 @@ void remove_pdc (GtkButton *but, gpointer udata)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
/* The dialog window is created with a vbox packed into it. */
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(new_window)), scrolled_window, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_content_area(new_window), scrolled_window, TRUE, TRUE, 0);
gtk_widget_show (scrolled_window);
hbox1 = gtk_hbox_new (FALSE, 16);
@ -1910,8 +1911,8 @@ void remove_pdc (GtkButton *but, gpointer udata)
/* This makes it so the button is the default. */
gtk_widget_set_can_default (valdbutton, TRUE);
gtk_widget_set_can_default (help_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area, help_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), valdbutton, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), help_button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting the "Enter" key will cause this button to activate. */
gtk_widget_grab_default (valdbutton);
@ -1922,7 +1923,7 @@ void remove_pdc (GtkButton *but, gpointer udata)
g_signal_connect_swapped (close_button, "clicked", G_CALLBACK (gtk_widget_destroy), new_window);
gtk_widget_set_can_default (close_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, close_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), close_button, TRUE, TRUE, 0);
gtk_widget_grab_default (close_button);
gtk_widget_show (close_button);
@ -1963,7 +1964,7 @@ void connection_table (GtkButton *but, gpointer udata)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
/* The dialog window is created with a vbox packed into it. */
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(new_window)), scrolled_window, FALSE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_content_area(new_window), scrolled_window, FALSE, TRUE, 0);
gtk_widget_show (scrolled_window);
/* Create a table of 20 by 5 squares */
@ -2147,7 +2148,7 @@ void connection_table (GtkButton *but, gpointer udata)
/* This makes it so the button is the default. */
gtk_widget_set_can_default (close_button, TRUE);
gtk_box_pack_start (gtk_dialog_get_action_area, close_button, TRUE, TRUE, 0);
gtk_box_pack_start (gtk_dialog_get_action_area(new_window), close_button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting the "Enter" key will cause this button to activate. */
gtk_widget_grab_default (close_button);